[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221127012412.37969-1-kuniyu@amazon.com>
Date: Sun, 27 Nov 2022 10:24:10 +0900
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
CC: Felipe Gasper <felipe@...ipegasper.com>,
Wei Chen <harperchen1110@...il.com>,
Kuniyuki Iwashima <kuniyu@...zon.com>,
"Kuniyuki Iwashima" <kuni1840@...il.com>, <netdev@...r.kernel.org>
Subject: [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/20221122205811.20910-1-kuniyu@amazon.com/
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
--
2.30.2
Powered by blists - more mailing lists