From: Carlos Llamas <cmllamas@google.com>
To: Hui Peng <benquike@gmail.com>
Cc: gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com,
brauner@kernel.org, aliceryhl@google.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] binder: restrict BINDER_NLGRP_REPORT to CAP_NET_ADMIN and fix binderfs minor leak
Date: Wed, 23 Sep 2026 20:52:09 +0000 [thread overview]
Message-ID: <arQ7-dwljFEN-8Pq@google.com> (raw)
In-Reply-To: <20260919213654.3317464-1-benquike@gmail.com>
On Sat, Sep 19, 2026 at 09:36:54PM +0000, Hui Peng wrote:
> Fix three security and resource-accounting issues in `binder_netlink.c`
> and `binderfs.c`:
>
> 1. In `drivers/android/binder_netlink.c`,
> `binder_nl_mcgrps[BINDER_NLGRP_REPORT]` is declared without `.flags =
> GENL_MCAST_CAP_NET_ADMIN`, allowing any unprivileged local user to
> subscribe to the `BINDER_NLGRP_REPORT` Generic Netlink multicast
> group and monitor system-wide binder transaction error reports
> (including sender/target PIDs and transaction metadata).
Yeap, the whole point is for selinux approved processes to subscribe to
these reports.
> 2. In `drivers/android/binderfs.c`, `binderfs_binder_ctl_create()`
> allocates an IDA minor via `ida_alloc_max(&binderfs_minors, ...)`,
> and if `d_alloc_name(root, "binder-control")` fails, jumps to `out:`
> (which calls `kfree(device)`) without freeing `minor` from
> `binderfs_minors`.
This is already fixed by:
https://lore.kernel.org/all/tencent_8D7B76C623DA3A29EE73D38217ACB08AFB09@qq.com/
> 3. When the `binder-control` inode (`device->context.name == NULL`) is
> evicted in `binderfs_evict_inode()`, `--info->device_count` is
> decremented even though `binderfs_binder_ctl_create()` never
> incremented `info->device_count`, underflowing `info->device_count`.
> Only decrement `info->device_count` when `device->context.name` is
> non-NULL.
I haven't looked closely at this one but it sounds like a real issue.
However, it would still need to be a separate patch, so please drop the
rest and please use the appropriate `Fixes:` tag.
Note this code has now been removed, but we may need to take the fix for
stable and downstream Android branches.
Thanks,
Carlos Llamas
prev parent reply other threads:[~2026-09-23 20:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 21:36 [PATCH] binder: restrict BINDER_NLGRP_REPORT to CAP_NET_ADMIN and fix binderfs minor leak Hui Peng
2026-09-20 5:01 ` Greg KH
2026-09-23 20:52 ` 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=arQ7-dwljFEN-8Pq@google.com \
--to=cmllamas@google.com \
--cc=aliceryhl@google.com \
--cc=arve@android.com \
--cc=benquike@gmail.com \
--cc=brauner@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@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 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.