linux/mm/kasan
Andrey Konovalov 1f538e1f2d kasan: better identify bug types for tag-based modes
Identify the bug type for the tag-based modes based on the stack trace
entries found in the stack ring.

If a free entry is found first (meaning that it was added last), mark the
bug as use-after-free.  If an alloc entry is found first, mark the bug as
slab-out-of-bounds.  Otherwise, assign the common bug type.

This change returns the functionalify of the previously dropped
CONFIG_KASAN_TAGS_IDENTIFY.

Link: https://lkml.kernel.org/r/13ce7fa07d9d995caedd1439dfae4d51401842f2.1662411800.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Peter Collingbourne <pcc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-10-03 14:03:02 -07:00
..
common.c kasan: use kasan_addr_to_slab in print_address_description 2022-10-03 14:03:00 -07:00
generic.c kasan: move kasan_get_alloc/free_track definitions 2022-10-03 14:02:59 -07:00
hw_tags.c kasan: support kasan.stacktrace for SW_TAGS 2022-10-03 14:03:01 -07:00
init.c kasan: use MAX_PTRS_PER_* for early shadow tables 2021-06-29 10:53:53 -07:00
kasan.h kasan: dynamically allocate stack ring entries 2022-10-03 14:03:02 -07:00
Makefile mm/kasan: remove unnecessary CONFIG_KASAN option 2022-03-24 19:06:48 -07:00
quarantine.c kasan: give better names to shadow values 2022-05-13 07:20:19 -07:00
report.c kasan: introduce kasan_complete_mode_report_info 2022-10-03 14:03:01 -07:00
report_generic.c kasan: introduce kasan_complete_mode_report_info 2022-10-03 14:03:01 -07:00
report_hw_tags.c kasan: simplify kasan_find_first_bad_addr call sites 2022-03-24 19:06:49 -07:00
report_sw_tags.c kasan: simplify kasan_find_first_bad_addr call sites 2022-03-24 19:06:49 -07:00
report_tags.c kasan: better identify bug types for tag-based modes 2022-10-03 14:03:02 -07:00
shadow.c UML: add support for KASAN under x86_64 2022-07-17 23:35:22 +02:00
sw_tags.c kasan: support kasan.stacktrace for SW_TAGS 2022-10-03 14:03:01 -07:00
tags.c kasan: dynamically allocate stack ring entries 2022-10-03 14:03:02 -07:00