mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Ondrej Mosnáček" <omosnacek@gmail.com>,
	"Carlos Llamas" <cmllamas@google.com>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Christian Brauner" <christian@brauner.io>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"SElinux list" <selinux@vger.kernel.org>
Subject: Re: BUG: selinux-testsuite binder tests fail with CONFIG_ANDROID_BINDER_IPC_RUST=y
Date: Mon, 19 Oct 2026 14:06:11 +0000	[thread overview]
Message-ID: <atYj06gmgCa40q6T@google.com> (raw)
In-Reply-To: <2026101814-strut-endnote-a0b5@gregkh>

On Sun, Oct 18, 2026 at 06:53:49PM +0200, Greg Kroah-Hartman wrote:
> On Sun, Oct 18, 2026 at 06:36:04PM +0200, Ondrej Mosnáček wrote:
> > Hello Android binder maintainers,
> > 
> > Fedora Linux has recently enabled CONFIG_ANDROID_BINDER_IPC_RUST [1],
> > which turns out to cause the binder tests of selinux-testsuite [2] to
> > fail.
> > 
> > Minimal reproducer (no SELinux involved):
> > # git clone https://github.com/SELinuxProject/selinux-testsuite
> > # cd selinux-testsuite/tests/binder
> > # make
> > # ./init_binder.sh
> > # setenforce 0   ### <-- may be needed if SELinux is enabled
> > # ./manager -n &
> > # sleep 1
> > # ./service_provider -n &
> > # sleep 1
> > # ./client -n -c -r 3
> > Client ioctl BINDER_WRITE_READ error: Invalid argument
> > #
> > 
> > With only CONFIG_ANDROID_BINDER_IPC=y the last command succeeds.
> > 
> > The issue reproduces even on a kernel compiled from commit
> > eafedbc7c050, so it seems to date back to the origin of the Rust
> > implementation. I'm not sure if it's a bug in the new kernel code or
> > some bug/wrong assumption in the testsuite code - can you please look
> > into it?
> 
> Given that the "real" binder client works, perhaps the test is wrong and
> should be fixed?

Apparently there is a divergence of behavior if the SELinux permission
`binder { impersonate }` is granted to a process, though Android never
uses this permission anywhere.

Thanks for the report.

Alice

      reply	other threads:[~2026-10-19 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 16:36 Ondrej Mosnáček
2026-10-18 16:53 ` Greg Kroah-Hartman
2026-10-19 14:06   ` Alice Ryhl [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=atYj06gmgCa40q6T@google.com \
    --to=aliceryhl@google.com \
    --cc=arve@android.com \
    --cc=christian@brauner.io \
    --cc=cmllamas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=omosnacek@gmail.com \
    --cc=selinux@vger.kernel.org \
    --cc=tkjos@android.com \
    /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®