summaryrefslogtreecommitdiffstats
path: root/crypto/cipher-builtin.c
diff options
context:
space:
mode:
authorDaniel P. Berrange2016-08-24 17:28:15 +0200
committerDaniel P. Berrange2016-09-12 13:00:06 +0200
commita5d2f44d0d3e7523670e103a8c37faed29ff2b76 (patch)
tree605c0414b74ebd8bdea7a31fde1da0205a056be0 /crypto/cipher-builtin.c
parentMerge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into sta... (diff)
downloadqemu-a5d2f44d0d3e7523670e103a8c37faed29ff2b76.tar.gz
qemu-a5d2f44d0d3e7523670e103a8c37faed29ff2b76.tar.xz
qemu-a5d2f44d0d3e7523670e103a8c37faed29ff2b76.zip
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>
Diffstat (limited to 'crypto/cipher-builtin.c')
0 files changed, 0 insertions, 0 deletions