[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87172e8f-9698-0805-252f-55f68ee07862@virtuozzo.com>
Date: Fri, 6 Dec 2019 19:24:31 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: Daniel Axtens <dja@...ens.net>, kasan-dev@...glegroups.com,
linux-mm@...ck.org, glider@...gle.com,
linux-kernel@...r.kernel.org, dvyukov@...gle.com
Cc: daniel@...earbox.net, cai@....pw,
syzbot+82e323920b78d54aaed5@...kaller.appspotmail.com,
syzbot+59b7daa4315e07a994f1@...kaller.appspotmail.com,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 3/3] kasan: don't assume percpu shadow allocations will
succeed
On 12/5/19 5:04 PM, Daniel Axtens wrote:
> syzkaller and the fault injector showed that I was wrong to assume
> that we could ignore percpu shadow allocation failures.
>
> Handle failures properly. Merge all the allocated areas back into the free
> list and release the shadow, then clean up and return NULL. The shadow
> is released unconditionally, which relies upon the fact that the release
> function is able to tolerate pages not being present.
>
> Also clean up shadows in the recovery path - currently they are not
> released, which leaks a bit of memory.
>
> Fixes: 3c5c3cfb9ef4 ("kasan: support backing vmalloc space with real shadow memory")
> Reported-by: syzbot+82e323920b78d54aaed5@...kaller.appspotmail.com
> Reported-by: syzbot+59b7daa4315e07a994f1@...kaller.appspotmail.com
> Cc: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
> Signed-off-by: Daniel Axtens <dja@...ens.net>
> ---
Reviewed-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
Powered by blists - more mailing lists