lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250703133542.b9d61290725adee655c9b491@linux-foundation.org>
Date: Thu, 3 Jul 2025 13:35:42 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Yeoreum Yun <yeoreum.yun@....com>
Cc: glider@...gle.com, andreyknvl@...il.com, dvyukov@...gle.com,
 vincenzo.frascino@....com, bigeasy@...utronix.de, clrkwllms@...nel.org,
 rostedt@...dmis.org, byungchul@...com, max.byungchul.park@...il.com,
 ysk@...lloc.com, kasan-dev@...glegroups.com, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev
Subject: Re: [PATCH v2] kasan: remove kasan_find_vm_area() to prevent
 possible deadlock

On Thu,  3 Jul 2025 19:10:18 +0100 Yeoreum Yun <yeoreum.yun@....com> wrote:

> find_vm_area() couldn't be called in atomic_context.
> If find_vm_area() is called to reports vm area information,
> kasan can trigger deadlock like:
> 
> CPU0                                CPU1
> vmalloc();
>  alloc_vmap_area();
>   spin_lock(&vn->busy.lock)
>                                     spin_lock_bh(&some_lock);
>    <interrupt occurs>
>    <in softirq>
>    spin_lock(&some_lock);
>                                     <access invalid address>
>                                     kasan_report();
>                                      print_report();
>                                       print_address_description();
>                                        kasan_find_vm_area();
>                                         find_vm_area();
>                                          spin_lock(&vn->busy.lock) // deadlock!
> 
> To prevent possible deadlock while kasan reports, remove kasan_find_vm_area().
> 
> Fixes: c056a364e954 ("kasan: print virtual mapping info in reports")

Three years.

> Reported-by: Yunseong Kim <ysk@...lloc.com>
> Signed-off-by: Yeoreum Yun <yeoreum.yun@....com>

Thanks, I'll queue this (with a cc:stable) for testing and I shall
await the conclusion of the ongoing review discussion.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ