Re: [PATCH] mm, kasan: introduce a special shadow value for allocator metadata

From: Andrey Ryabinin
Date: Tue May 31 2016 - 07:52:16 EST




On 05/31/2016 01:44 PM, Alexander Potapenko wrote:
> Add a special shadow value to distinguish accesses to KASAN-specific
> allocator metadata.
>
> Unlike AddressSanitizer in the userspace, KASAN lets the kernel proceed
> after a memory error. However a write to the kmalloc metadata may cause
> memory corruptions that will make the tool itself unreliable and induce
> crashes later on. Warning about such corruptions will ease the
> debugging.

It will not. Whether out-of-bounds hits metadata or not is absolutely irrelevant
to the bug itself. This information doesn't help to understand, analyze or fix the bug.