]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust_binder: add additional alignment checks
authorAlice Ryhl <aliceryhl@google.com>
Fri, 23 Jan 2026 16:23:56 +0000 (16:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jan 2026 15:29:48 +0000 (16:29 +0100)
commitd047248190d86a52164656d47bec9bfba61dc71e
tree2ae850918fd83ae278bc7fc511b51114321e6ef5
parent5e8a3d01544282e50d887d76f30d1496a0a53562
rust_binder: add additional alignment checks

This adds some alignment checks to match C Binder more closely. This
causes the driver to reject more transactions. I don't think any of the
transactions in question are harmful, but it's still a bug because it's
the wrong uapi to accept them.

The cases where usize is changed for u64, it will affect only 32-bit
kernels.

Cc: stable@vger.kernel.org
Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver")
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Link: https://patch.msgid.link/20260123-binder-alignment-more-checks-v1-1-7e1cea77411d@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder/thread.rs