aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/device.py
diff options
context:
space:
mode:
authorAlexander Potapenko <[email protected]>2020-04-06 20:10:15 -0700
committerLinus Torvalds <[email protected]>2020-04-07 10:43:43 -0700
commit69866e156ce28c47dc0085b5ba5e734f5511812e (patch)
tree308cd68d44e5d09c827bc43d5a200b8ba896d3ea /scripts/gdb/linux/device.py
parent9cf016e6b49b53d6c15d4137c034178148149ef4 (diff)
lib/stackdepot.c: check depot_index before accessing the stack slab
Avoid crashes on corrupted stack ids. Despite stack ID corruption may indicate other bugs in the program, we'd better fail gracefully on such IDs instead of crashing the kernel. This patch has been previously mailed as part of KMSAN RFC patch series. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Alexander Potapenko <[email protected]> Cc: Vegard Nossum <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Marco Elver <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Sergey Senozhatsky <[email protected]> From: Dan Carpenter <[email protected]> Subject: lib/stackdepot.c: fix a condition in stack_depot_fetch() We should check for a NULL pointer first before adding the offset. Otherwise if the pointer is NULL and the offset is non-zero, it will lead to an Oops. Fixes: d45048e65a59 ("lib/stackdepot.c: check depot_index before accessing the stack slab") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Alexander Potapenko <[email protected]> Link: http://lkml.kernel.org/r/20200312113006.GA20562@mwanda Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/device.py')
0 files changed, 0 insertions, 0 deletions