From: Carlos Llamas <cmllamas@google.com>
To: Tomer Pomeranc <tomerpo@gmail.com>
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
arve@android.com, tkjos@android.com, brauner@kernel.org,
aliceryhl@google.com, stable@vger.kernel.org
Subject: Re: [PATCH 2/2] binder: fix is_failure flag for superseded transaction cleanup
Date: Wed, 12 Aug 2026 21:31:24 +0000 [thread overview]
Message-ID: <anzmLD9snZS3Ul66@google.com> (raw)
In-Reply-To: <20260812195316.259136-3-tomerpo@gmail.com>
On Wed, Aug 12, 2026 at 10:53:16PM +0300, Tomer Pomeranc wrote:
> When a TF_UPDATE_TXN transaction supersedes a pending async transaction,
> binder_release_entire_buffer() is called with is_failure=false. Since the
> superseded transaction was never delivered, binder_apply_fd_fixups() was
> never called and no fds were installed in the target process.
>
> With is_failure=false, the BINDER_TYPE_FDA cleanup handler interprets
> stale buffer contents as installed fd numbers and passes them to
> binder_deferred_fd_close(), closing unrelated file descriptors.
>
> Pass is_failure=true since the transaction was never delivered to the
> target, matching the semantics of all other undelivered-transaction
> cleanup paths.
>
> Fixes: 9864bb480133 ("binder: add TF_UPDATE_TXN to replace outdated txn")
> Cc: stable@vger.kernel.org
> Signed-off-by: Tomer Pomeranc <tomerpo@gmail.com>
> ---
> drivers/android/binder.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> index f70aeb63a..bc8bc9ee4 100644
> --- a/drivers/android/binder.c
> +++ b/drivers/android/binder.c
> @@ -2930,7 +2930,7 @@ static int binder_proc_transaction(struct binder_transaction *t,
> t_outdated->buffer = NULL;
> buffer->transaction = NULL;
> trace_binder_transaction_update_buffer_release(buffer);
> - binder_release_entire_buffer(proc, NULL, buffer, false);
> + binder_release_entire_buffer(proc, NULL, buffer, true);
> binder_alloc_free_buf(&proc->alloc, buffer);
> binder_free_txn_fixups(t_outdated);
> kfree(t_outdated);
> --
> 2.34.1
>
Thanks,
Acked-by: Carlos Llamas <cmllamas@google.com>
next prev parent reply other threads:[~2026-08-12 21:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 19:53 [PATCH 0/2] binder: fix TF_UPDATE_TXN supersede cleanup bugs Tomer Pomeranc
2026-08-12 19:53 ` [PATCH 1/2] binder: fix leaked fd fixups on TF_UPDATE_TXN supersede Tomer Pomeranc
2026-08-12 21:31 ` Carlos Llamas
2026-08-12 19:53 ` [PATCH 2/2] binder: fix is_failure flag for superseded transaction cleanup Tomer Pomeranc
2026-08-12 21:31 ` Carlos Llamas [this message]
2026-08-12 21:30 ` [PATCH 0/2] binder: fix TF_UPDATE_TXN supersede cleanup bugs 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=anzmLD9snZS3Ul66@google.com \
--to=cmllamas@google.com \
--cc=aliceryhl@google.com \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tkjos@android.com \
--cc=tomerpo@gmail.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.