Skip to content

af_unix: Correct manage_oob() when OOB follows a consumed OOB.

Kuniyuki Iwashima netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4af_unix: Remove single nest in manage_oob().net/unix/af_unix.c+23 -220 repliesApplied
2/4af_unix: Rename unlinked_skb in manage_oob().net/unix/af_unix.c+6 -60 repliesApplied
3/4af_unix: Move spin_lock() in manage_oob().net/unix/af_unix.c+7 -80 repliesApplied
4/4af_unix: Don't return OOB skb in manage_oob().net/unix/af_unix.c tools/testing/selftests/net/af_unix/msg_oob.c+30 -20 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 net-next 0/4] af_unix: Correct manage_oob() when OOB follows a consumed OOB.

Recently syzkaller reported UAF of OOB skb.

The bug was introduced by commit 93c99f21db36 ("af_unix: Don't stop recv(MSG_DONTWAIT) if consumed OOB skb is at the head.") but uncovered by another recent commit 8594d9b85c07 ("af_unix: Don't call skb_get() for OOB skb.").

This should be targeted for net.git, but it will introduce conflicts. Given it's now rc6, I'll target this for net-next and later send 8594d9b85c07 and this series for stable.

[0]: https://lore.kernel.org/netdev/[email protected]/

Kuniyuki Iwashima (4):
af_unix: Remove single nest in manage_oob().
af_unix: Rename unlinked_skb in manage_oob().
af_unix: Move spin_lock() in manage_oob().
af_unix: Don't return OOB skb in manage_oob().

 net/unix/af_unix.c                            | 61 ++++++++++---------
 tools/testing/selftests/net/af_unix/msg_oob.c | 23 +++++++
 2 files changed, 56 insertions(+), 28 deletions(-)
Signature · 1 line
2.30.2