Re: [PATCH 1/1] kasan: add memory corruption identification for hardware tag-based mode
From: Andrey Konovalov <andreyknvl@gmail.com>
Date: 2021-06-02 12:25:06
Also in:
lkml
From: Andrey Konovalov <andreyknvl@gmail.com>
Date: 2021-06-02 12:25:06
Also in:
lkml
On Mon, May 31, 2021 at 11:50 AM Marco Elver [off-list ref] wrote:
On Sun, May 30, 2021 at 12:47PM +0800, Kuan-Ying Lee wrote:quoted
Add memory corruption identification at bug report for hardware 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". Signed-off-by: Kuan-Ying Lee <redacted>On a whole this makes sense because SW_TAGS mode supports this, too. My main complaints are the copy-paste of the SW_TAGS code. Does it make sense to refactor per my suggestions below? This is also a question to KASAN maintainers (Andrey, any preference?).
All of your comments are valid. Thank you, Marco.