Skip to content

af_unix: Fix a NULL deref in sk_diag_dump_uid().

Kuniyuki Iwashima netdev 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 0 repliesApplied 2/2

Changes in v2 from the cover letter

* Get user_ns from NETLINK_CB(in_skb).sk.
* Add test.

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2af_unix: Get user_ns from in_skb in unix_diag_get_exact().net/unix/diag.c+12 -80 repliesApplied
2/2af_unix: Add test for sock_diag and UDIAG_SHOW_UID.tools/testing/selftests/net/.gitignore tools/testing/selftests/net/af_unix/Makefile tools/testing/selftests/net/af_unix/diag_uid.c+180 -10 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchPaolo Abeni
1/2Diagnosed-by
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 net 0/2] af_unix: Fix a NULL deref in sk_diag_dump_uid().

The first patch fixes a NULL deref when we dump a AF_UNIX socket's UID, and the second patch adds a repro/test for such a case.

Changes:
v2:
* Get user_ns from NETLINK_CB(in_skb).sk.
* Add test.

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

Kuniyuki Iwashima (2):
af_unix: Get user_ns from in_skb in unix_diag_get_exact().
af_unix: Add test for sock_diag and UDIAG_SHOW_UID.

 net/unix/diag.c                               |  20 +-
 tools/testing/selftests/net/.gitignore        |   1 +
 tools/testing/selftests/net/af_unix/Makefile  |   2 +-
 .../testing/selftests/net/af_unix/diag_uid.c  | 178 ++++++++++++++++++
 4 files changed, 192 insertions(+), 9 deletions(-)
 create mode 100644 tools/testing/selftests/net/af_unix/diag_uid.c
Signature · 1 line
2.30.2