aboutsummaryrefslogtreecommitdiff
path: root/tests/test-aio.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-08-24 16:28:15 +0100
committerMichael Roth <mdroth@linux.vnet.ibm.com>2016-11-02 16:41:35 -0500
commit98b4465f7ded63ed3f3f97c1e244123182a1c687 (patch)
tree3029e1f1e1e58f689cbf06b2332639ae4650a4a3 /tests/test-aio.c
parent8342e1240b70bbf72813a48c1475b025da87b017 (diff)
crypto: ensure XTS is only used with ciphers with 16 byte blocks
The XTS cipher mode needs to be used with a cipher which has a block size of 16 bytes. If a mis-matching block size is used, the code will either corrupt memory beyond the IV array, or not fully encrypt/decrypt the IV. This fixes a memory corruption crash when attempting to use cast5-128 with xts, since the former has an 8 byte block size. A test case is added to ensure the cipher creation fails with such an invalid combination. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> (cherry picked from commit a5d2f44d0d3e7523670e103a8c37faed29ff2b76) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'tests/test-aio.c')
0 files changed, 0 insertions, 0 deletions