# CVE-2023-53198: raw: Fix NULL deref in raw\_get\_next().

> 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.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-09-15T14:06:47.761Z
- **Modified:** 2026-11-05T21:17:18.747Z

## Who should check

- Anyone running Linux \>= 0daf07e527095e64ee8927ce297ab626643e9f51, \< b34056bedf04d08ef24f713a7f93bad1274a838d; \>= 0daf07e527095e64ee8927ce297ab626643e9f51, \< 67daeaecd70ef20ab540c21739d3f633734967a1; \>= 0daf07e527095e64ee8927ce297ab626643e9f51, \< 0a78cf7264d29abeca098eae0b188a10aabc8a32; 648067dd541591a0ddaa31afaaf4a7655d33c0d8; 04309b5f5d8dd77996b19ae6be8f42f9fc1679a0; \>= 5.18.18, \< 5.19; \>= 5.19.2, \< 5.20
- Anyone running Linux 6.0

## Description

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

raw: Fix NULL deref in raw\_get\_next().

Dae R. Jeong reported a NULL deref in raw\_get\_next() \[0\].

It seems that the repro was running these sequences in parallel so
that one thread was iterating on a socket that was being freed in
another netns.

  unshare(0x40060200)
  r0 = syz\_open\_procfs(0x0, &(0x7f0000002080)='net/raw\\x00')
  socket$inet\_icmp\_raw(0x2, 0x3, 0x1)
  pread64(r0, &(0x7f0000000000)=""/10, 0xa, 0x10000000007f)

After commit 0daf07e52709 ("raw: convert raw sockets to RCU"), we
use RCU and hlist\_nulls\_for\_each\_entry() to iterate over SOCK\_RAW
sockets.  However, we should use spinlock for slow paths to avoid
the NULL deref.

Also, SOCK\_RAW does not use SLAB\_TYPESAFE\_BY\_RCU, and the slab object
is not reused during iteration in the grace period.  In fact, the
lockless readers do not check the nulls marker with get\_nulls\_value().
So, SOCK\_RAW should use hlist instead of hlist\_nulls.

Instead of adding an unnecessary barrier by sk\_nulls\_for\_each\_rcu(),
let's convert hlist\_nulls to hlist and use sk\_for\_each\_rcu() for
fast paths and sk\_for\_each() and spinlock for /proc/net/raw.

\[0\]:
general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 \[\#1\] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range \[0x0000000000000028-0x000000000000002f\]
CPU: 2 PID: 20952 Comm: syz-executor.0 Not tainted 6.2.0-g048ec869bafd-dirty \#7
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014
RIP: 0010:read\_pnet include/net/net\_namespace.h:383 \[inline\]
RIP: 0010:sock\_net include/net/sock.h:649 \[inline\]
RIP: 0010:raw\_get\_next net/ipv4/raw.c:974 \[inline\]
RIP: 0010:raw\_get\_idx net/ipv4/raw.c:986 \[inline\]
RIP: 0010:raw\_seq\_start+0x431/0x800 net/ipv4/raw.c:995
Code: ef e8 33 3d 94 f7 49 8b 6d 00 4c 89 ef e8 b7 65 5f f7 49 89 ed 49 83 c5 98 0f 84 9a 00 00 00 48 83 c5 c8 48 89 e8 48 c1 e8 03 \<42\> 80 3c 30 00 74 08 48 89 ef e8 00 3d 94 f7 4c 8b 7d 00 48 89 ef
RSP: 0018:ffffc9001154f9b0 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 1ffff1100302c8fd RCX: 0000000000000000
RDX: 0000000000000028 RSI: ffffc9001154f988 RDI: ffffc9000f77a338
RBP: 0000000000000029 R08: ffffffff8a50ffb4 R09: fffffbfff24b6bd9
R10: fffffbfff24b6bd9 R11: 0000000000000000 R12: ffff88801db73b78
R13: fffffffffffffff9 R14: dffffc0000000000 R15: 0000000000000030
FS:  00007f843ae8e700(0000) GS:ffff888063700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055bb9614b35f CR3: 000000003c672000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 \<TASK\>
 seq\_read\_iter+0x4c6/0x10f0 fs/seq\_file.c:225
 seq\_read+0x224/0x320 fs/seq\_file.c:162
 pde\_read fs/proc/inode.c:316 \[inline\]
 proc\_reg\_read+0x23f/0x330 fs/proc/inode.c:328
 vfs\_read+0x31e/0xd30 fs/read\_write.c:468
 ksys\_pread64 fs/read\_write.c:665 \[inline\]
 \_\_do\_sys\_pread64 fs/read\_write.c:675 \[inline\]
 \_\_se\_sys\_pread64 fs/read\_write.c:672 \[inline\]
 \_\_x64\_sys\_pread64+0x1e9/0x280 fs/read\_write.c:672
 do\_syscall\_x64 arch/x86/entry/common.c:51 \[inline\]
 do\_syscall\_64+0x4e/0xa0 arch/x86/entry/common.c:82
 entry\_SYSCALL\_64\_after\_hwframe+0x63/0xcd
RIP: 0033:0x478d29
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:00007f843ae8dbe8 EFLAGS: 00000246 ORIG\_RAX: 0000000000000011
RAX: ffffffffffffffda RBX: 0000000000791408 RCX: 0000000000478d29
RDX: 000000000000000a RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00000000f477909a R08: 0000000000000000 R09: 0000000000000000
R10: 000010000000007f R11: 0000000000000246 R12: 0000000000791740
R13: 0000000000791414 R14: 0000000000791408 R15: 00007ffc2eb48a50
 \</TASK\>
Modules linked in:
---\[ end trace 0000000000000000 \]---
RIP: 0010
---truncated---

## Affected and fixed versions

- Linux: \>= 0daf07e527095e64ee8927ce297ab626643e9f51, \< b34056bedf04d08ef24f713a7f93bad1274a838d; \>= 0daf07e527095e64ee8927ce297ab626643e9f51, \< 67daeaecd70ef20ab540c21739d3f633734967a1; \>= 0daf07e527095e64ee8927ce297ab626643e9f51, \< 0a78cf7264d29abeca098eae0b188a10aabc8a32; 648067dd541591a0ddaa31afaaf4a7655d33c0d8; 04309b5f5d8dd77996b19ae6be8f42f9fc1679a0; \>= 5.18.18, \< 5.19; \>= 5.19.2, \< 5.20 (cvelist)
- Linux: 6.0 (cvelist)

## Mitigation

- Upgrade Linux to 5.20 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-53198.md
Affected: Linux >= 0daf07e527095e64ee8927ce297ab626643e9f51, < b34056bedf04d08ef24f713a7f93bad1274a838d; >= 0daf07e527095e64ee8927ce297ab626643e9f51, < 67daeaecd70ef20ab540c21739d3f633734967a1; >= 0daf07e527095e64ee8927ce297ab626643e9f51, < 0a78cf7264d29abeca098eae0b188a10aabc8a32; 648067dd541591a0ddaa31afaa…
Fixed in: Linux 67daeaecd70ef20ab540c21739d3f633734967a1, Linux 0a78cf7264d29abeca098eae0b188a10aabc8a32, Linux 5.19, Linux 5.20

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-2023-53198 being exploited?

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

### How serious is CVE-2023-53198?

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

### Which versions are affected by CVE-2023-53198?

Linux \>= 0daf07e527095e64ee8927ce297ab626643e9f51, \< b34056bedf04d08ef24f713a7f93bad1274a838d; \>= 0daf07e527095e64ee8927ce297ab626643e9f51, \< 67daeaecd70ef20ab540c21739d3f633734967a1; \>= 0daf07e527095e64ee8927ce297ab626643e9f51, \< 0a78cf7264d29abeca098eae0b188a10aabc8a32; 648067dd541591a0ddaa31afaaf4a7655d33c0d8; 04309b5f5d8dd77996b19ae6be8f42f9fc1679a0; \>= 5.18.18, \< 5.19; \>= 5.19.2, \< 5.20; Linux 6.0.

### Is there a fix for CVE-2023-53198?

Yes. Fixed in Linux 67daeaecd70ef20ab540c21739d3f633734967a1, Linux 0a78cf7264d29abeca098eae0b188a10aabc8a32, Linux 5.19, Linux 5.20. Upgrade Linux to 5.20 or later.

### How do I check if I'm affected by CVE-2023-53198?

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/b34056bedf04d08ef24f713a7f93bad1274a838d>
- patch: <https://git.kernel.org/stable/c/67daeaecd70ef20ab540c21739d3f633734967a1>
- patch: <https://git.kernel.org/stable/c/0a78cf7264d29abeca098eae0b188a10aabc8a32>

## 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-2023-53198>

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