# CVE-2022-48970: af\_unix: Get user\_ns from in\_skb in unix\_diag\_get\_exact().

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-10-21T20:05:51.703Z
- **Modified:** 2026-06-17T05:16:44.623Z

## Who should check

- Anyone running Linux \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< c66d78aee55dab72c92020ebfbebc464d4f5dd2a; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< 575a6266f63dbb3b8eb1da03671451f0d81b8034; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< 5c014eb0ed6c8c57f483e94cc6e90f34ce426d91; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< 9c1d6f79a2c7b8221dcec27defc6dc461052ead4; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< b3abe42e94900bdd045c472f9c9be620ba5ce553
- Anyone running Linux 5.3

## Description

In the Linux kernel, the following vulnerability has been resolved:

af\_unix: Get user\_ns from in\_skb in unix\_diag\_get\_exact().

Wei Chen reported a NULL deref in sk\_user\_ns() \[0\]\[1\], and Paolo diagnosed
the root cause: in unix\_diag\_get\_exact(), the newly allocated skb does not
have sk. \[2\]

We must get the user\_ns from the NETLINK\_CB(in\_skb).sk and pass it to
sk\_diag\_fill().

\[0\]:
BUG: kernel NULL pointer dereference, address: 0000000000000270
\#PF: supervisor read access in kernel mode
\#PF: error\_code(0x0000) - not-present page
PGD 12bbce067 P4D 12bbce067 PUD 12bc40067 PMD 0
Oops: 0000 \[\#1\] PREEMPT SMP
CPU: 0 PID: 27942 Comm: syz-executor.0 Not tainted 6.1.0-rc5-next-20221118 \#2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014
RIP: 0010:sk\_user\_ns include/net/sock.h:920 \[inline\]
RIP: 0010:sk\_diag\_dump\_uid net/unix/diag.c:119 \[inline\]
RIP: 0010:sk\_diag\_fill+0x77d/0x890 net/unix/diag.c:170
Code: 89 ef e8 66 d4 2d fd c7 44 24 40 00 00 00 00 49 8d 7c 24 18 e8
54 d7 2d fd 49 8b 5c 24 18 48 8d bb 70 02 00 00 e8 43 d7 2d fd \<48\> 8b
9b 70 02 00 00 48 8d 7b 10 e8 33 d7 2d fd 48 8b 5b 10 48 8d
RSP: 0018:ffffc90000d67968 EFLAGS: 00010246
RAX: ffff88812badaa48 RBX: 0000000000000000 RCX: ffffffff840d481d
RDX: 0000000000000465 RSI: 0000000000000000 RDI: 0000000000000270
RBP: ffffc90000d679a8 R08: 0000000000000277 R09: 0000000000000000
R10: 0001ffffffffffff R11: 0001c90000d679a8 R12: ffff88812ac03800
R13: ffff88812c87c400 R14: ffff88812ae42210 R15: ffff888103026940
FS:  00007f08b4e6f700(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000270 CR3: 000000012c58b000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 \<TASK\>
 unix\_diag\_get\_exact net/unix/diag.c:285 \[inline\]
 unix\_diag\_handler\_dump+0x3f9/0x500 net/unix/diag.c:317
 \_\_sock\_diag\_cmd net/core/sock\_diag.c:235 \[inline\]
 sock\_diag\_rcv\_msg+0x237/0x250 net/core/sock\_diag.c:266
 netlink\_rcv\_skb+0x13e/0x250 net/netlink/af\_netlink.c:2564
 sock\_diag\_rcv+0x24/0x40 net/core/sock\_diag.c:277
 netlink\_unicast\_kernel net/netlink/af\_netlink.c:1330 \[inline\]
 netlink\_unicast+0x5e9/0x6b0 net/netlink/af\_netlink.c:1356
 netlink\_sendmsg+0x739/0x860 net/netlink/af\_netlink.c:1932
 sock\_sendmsg\_nosec net/socket.c:714 \[inline\]
 sock\_sendmsg net/socket.c:734 \[inline\]
 \_\_\_\_sys\_sendmsg+0x38f/0x500 net/socket.c:2476
 \_\_\_sys\_sendmsg net/socket.c:2530 \[inline\]
 \_\_sys\_sendmsg+0x197/0x230 net/socket.c:2559
 \_\_do\_sys\_sendmsg net/socket.c:2568 \[inline\]
 \_\_se\_sys\_sendmsg net/socket.c:2566 \[inline\]
 \_\_x64\_sys\_sendmsg+0x42/0x50 net/socket.c:2566
 do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
 do\_syscall\_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd
RIP: 0033:0x4697f9
Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48
89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \<48\> 3d
01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f08b4e6ec48 EFLAGS: 00000246 ORIG\_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 000000000077bf80 RCX: 00000000004697f9
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 00000000004d29e9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000077bf80
R13: 0000000000000000 R14: 000000000077bf80 R15: 00007ffdb36bc6c0
 \</TASK\>
Modules linked in:
CR2: 0000000000000270

\[1\]: https://lore.kernel.org/netdev/CAO4mrfdvyjFpokhNsiwZiP-wpdSD0AStcJwfKcKQdAALQ9\_2Qw@mail.gmail.com/
\[2\]: https://lore.kernel.org/netdev/e04315e7c90d9a75613f3993c2baf2d344eef7eb.camel@redhat.com/

## Affected and fixed versions

- Linux: \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< c66d78aee55dab72c92020ebfbebc464d4f5dd2a; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< 575a6266f63dbb3b8eb1da03671451f0d81b8034; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< 5c014eb0ed6c8c57f483e94cc6e90f34ce426d91; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< 9c1d6f79a2c7b8221dcec27defc6dc461052ead4; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< b3abe42e94900bdd045c472f9c9be620ba5ce553 (cvelist)
- Linux: 5.3 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-48970. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-48970.md
Affected: Linux >= cae9910e73446cac68a54e3a7b02aaa12b689026, < c66d78aee55dab72c92020ebfbebc464d4f5dd2a; >= cae9910e73446cac68a54e3a7b02aaa12b689026, < 575a6266f63dbb3b8eb1da03671451f0d81b8034; >= cae9910e73446cac68a54e3a7b02aaa12b689026, < 5c014eb0ed6c8c57f483e94cc6e90f34ce426d91; >= cae9910e73446cac68a54e3…
Fixed in: Linux 575a6266f63dbb3b8eb1da03671451f0d81b8034, Linux 5c014eb0ed6c8c57f483e94cc6e90f34ce426d91, Linux 9c1d6f79a2c7b8221dcec27defc6dc461052ead4

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-48970 being exploited?

There is no confirmed exploitation: CVE-2022-48970 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-48970?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-48970?

Linux \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< c66d78aee55dab72c92020ebfbebc464d4f5dd2a; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< 575a6266f63dbb3b8eb1da03671451f0d81b8034; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< 5c014eb0ed6c8c57f483e94cc6e90f34ce426d91; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< 9c1d6f79a2c7b8221dcec27defc6dc461052ead4; \>= cae9910e73446cac68a54e3a7b02aaa12b689026, \< b3abe42e94900bdd045c472f9c9be620ba5ce553; Linux 5.3.

### Is there a fix for CVE-2022-48970?

Yes. Fixed in Linux 575a6266f63dbb3b8eb1da03671451f0d81b8034, Linux 5c014eb0ed6c8c57f483e94cc6e90f34ce426d91, Linux 9c1d6f79a2c7b8221dcec27defc6dc461052ead4. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-48970?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/c66d78aee55dab72c92020ebfbebc464d4f5dd2a>
- patch: <https://git.kernel.org/stable/c/575a6266f63dbb3b8eb1da03671451f0d81b8034>
- patch: <https://git.kernel.org/stable/c/5c014eb0ed6c8c57f483e94cc6e90f34ce426d91>
- patch: <https://git.kernel.org/stable/c/9c1d6f79a2c7b8221dcec27defc6dc461052ead4>
- patch: <https://git.kernel.org/stable/c/b3abe42e94900bdd045c472f9c9be620ba5ce553>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-48970>

HTML: <https://flawdb.com/CVE-2022-48970> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-48970>
