summaryrefslogtreecommitdiffstats
path: root/linux-headers/linux/kvm.h
diff options
context:
space:
mode:
authorLongpeng2017-11-07 12:32:06 +0100
committerDaniel P. Berrange2017-11-08 12:05:09 +0100
commitf1710638edb2e98008c2a733ffda63ef32b50411 (patch)
treedd031496b39e093d9c05e781381fd8cf25366981 /linux-headers/linux/kvm.h
parenttests: Run the luks tests in test-crypto-block only if encryption is available (diff)
downloadqemu-f1710638edb2e98008c2a733ffda63ef32b50411.tar.gz
qemu-f1710638edb2e98008c2a733ffda63ef32b50411.tar.xz
qemu-f1710638edb2e98008c2a733ffda63ef32b50411.zip
crypto: afalg: fix a NULL pointer dereference
Test-crypto-hash calls qcrypto_hash_bytesv/digest/base64 with errp=NULL, this will cause a NULL pointer dereference if afalg_driver doesn't support requested algos: ret = qcrypto_hash_afalg_driver.hash_bytesv(alg, iov, niov, result, resultlen, errp); if (ret == 0) { return ret; } error_free(*errp); // <--- here Because the error message is thrown away immediately, we should just pass NULL to hash_bytesv(). There is also the same problem in afalg-backend cipher & hmac, let's fix them together. Reviewed-by: Eric Blake <eblake@redhat.com> Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Longpeng <longpeng2@huawei.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'linux-headers/linux/kvm.h')
0 files changed, 0 insertions, 0 deletions