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: <20250713232740.GA18327@system.software.com>
Date: Mon, 14 Jul 2025 08:27:40 +0900
From: Byungchul Park <byungchul@...com>
To: Yeo Reum Yun <YeoReum.Yun@....com>
Cc: Andrey Konovalov <andreyknvl@...il.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"glider@...gle.com" <glider@...gle.com>,
	"dvyukov@...gle.com" <dvyukov@...gle.com>,
	Vincenzo Frascino <Vincenzo.Frascino@....com>,
	"bigeasy@...utronix.de" <bigeasy@...utronix.de>,
	"clrkwllms@...nel.org" <clrkwllms@...nel.org>,
	"rostedt@...dmis.org" <rostedt@...dmis.org>,
	"max.byungchul.park@...il.com" <max.byungchul.park@...il.com>,
	"ysk@...lloc.com" <ysk@...lloc.com>,
	"kasan-dev@...glegroups.com" <kasan-dev@...glegroups.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-rt-devel@...ts.linux.dev" <linux-rt-devel@...ts.linux.dev>,
	"kernel_team@...ynix.com" <kernel_team@...ynix.com>,
	"urezki@...il.com" <urezki@...il.com>
Subject: Re: [PATCH v2] kasan: remove kasan_find_vm_area() to prevent
 possible deadlock

On Sat, Jul 12, 2025 at 03:46:10PM +0000, Yeo Reum Yun wrote:
> Hi ByungChul,
> 
> [...]
> > I checked the critical section by &vn->busy.lock in find_vm_area().  The
> > time complextity looks O(log N).  I don't think an irq disabled section
> > of O(log N) is harmful.  I still think using
> > spin_lock_irqsave(&vn->busy.lock) can resolve this issue with no worry
> > of significant irq delay.  Am I missing something?
> 
> I don't agree for this.
> since in PREEMPT_RT case, it has the same problem.
> 
> In case of PREEMPT_RT, spin_lock_irqsave() becomes rt_spin_lock() which is sleepable.
> But, KASAN calls "rt_spin_lock()" holding raw_spin_lock_irqsave() which is definitely wrong.

It's another issue than irq handling latency, but it's about lock usage
correctness.  You are right.

	Byungchul

> But as Uladzislau said, without reference count manage, UAF can always happen.
> IOW, If KASAN to dump vm information, I think we need:
>     1. manage reference for vmap_area.
>     2. find_vm_area() with rcu version.
> 
> 
> Thanks.
> 
> --
> Sincerely,
> Yeoreum Yun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ