From: Carlos Llamas <cmllamas@google.com>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] rust_binder: report EINVAL for unknown handles
Date: Sat, 21 Nov 2026 18:34:12 +0000 [thread overview]
Message-ID: <awHkJIAjp7FuTxia@google.com> (raw)
In-Reply-To: <20261118-binder-unknown-einval-v1-1-ef4ece277b26@google.com>
On Wed, Nov 18, 2026 at 11:25:40AM +0000, Alice Ryhl wrote:
> Currently unknown handles are reported as ENOENT, which userspace
> doesn't treat as a fatal error. However, providing the wrong handle is a
> fatal API violation, and indicates UAF in the userspace process.
>
> Thus, change it to EINVAL to match C Binder and make userspace treat it
> as a fatal error.
>
> Cc: stable@vger.kernel.org
> Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver")
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
> drivers/android/binder/process.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/android/binder/process.rs b/drivers/android/binder/process.rs
> index e97213250beb..406d80cfff08 100644
> --- a/drivers/android/binder/process.rs
> +++ b/drivers/android/binder/process.rs
> @@ -958,7 +958,7 @@ pub(crate) fn get_node_from_handle(&self, handle: u32, strong: bool) -> Result<N
> .lock()
> .by_handle
> .get_mut(&handle)
> - .ok_or(ENOENT)?
> + .ok_or(EINVAL)?
> .node_ref()
> .clone(strong)
> }
>
> ---
> base-commit: 917fcbf033154a6c8d83cfa6c88f012b71eb37b2
> change-id: 20261029-binder-unknown-einval-10407d1ebb1e
>
> Best regards,
> --
> Alice Ryhl <aliceryhl@google.com>
>
LGTM,
Acked-by: Carlos Llamas <cmllamas@google.com>
prev parent reply other threads:[~2026-11-21 18:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 11:25 [PATCH] rust_binder: report EINVAL for unknown handles Alice Ryhl
2026-11-21 18:34 ` Carlos Llamas [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=awHkJIAjp7FuTxia@google.com \
--to=cmllamas@google.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tamird@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.