Netdev List
 help / color / mirror / Atom feed
* [PATCH 0/3] af_unix: unix_stream_data_wait() fix and improvements
@ 2026-05-15 18:54 Jann Horn
  2026-05-15 18:54 ` [PATCH 1/3] af_unix: Fix UAF read of tail->len in unix_stream_data_wait() Jann Horn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jann Horn @ 2026-05-15 18:54 UTC (permalink / raw)
  To: Kuniyuki Iwashima, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman
  Cc: Hannes Frederic Sowa, netdev, linux-kernel, Jann Horn, stable

Patch 1 fixes a race condition that can lead to a UAF read in
unix_stream_data_wait(). This is a read-only UAF that doesn't have
particularly interesting security consequences, but should still be
fixed. This is a minimal fix, intended to be easy to backport.

Patch 2 cleans up and simplifies this code a bit more (at the cost of
taking the iolock during false wakeups).

Since patch 2 probably increases the impact of false wakeups,
patch 3 is a performance optimization to reduce false wakeups.

Signed-off-by: Jann Horn <jannh@google.com>
---
Jann Horn (3):
      af_unix: Fix UAF read of tail->len in unix_stream_data_wait()
      af_unix: Simplify unix_stream_data_wait()
      af_unix: prevent spurious reader wakeups by writer

 net/unix/af_unix.c | 66 +++++++++++++++++++-----------------------------------
 1 file changed, 23 insertions(+), 43 deletions(-)
---
base-commit: 70eda68668d1476b459b64e69b8f36659fa9dfa8
change-id: 20260515-unix-recv-wait-01b3a9cbacc4

--  
Jann Horn <jannh@google.com>


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

end of thread, other threads:[~2026-05-15 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 18:54 [PATCH 0/3] af_unix: unix_stream_data_wait() fix and improvements Jann Horn
2026-05-15 18:54 ` [PATCH 1/3] af_unix: Fix UAF read of tail->len in unix_stream_data_wait() Jann Horn
2026-05-15 18:54 ` [PATCH 2/3] af_unix: Simplify unix_stream_data_wait() Jann Horn
2026-05-15 18:54 ` [PATCH 3/3] af_unix: prevent spurious reader wakeups by writer Jann Horn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox