# CVE-2026-53034: bpf, sockmap: Fix af\_unix null-ptr-deref in proto update

> 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.16% (percentile 3, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2026-06-24T16:29:41.676Z
- **Modified:** 2026-11-06T17:18:02.340Z

## Who should check

- Anyone running Linux \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 75b7d3b3f8bd4e59eb3af1b11a43c64c0c2db6f4; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< a94d3dd78ee8b63e6b8ad629081c952c93ee5a10; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 4913c94a3adcdbb64c552110c0c243cb1fdbb317; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 041eb6348d73ee5e15fc8161f1eac5a6e8289ca0; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 37bfcd164161b47d00b1c3bd20adc816a6977ce0; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< dca38b7734d2ea00af4818ff3ae836fab33d5d5a
- Anyone running Linux 5.15

## Description

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

bpf, sockmap: Fix af\_unix null-ptr-deref in proto update

unix\_stream\_connect() sets sk\_state (\`WRITE\_ONCE(sk-\>sk\_state,
TCP\_ESTABLISHED)\`) \_before\_ it assigns a peer (\`unix\_peer(sk) = newsk\`).
sk\_state == TCP\_ESTABLISHED makes sock\_map\_sk\_state\_allowed() believe that
socket is properly set up, which would include having a defined peer. IOW,
there's a window when unix\_stream\_bpf\_update\_proto() can be called on
socket which still has unix\_peer(sk) == NULL.

         CPU0 bpf                            CPU1 connect
         --------                            ------------

                                WRITE\_ONCE(sk-\>sk\_state, TCP\_ESTABLISHED)
sock\_map\_sk\_state\_allowed(sk)
...
sk\_pair = unix\_peer(sk)
sock\_hold(sk\_pair)
                                sock\_hold(newsk)
                                smp\_mb\_\_after\_atomic()
                                unix\_peer(sk) = newsk

BUG: kernel NULL pointer dereference, address: 0000000000000080
RIP: 0010:unix\_stream\_bpf\_update\_proto+0xa0/0x1b0
Call Trace:
  sock\_map\_link+0x564/0x8b0
  sock\_map\_update\_common+0x6e/0x340
  sock\_map\_update\_elem\_sys+0x17d/0x240
  \_\_sys\_bpf+0x26db/0x3250
  \_\_x64\_sys\_bpf+0x21/0x30
  do\_syscall\_64+0x6b/0x3a0
  entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e

Initial idea was to move peer assignment \_before\_ the sk\_state update\[1\],
but that involved an additional memory barrier, and changing the hot path
was rejected.
Then a NULL check during proto update in unix\_stream\_bpf\_update\_proto() was
considered\[2\], but the follow-up discussion\[3\] focused on the root cause,
i.e. sockmap update taking a wrong lock. Or, more specifically, missing
unix\_state\_lock()\[4\].
In the end it was concluded that teaching sockmap about the af\_unix locking
would be unnecessarily complex\[5\].
Complexity aside, since BPF\_PROG\_TYPE\_SCHED\_CLS and BPF\_PROG\_TYPE\_SCHED\_ACT
are allowed to update sockmaps, sock\_map\_update\_elem() taking the unix
lock, as it is currently implemented in unix\_state\_lock():
spin\_lock(&unix\_sk(s)-\>lock), would be problematic. unix\_state\_lock() taken
in a process context, followed by a softirq-context TC BPF program
attempting to take the same spinlock -- deadlock\[6\].
This way we circled back to the peer check idea\[2\].

\[1\]: https://lore.kernel.org/netdev/ba5c50aa-1df4-40c2-ab33-a72022c5a32e@rbox.co/
\[2\]: https://lore.kernel.org/netdev/20240610174906.32921-1-kuniyu@amazon.com/
\[3\]: https://lore.kernel.org/netdev/7603c0e6-cd5b-452b-b710-73b64bd9de26@linux.dev/
\[4\]: https://lore.kernel.org/netdev/CAAVpQUA+8GL\_j63CaKb8hbxoL21izD58yr1NvhOhU=j+35+3og@mail.gmail.com/
\[5\]: https://lore.kernel.org/bpf/CAAVpQUAHijOMext28Gi10dSLuMzGYh+jK61Ujn+fZ-wvcODR2A@mail.gmail.com/
\[6\]: https://lore.kernel.org/bpf/dd043c69-4d03-46fe-8325-8f97101435cf@linux.dev/

Summary of scenarios where af\_unix/stream connect() may race a sockmap
update:

1. connect() vs. bpf(BPF\_MAP\_UPDATE\_ELEM), i.e. sock\_map\_update\_elem\_sys()

   Implemented NULL check is sufficient. Once assigned, socket peer won't
   be released until socket fd is released. And that's not an issue because
   sock\_map\_update\_elem\_sys() bumps fd refcnf.

2. connect() vs BPF program doing update

   Update restricted per verifier.c:may\_update\_sockmap() to

      BPF\_PROG\_TYPE\_TRACING/BPF\_TRACE\_ITER
      BPF\_PROG\_TYPE\_SOCK\_OPS (bpf\_sock\_map\_update() only)
      BPF\_PROG\_TYPE\_SOCKET\_FILTER
      BPF\_PROG\_TYPE\_SCHED\_CLS
      BPF\_PROG\_TYPE\_SCHED\_ACT
      BPF\_PROG\_TYPE\_XDP
      BPF\_PROG\_TYPE\_SK\_REUSEPORT
      BPF\_PROG\_TYPE\_FLOW\_DISSECTOR
      BPF\_PROG\_TYPE\_SK\_LOOKUP

   Plus one more race to consider:

            CPU0 bpf                            CPU1 connect
            --------                            ------------

                                   WRITE\_ONCE(sk-\>sk\_state, TCP\_ESTABLISHED)
   sock\_map\_sk\_state\_allowed(sk)
                                   sock\_hold(newsk)
                                   smp\_mb\_\_after\_atomic()
                
---truncated---

## Affected and fixed versions

- Linux: \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 75b7d3b3f8bd4e59eb3af1b11a43c64c0c2db6f4; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< a94d3dd78ee8b63e6b8ad629081c952c93ee5a10; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 4913c94a3adcdbb64c552110c0c243cb1fdbb317; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 041eb6348d73ee5e15fc8161f1eac5a6e8289ca0; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 37bfcd164161b47d00b1c3bd20adc816a6977ce0; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< dca38b7734d2ea00af4818ff3ae836fab33d5d5a (cvelist)
- Linux: 5.15 (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-2026-53034. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-53034.md
Affected: Linux >= c63829182c37c2d6d0608976d15fa61ebebe9e6b, < 75b7d3b3f8bd4e59eb3af1b11a43c64c0c2db6f4; >= c63829182c37c2d6d0608976d15fa61ebebe9e6b, < a94d3dd78ee8b63e6b8ad629081c952c93ee5a10; >= c63829182c37c2d6d0608976d15fa61ebebe9e6b, < 4913c94a3adcdbb64c552110c0c243cb1fdbb317; >= c63829182c37c2d6d060897…
Fixed in: Linux 75b7d3b3f8bd4e59eb3af1b11a43c64c0c2db6f4, Linux 4913c94a3adcdbb64c552110c0c243cb1fdbb317, Linux 041eb6348d73ee5e15fc8161f1eac5a6e8289ca0, Linux 37bfcd164161b47d00b1c3bd20adc816a6977ce0

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-53034 being exploited?

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

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

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

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

Linux \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 75b7d3b3f8bd4e59eb3af1b11a43c64c0c2db6f4; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< a94d3dd78ee8b63e6b8ad629081c952c93ee5a10; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 4913c94a3adcdbb64c552110c0c243cb1fdbb317; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 041eb6348d73ee5e15fc8161f1eac5a6e8289ca0; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< 37bfcd164161b47d00b1c3bd20adc816a6977ce0; \>= c63829182c37c2d6d0608976d15fa61ebebe9e6b, \< dca38b7734d2ea00af4818ff3ae836fab33d5d5a; Linux 5.15.

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

Yes. Fixed in Linux 75b7d3b3f8bd4e59eb3af1b11a43c64c0c2db6f4, Linux 4913c94a3adcdbb64c552110c0c243cb1fdbb317, Linux 041eb6348d73ee5e15fc8161f1eac5a6e8289ca0, Linux 37bfcd164161b47d00b1c3bd20adc816a6977ce0. No fix listed yet: follow the vendor advisory.

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

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/75b7d3b3f8bd4e59eb3af1b11a43c64c0c2db6f4>
- patch: <https://git.kernel.org/stable/c/a94d3dd78ee8b63e6b8ad629081c952c93ee5a10>
- patch: <https://git.kernel.org/stable/c/4913c94a3adcdbb64c552110c0c243cb1fdbb317>
- patch: <https://git.kernel.org/stable/c/041eb6348d73ee5e15fc8161f1eac5a6e8289ca0>
- patch: <https://git.kernel.org/stable/c/37bfcd164161b47d00b1c3bd20adc816a6977ce0>
- patch: <https://git.kernel.org/stable/c/dca38b7734d2ea00af4818ff3ae836fab33d5d5a>

## 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-53034>

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