]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: fix auth_signature buffer allocation in secure mode
authorIlya Dryomov <idryomov@gmail.com>
Tue, 15 Dec 2020 15:40:59 +0000 (16:40 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 28 Dec 2020 19:34:32 +0000 (20:34 +0100)
commitc05d75cbb411558ccce451f0feab0afb7f97d884
tree46228c2e49170ff805d30480189fdd0025cd780b
parent2f2d4f11f03e1aadc1d54b6e918f9e7a6d3638d9
libceph: fix auth_signature buffer allocation in secure mode

auth_signature frame is 68 bytes in plain mode and 96 bytes in
secure mode but we are requesting 68 bytes in both modes.  By luck,
this doesn't actually result in any invalid memory accesses because
the allocation is satisfied out of kmalloc-96 slab and so exactly
96 bytes are allocated, but KASAN rightfully complains.

Fixes: d03e5d4c7e0f ("libceph, ceph: implement msgr2.1 protocol (crc and secure modes)")
Reported-by: Luis Henriques <lhenriques@suse.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/messenger_v2.c