Skip to content

binder: Prevent untranslated sender data from being copied to target

Todd Kjos lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesIn review
  2. v13 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- add "binder: fix handling of error during copy" to fix bug noticed by Dan Carpenter
- address Dan Carpenter's comments

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4binder: fix handling of error during copydrivers/android/binder.c+2 -21 reply
2/4binder: avoid potential data leakage when copying txndrivers/android/binder.c+70 -241 reply
3/4binder: read pre-translated fds from sender bufferdrivers/android/binder.c+32 -71 reply
4/4binder: defer copies of pre-patched txn datadrivers/android/binder.c+274 -250 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchMartijn CoenenChristian Brauner
1/4A-b
2/4R-b A-b
3/4R-b A-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] binder: Prevent untranslated sender data from being copied to target

Binder copies transactions directly from the sender buffer to the target buffer and then fixes up BINDER_TYPE_PTR and BINDER_TYPE_FDA objects. This means there is a brief time when sender pointers and fds are visible to the target process.

This series reworks the the sender to target copy to avoid leaking any untranslated sender data from being visible in the target.

Todd Kjos (4):
binder: binder: fix handling of error during copy
binder: defer copies of pre-patched txn data
binder: read pre-translated fds from sender buffer
binder: avoid potential data leakage when copying txn

v2:
- add "binder: fix handling of error during copy" to fix bug noticed by Dan Carpenter
- address Dan Carpenter's comments

 drivers/android/binder.c | 442 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 387 insertions(+), 55 deletions(-)