From: Carlos Llamas <cmllamas@google.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kernel-team@android.com, linux-kernel@vger.kernel.org,
Suren Baghdasaryan <surenb@google.com>,
Carlos Llamas <cmllamas@google.com>,
Todd Kjos <tkjos@android.com>, Alice Ryhl <aliceryhl@google.com>
Subject: [PATCH v4 0/7] binder: fix issues with mremap()
Date: Tue, 1 Sep 2026 20:52:40 +0000 [thread overview]
Message-ID: <20260901205250.1638304-1-cmllamas@google.com> (raw)
This is a follow up series fixing some pre-existing issues found by
sashiko during a review of an unrelated patchset here:
https://sashiko.dev/#/patchset/20260813193433.3318288-1-surenb@google.com
The goal is to safely reject mremap() requests on binder's vma to
prevent pages from temporary leaking and accidental IPC tear-down.
Cc: Todd Kjos <tkjos@android.com>
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
--
v4:
- Also reject vma splitting. This closes loopholes wrt to partial
range munmap() that Sashiko pointed out.
- With splitting denied, we can go back to the simpler ->vm_start
check in op->close().
v3:
- Switch to a range-check in vm_ops->close() and protect against
partial munmap() as Sashiko points out.
https://lore.kernel.org/all/20260901163521.1355535-1-cmllamas@google.com/
v2:
- Set VM_DONTEXPAND in [1/5] and [2/5] per Sashiko's feedback.
- Check vma->vm_start to prevent incorrect ->close() in [3/5] per
Sashiko's feedback.
https://lore.kernel.org/all/20260901030419.470246-1-cmllamas@google.com/
v1:
https://lore.kernel.org/all/20260831224145.169403-1-cmllamas@google.com/
Carlos Llamas (7):
binder: set VM_DONTEXPAND
rust_binder: set VM_DONTEXPAND
binder: forbid vma splitting
rust_binder: forbid vma splitting
binder: check vma->vm_start in binder_vma_close()
binder: reject mremap()
rust_binder: reject mremap()
drivers/android/binder.c | 18 +++++++++++++++++-
drivers/android/binder/page_range.rs | 20 +++++++++++++++++---
drivers/android/binder/process.rs | 1 +
3 files changed, 35 insertions(+), 4 deletions(-)
--
2.55.0.966.g6673acef38-goog
next reply other threads:[~2026-09-01 20:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 20:52 Carlos Llamas [this message]
2026-09-01 20:52 ` [PATCH v4 1/7] binder: set VM_DONTEXPAND Carlos Llamas
2026-09-01 20:52 ` [PATCH v4 2/7] rust_binder: " Carlos Llamas
2026-09-01 20:52 ` [PATCH v4 3/7] binder: forbid vma splitting Carlos Llamas
2026-09-01 20:52 ` [PATCH v4 4/7] rust_binder: " Carlos Llamas
2026-09-01 20:52 ` [PATCH v4 5/7] binder: check vma->vm_start in binder_vma_close() Carlos Llamas
2026-09-02 12:50 ` Alice Ryhl
2026-09-02 16:25 ` Carlos Llamas
2026-09-03 7:57 ` Alice Ryhl
2026-09-03 22:12 ` Carlos Llamas
2026-09-04 9:49 ` Alice Ryhl
2026-09-01 20:52 ` [PATCH v4 6/7] binder: reject mremap() Carlos Llamas
2026-09-01 20:52 ` [PATCH v4 7/7] rust_binder: " Carlos Llamas
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=20260901205250.1638304-1-cmllamas@google.com \
--to=cmllamas@google.com \
--cc=aliceryhl@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=surenb@google.com \
--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®