All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] binder: fix TF_UPDATE_TXN supersede cleanup bugs
@ 2026-08-12 19:53 Tomer Pomeranc
  2026-08-12 19:53 ` [PATCH 1/2] binder: fix leaked fd fixups on TF_UPDATE_TXN supersede Tomer Pomeranc
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tomer Pomeranc @ 2026-08-12 19:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: gregkh, arve, tkjos, brauner, cmllamas, aliceryhl, stable,
	Tomer Pomeranc

Two bugs in the t_outdated cleanup path of binder_proc_transaction(),
both introduced by commit 9864bb480133 ("binder: add TF_UPDATE_TXN to
replace outdated txn"):

1. kfree(t_outdated) is called without binder_free_txn_fixups(),
   permanently leaking binder_txn_fd_fixup entries and their fget()'d
   struct file references. The refcount never reaches zero; the leak
   survives process exit and accumulates until file-max exhaustion.

2. binder_release_entire_buffer() is called with is_failure=false for
   a transaction that was never delivered. Since binder_apply_fd_fixups()
   was never called, the BINDER_TYPE_FDA handler reads stale buffer data
   as fd numbers and closes unrelated fds via binder_deferred_fd_close().

Confirmed on mainline Linux (6.8.0-124-generic, binder_linux module)
and Android (Pixel 8, kernel 6.1.124, /dev/hwbinder).

Tomer Pomeranc (2):
  binder: fix leaked fd fixups on TF_UPDATE_TXN supersede
  binder: fix is_failure flag for superseded transaction cleanup

 drivers/android/binder.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-12 21:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-08-12 21:30 ` [PATCH 0/2] binder: fix TF_UPDATE_TXN supersede cleanup bugs Carlos Llamas

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.