From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Daniil Detkov <d4n11l@proton.me>
Cc: "Todd Kjos" <tkjos@android.com>,
"Carlos Llamas" <cmllamas@google.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"Arve Hjønnevåg" <arve@android.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Christian Brauner" <brauner@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Onur Özkan" <work@onurozkan.dev>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Tamir Duberstein" <tamird@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
linux-kernel@vger.kernel.org,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
rust-for-linux@vger.kernel.org,
"Danilo Krummrich" <dakr@kernel.org>
Subject: Re: [PATCH] rust_binder: enforce delivered death process ownership
Date: Thu, 1 Oct 2026 14:31:01 +0200 [thread overview]
Message-ID: <2026100132-recollect-crabbing-bcac@gregkh> (raw)
In-Reply-To: <LkLJ6kna_XlfWWj0zhJ4JNfzildMiCWFyD-Nfn2iFVvRINHEiDhrWZ2kXEPSz24jcoIGquTtxQDxnPxcULgZY10H4Usp6PGd5NkIu7ho5lk=@proton.me>
On Wed, Aug 05, 2026 at 02:28:38PM +0000, Daniil Detkov wrote:
> On Wednesday, August 5th, 2026 at 6:13 PM, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>
> > On Wed, Aug 05, 2026 at 05:50:56PM +0500, Daniil Detkov via B4 Relay wrote:
> > > From: Daniil Detkov <d4n11l@proton.me>
> > >
> > > The delivered_links field of NodeDeath may only be linked into the
> > > delivered_deaths list owned by NodeDeath::process. The existing safe
> > > ProcessInner::death_delivered method does not enforce that relationship,
> > > so safe Rust can violate the invariant relied on by a later unsafe list
> > > removal.
> > >
> > > Move the insertion boundary to Process and validate both the supplied
> > > guard and the NodeDeath owner before mutating the list. Keep the existing
> > > lock order and duplicate-insertion behavior unchanged.
> > >
> > > Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver")
> > > Closes: https://github.com/Rust-for-Linux/linux/issues/1238
> > > Assisted-by: Codex:5.6-Sol
> > > Signed-off-by: Daniil Detkov <d4n11l@proton.me>
> > > ---
> > > drivers/android/binder/node.rs | 6 +++++-
> > > drivers/android/binder/process.rs | 23 +++++++++++++++--------
> > > 2 files changed, 20 insertions(+), 9 deletions(-)
> >
> > Cool, how was this tested?
> >
> > thanks,
> >
> > greg k-h
> >
>
> Hi Greg,
>
> It was built and checked against rust-fixes with:
>
> make LLVM=1 CLIPPY=1 O=... -j32 drivers/android/binder/
> make LLVM=1 O=... rustfmtcheck
> make LLVM=1 O=... -j32 bzImage
>
> I booted the resulting x86_64 kernel with
> CONFIG_ANDROID_BINDER_IPC_RUST=y under QEMU/KVM, mounted the binder
> filesystem, opened the binder device, and verified that BINDER_VERSION
> returned protocol 8. The boot completed without a BUG, Oops, or panic.
>
> This covered the valid Binder open/ioctl path. The issue report contains
> an in-kernel PoC for the mismatched NodeDeath/Process insertion; I had
> not run that PoC when submitting v1.
>
> If it would be useful, I can also set up and run the in-kernel PoC from
> the report against both the pre-fix and patched trees.
You are going to have to at least exercise your new code changes, just
doing a version number isn't that much of a test :)
thanks,
greg k-h
prev parent reply other threads:[~2026-10-01 12:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 12:50 Daniil Detkov via B4 Relay
2026-08-05 13:13 ` Greg Kroah-Hartman
2026-08-05 14:28 ` Daniil Detkov
2026-10-01 12:31 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026100132-recollect-crabbing-bcac@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=arve@android.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=d4n11l@proton.me \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tkjos@android.com \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®