# CVE-2026-52938: bpf: Fix NULL pointer dereference in bpf\_sk\_storage\_clone and diag paths

> 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.14% (percentile 2, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2026-06-24T07:14:27.952Z
- **Modified:** 2026-07-08T19:19:19.627Z

## Who should check

- Anyone running Linux \>= 5d800f87d0a5ea1b156c47a4b9fd128479335153, \< 16af24fea29c209dea53595c99f6da9398548e1b; \>= 5d800f87d0a5ea1b156c47a4b9fd128479335153, \< 375e4e33c18dfa05c5dfd5f3dfffeb29343dd4c7
- Anyone running Linux 7.0

## Description

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

bpf: Fix NULL pointer dereference in bpf\_sk\_storage\_clone and diag paths

bpf\_selem\_unlink\_nofail() sets SDATA(selem)-\>smap to NULL before
removing the selem from the storage hlist. A concurrent RCU reader in
bpf\_sk\_storage\_clone() can observe the selem still on the list with
smap already NULL, causing a NULL pointer dereference.

 general protection fault, probably for non-canonical address 0xdffffc000000000a:
 KASAN: null-ptr-deref in range \[0x0000000000000050-0x0000000000000057\]
 RIP: 0010:bpf\_sk\_storage\_clone+0x1cd/0xaa0 net/core/bpf\_sk\_storage.c:174
 Call Trace:
  \<IRQ\>
  sk\_clone+0xfed/0x1980 net/core/sock.c:2591
  inet\_csk\_clone\_lock+0x30/0x760 net/ipv4/inet\_connection\_sock.c:1222
  tcp\_create\_openreq\_child+0x35/0x2680 net/ipv4/tcp\_minisocks.c:571
  tcp\_v4\_syn\_recv\_sock+0x123/0xf90 net/ipv4/tcp\_ipv4.c:1729
  tcp\_check\_req+0x8e1/0x2580 include/net/tcp.h:855
  tcp\_v4\_rcv+0x1845/0x3b80 net/ipv4/tcp\_ipv4.c:2347

Add a NULL check for smap in bpf\_sk\_storage\_clone().

bpf\_sk\_storage\_diag\_put\_all() has the same issue. Add a NULL check
and pass the validated smap directly to diag\_get(), which is refactored
to take smap as a parameter instead of reading it internally.

bpf\_sk\_storage\_diag\_put() uses diag-\>maps\[i\] which is always valid
under its refcount, so diag-\>maps\[i\] is passed directly to diag\_get().

## Affected and fixed versions

- Linux: \>= 5d800f87d0a5ea1b156c47a4b9fd128479335153, \< 16af24fea29c209dea53595c99f6da9398548e1b; \>= 5d800f87d0a5ea1b156c47a4b9fd128479335153, \< 375e4e33c18dfa05c5dfd5f3dfffeb29343dd4c7 (cvelist)
- Linux: 7.0 (cvelist)

## Mitigation

- Upgrade Linux to 375e4e33c18dfa05c5dfd5f3dfffeb29343dd4c7 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-52938.md
Affected: Linux >= 5d800f87d0a5ea1b156c47a4b9fd128479335153, < 16af24fea29c209dea53595c99f6da9398548e1b; >= 5d800f87d0a5ea1b156c47a4b9fd128479335153, < 375e4e33c18dfa05c5dfd5f3dfffeb29343dd4c7; Linux 7.0
Fixed in: Linux 16af24fea29c209dea53595c99f6da9398548e1b, Linux 375e4e33c18dfa05c5dfd5f3dfffeb29343dd4c7

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-2026-52938 being exploited?

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

### How serious is CVE-2026-52938?

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

### Which versions are affected by CVE-2026-52938?

Linux \>= 5d800f87d0a5ea1b156c47a4b9fd128479335153, \< 16af24fea29c209dea53595c99f6da9398548e1b; \>= 5d800f87d0a5ea1b156c47a4b9fd128479335153, \< 375e4e33c18dfa05c5dfd5f3dfffeb29343dd4c7; Linux 7.0.

### Is there a fix for CVE-2026-52938?

Yes. Fixed in Linux 16af24fea29c209dea53595c99f6da9398548e1b, Linux 375e4e33c18dfa05c5dfd5f3dfffeb29343dd4c7. Upgrade Linux to 375e4e33c18dfa05c5dfd5f3dfffeb29343dd4c7 or later.

### How do I check if I'm affected by CVE-2026-52938?

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/16af24fea29c209dea53595c99f6da9398548e1b>
- patch: <https://git.kernel.org/stable/c/375e4e33c18dfa05c5dfd5f3dfffeb29343dd4c7>

## 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-2026-52938>

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