summaryrefslogtreecommitdiff
path: root/net/bpf
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2019-07-24 12:43:06 +0300
committerIlya Dryomov <idryomov@gmail.com>2019-08-28 13:33:46 +0300
commite8c99200b4d117c340c392ebd5e62d85dfeed027 (patch)
treea037ce4be565b461d56311422a4d6c276a67a452 /net/bpf
parenta55aa89aab90fae7c815b0551b07be37db359d76 (diff)
downloadlinux-e8c99200b4d117c340c392ebd5e62d85dfeed027.tar.xz
libceph: don't call crypto_free_sync_skcipher() on a NULL tfm
In set_secret(), key->tfm is assigned to NULL on line 55, and then ceph_crypto_key_destroy(key) is executed. ceph_crypto_key_destroy(key) crypto_free_sync_skcipher(key->tfm) crypto_free_skcipher(&tfm->base); This happens to work because crypto_sync_skcipher is a trivial wrapper around crypto_skcipher: &tfm->base is still 0 and crypto_free_skcipher() handles that. Let's not rely on the layout of crypto_sync_skcipher. This bug is found by a static analysis tool STCheck written by us. Fixes: 69d6302b65a8 ("libceph: Remove VLA usage of skcipher"). Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/bpf')
0 files changed, 0 insertions, 0 deletions