linux-stable/drivers/misc/lkdtm
Kees Cook 3c4c73319b lkdtm/usercopy: Expand size of "out of frame" object
[ Upstream commit f387e86d3a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:41:33 +02:00
..
bugs.c lkdtm/bugs: Don't expect thread termination without CONFIG_UBSAN_TRAP 2022-06-14 18:41:13 +02:00
cfi.c lkdtm: Add CONFIG hints in errors where possible 2021-06-24 15:32:08 +02:00
core.c Char/Misc and other driver changes for 5.17-rc1 2022-01-14 16:02:28 +01:00
fortify.c lkdtm/fortify: Consolidate FORTIFY_SOURCE tests 2021-08-18 22:28:51 +02:00
heap.c lkdtm/heap: Avoid __alloc_size hint warning for VMALLOC_LINEAR_OVERFLOW 2021-08-18 22:28:51 +02:00
lkdtm.h lkdtm/bugs: Don't expect thread termination without CONFIG_UBSAN_TRAP 2022-06-14 18:41:13 +02:00
Makefile Char/Misc and other driver changes for 5.17-rc1 2022-01-14 16:02:28 +01:00
perms.c lkdtm: Avoid more compiler optimizations for bad writes 2020-06-29 18:41:39 +02:00
powerpc.c lkdtm/powerpc: Add SLB multihit test 2020-12-04 01:01:34 +11:00
refcount.c lkdtm: Remove references to CONFIG_REFCOUNT_FULL 2019-11-25 09:15:46 +01:00
rodata.c lkdtm: don't move ctors to .rodata 2020-12-09 15:51:14 +01:00
stackleak.c lkdtm: Add CONFIG hints in errors where possible 2021-06-24 15:32:08 +02:00
usercopy.c lkdtm/usercopy: Expand size of "out of frame" object 2022-06-14 18:41:33 +02:00