Re: [PATCH v7 1/2] mm, kasan: account for object redzone in SLUB's nearest_obj()

From: Alexander Potapenko
Date: Wed Jul 13 2016 - 08:14:48 EST


Changed the description as follows:

=================================
mm, kasan: account for object redzone in SLUB's nearest_obj()

When looking up the nearest SLUB object for a given address, correctly
calculate its offset if SLAB_RED_ZONE is enabled for that cache.

Previously, when KASAN had detected an error on an object from a cache
with SLAB_RED_ZONE set, the actual start address of the object was
miscalculated, which led to random stacks having been reported.

Fixes: 7ed2f9e663854db ("mm, kasan: SLAB support")
Signed-off-by: Alexander Potapenko <glider@xxxxxxxxxx>
=================================

To avoid sending both patches and the cover page again, I'm going to
wait for other comments.

On Tue, Jul 12, 2016 at 10:02 PM, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, 12 Jul 2016 20:12:44 +0200 Alexander Potapenko <glider@xxxxxxxxxx> wrote:
>
>> When looking up the nearest SLUB object for a given address, correctly
>> calculate its offset if SLAB_RED_ZONE is enabled for that cache.
>
> What are the runtime effects of this fix? Please always include this
> info when fixing bugs so that others can decide which kernel(s) need
> patching.
>



--
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-StraÃe, 33
80636 MÃnchen

GeschÃftsfÃhrer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg