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: <CAO9qdTHkk-4C59sv=B6ZPkcu4AmSNtuvFsdSWQNmwHoTXTCLmw@mail.gmail.com>
Date: Sat, 15 Feb 2025 14:00:23 +0900
From: Jeongjun Park <aha310510@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Liam.Howlett@...cle.com, brauner@...nel.org, lorenzo.stoakes@...cle.com, 
	willy@...radead.org, davidlohr.bueso@...com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipc: fix to protect IPCS lookups using RCU instead of semaphore

Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Sat, 15 Feb 2025 03:01:57 +0900 Jeongjun Park <aha310510@...il.com> wrote:
>
> > In shm_destroy_orphaned(), we are not performing updates to the IPCS and are
> > only calling idr_for_each(), which can be protected by the RCU read-critical
> > section.
> >
> > And if idr_for_each() is not protected by the RCU read-critical section,
> > then when radix_tree_node_free() is called to free the struct radix_tree_node
> > through call_rcu(), the node will be freed immediately, and when reading the
> > next node in radix_tree_for_each_slot(), the memory that has already been
> > freed may be read.
>
> A use-after-free?
>
> Is there any report of this occurring, or was this change a result of
> code inspection?  If the former, please share details (Link:,
> Reported-by:, Closes:, etc).

Reported-by: syzbot+a2b84e569d06ca3a949c@...kaller.appspotmail.com

Sorry I forgot the Reported-by tag. I think the vulnerability is caused by
misusing RCU. In addition, since it is a function that does not perform
an update operation, it is possible to protect it through RCU, so we can
safely get some performance small benefits by using RCU instead of
semaphore.

Regards,

Jeongjun Park

>
> > Therefore, I think it is appropriate to use RCU instead of semaphore to
> > protect it.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ