All of lore.kernel.org
 help / color / mirror / Atom feed
From: Todd Kjos <tkjos@google.com>
To: tkjos@google.com, gregkh@linuxfoundation.org,
	christian@brauner.io, arve@android.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	maco@google.com
Cc: joel@joelfernandes.org, kernel-team@android.com, avakj45@gmail.com
Subject: [PATCH v2 0/4] binder: Prevent untranslated sender data from being copied to target
Date: Tue, 30 Nov 2021 10:51:48 -0800	[thread overview]
Message-ID: <20211130185152.437403-1-tkjos@google.com> (raw)

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(-)

             reply	other threads:[~2021-11-30 18:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 18:51 Todd Kjos [this message]
2021-11-30 18:51 ` [PATCH v2 1/4] binder: fix handling of error during copy Todd Kjos
2021-12-01 13:49   ` Christian Brauner
2021-11-30 18:51 ` [PATCH v2 2/4] binder: avoid potential data leakage when copying txn Todd Kjos
2021-12-01 13:54   ` Christian Brauner
2021-11-30 18:51 ` [PATCH v2 3/4] binder: read pre-translated fds from sender buffer Todd Kjos
2021-12-01 13:58   ` Christian Brauner
2021-11-30 18:51 ` [PATCH v2 4/4] binder: defer copies of pre-patched txn data Todd Kjos
2021-12-01  6:13 ` [PATCH v2 0/4] binder: Prevent untranslated sender data from being copied to target Dan Carpenter

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=20211130185152.437403-1-tkjos@google.com \
    --to=tkjos@google.com \
    --cc=arve@android.com \
    --cc=avakj45@gmail.com \
    --cc=christian@brauner.io \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@joelfernandes.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@google.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.