binder: fix issues with mremap()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest7 patches 5 repliesIn review
- v35 patches 1 replySuperseded
- v25 patches 2 repliesSuperseded
Changes in v4 from the cover letter
- 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().
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | binder: set VM_DONTEXPANDdrivers/ | +2 | 0 replies | |
| 2/7 | rust_binder: set VM_DONTEXPANDdrivers/ | +1 | 0 replies | |
| 3/7 | binder: forbid vma splittingdrivers/ | +6 | 0 replies | |
| 4/7 | rust_binder: forbid vma splittingdrivers/ | +12 | 0 replies | |
| 5/7 | binder: check vma->vm_start in binder_vma_close()drivers/ | +3 | 5 replies | |
| 6/7 | binder: reject mremap()drivers/ | +6 | 0 replies | |
| 7/7 | rust_binder: reject mremap()drivers/ | +5 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/7] binder: fix issues with mremap()
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/[email protected]
The goal is to safely reject mremap() requests on binder's vma to prevent pages from temporary leaking and accidental IPC tear-down.
--
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/[email protected]/
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/[email protected]/
v1:
https://lore.kernel.org/all/[email protected]/
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(-)
Signature · 1 line
2.55.0.966.g6673acef38-goog