linux/mm/kasan
Walter Wu ae8f06b31a kasan: add memory corruption identification for software tag-based mode
Add memory corruption identification at bug report for software tag-based
mode.  The report shows whether it is "use-after-free" or "out-of-bound"
error instead of "invalid-access" error.  This will make it easier for
programmers to see the memory corruption problem.

We extend the slab to store five old free pointer tag and free backtrace,
we can check if the tagged address is in the slab record and make a good
guess if the object is more like "use-after-free" or "out-of-bound".
therefore every slab memory corruption can be identified whether it's
"use-after-free" or "out-of-bound".

[aryabinin@virtuozzo.com: simplify & clenup code]
  Link: https://lkml.kernel.org/r/3318f9d7-a760-3cc8-b700-f06108ae745f@virtuozzo.com]
Link: http://lkml.kernel.org/r/20190821180332.11450-1-aryabinin@virtuozzo.com
Signed-off-by: Walter Wu <walter-zh.wu@mediatek.com>
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Alexander Potapenko <glider@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-09-24 15:54:07 -07:00
..
common.c kasan: add memory corruption identification for software tag-based mode 2019-09-24 15:54:07 -07:00
generic_report.c
generic.c mm/kasan: change kasan_check_{read,write} to return boolean 2019-07-12 11:05:42 -07:00
init.c
kasan.h kasan: add memory corruption identification for software tag-based mode 2019-09-24 15:54:07 -07:00
Makefile arm64 updates for 5.2 2019-05-06 17:54:22 -07:00
quarantine.c
report.c kasan: add memory corruption identification for software tag-based mode 2019-09-24 15:54:07 -07:00
tags_report.c kasan: add memory corruption identification for software tag-based mode 2019-09-24 15:54:07 -07:00
tags.c mm/kasan: change kasan_check_{read,write} to return boolean 2019-07-12 11:05:42 -07:00