]> git.baikalelectronics.ru Git - kernel.git/commit
lkdtm/usercopy: Expand size of "out of frame" object
authorKees Cook <keescook@chromium.org>
Wed, 16 Feb 2022 20:15:03 +0000 (12:15 -0800)
committerKees Cook <keescook@chromium.org>
Tue, 12 Apr 2022 23:11:50 +0000 (16:11 -0700)
commitb00cf69a4e5892287ef27bbf0bb8d757e1fa09e1
tree251f6d15a95c445aae3dde986114ade4781fff41
parent1e6c6f0bf0aae0a57ea85e14366c104cca5c0e4e
lkdtm/usercopy: Expand size of "out of frame" object

To be sufficiently out of range for the usercopy test to see the lifetime
mismatch, expand the size of the "bad" buffer, which will let it be
beyond current_stack_pointer regardless of stack growth direction.
Paired with the recent addition of stack depth checking under
CONFIG_HARDENED_USERCOPY=y, this will correctly start tripping again.

Reported-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/lkml/762faf1b-0443-5ddf-4430-44a20cf2ec4d@collabora.com/
Signed-off-by: Kees Cook <keescook@chromium.org>
drivers/misc/lkdtm/usercopy.c