# CVE-2024-36938: bpf, skmsg: Fix NULL pointer dereference in sk\_psock\_skb\_ingress\_enqueue

> 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.31% (percentile 16, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2024-05-30T15:29:26.929Z
- **Modified:** 2026-06-17T07:37:24.343Z

## Who should check

- Anyone running Linux \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< c0809c128dad4c3413818384eb06a341633db973; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 5965bc7535fb87510b724e5465ccc1a1cf00916d; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 39dc9e1442385d6e9be0b6491ee488dddd55ae27; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< b397a0ab8582c533ec0c6b732392f141fc364f87; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 772d5729b5ff0df0d37b32db600ce635b2172f80; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 6648e613226e18897231ab5e42ffc29e63fa3365
- Anyone running Linux 4.20

## Description

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

bpf, skmsg: Fix NULL pointer dereference in sk\_psock\_skb\_ingress\_enqueue

Fix NULL pointer data-races in sk\_psock\_skb\_ingress\_enqueue() which
syzbot reported \[1\].

\[1\]
BUG: KCSAN: data-race in sk\_psock\_drop / sk\_psock\_skb\_ingress\_enqueue

write to 0xffff88814b3278b8 of 8 bytes by task 10724 on cpu 1:
 sk\_psock\_stop\_verdict net/core/skmsg.c:1257 \[inline\]
 sk\_psock\_drop+0x13e/0x1f0 net/core/skmsg.c:843
 sk\_psock\_put include/linux/skmsg.h:459 \[inline\]
 sock\_map\_close+0x1a7/0x260 net/core/sock\_map.c:1648
 unix\_release+0x4b/0x80 net/unix/af\_unix.c:1048
 \_\_sock\_release net/socket.c:659 \[inline\]
 sock\_close+0x68/0x150 net/socket.c:1421
 \_\_fput+0x2c1/0x660 fs/file\_table.c:422
 \_\_fput\_sync+0x44/0x60 fs/file\_table.c:507
 \_\_do\_sys\_close fs/open.c:1556 \[inline\]
 \_\_se\_sys\_close+0x101/0x1b0 fs/open.c:1541
 \_\_x64\_sys\_close+0x1f/0x30 fs/open.c:1541
 do\_syscall\_64+0xd3/0x1d0
 entry\_SYSCALL\_64\_after\_hwframe+0x6d/0x75

read to 0xffff88814b3278b8 of 8 bytes by task 10713 on cpu 0:
 sk\_psock\_data\_ready include/linux/skmsg.h:464 \[inline\]
 sk\_psock\_skb\_ingress\_enqueue+0x32d/0x390 net/core/skmsg.c:555
 sk\_psock\_skb\_ingress\_self+0x185/0x1e0 net/core/skmsg.c:606
 sk\_psock\_verdict\_apply net/core/skmsg.c:1008 \[inline\]
 sk\_psock\_verdict\_recv+0x3e4/0x4a0 net/core/skmsg.c:1202
 unix\_read\_skb net/unix/af\_unix.c:2546 \[inline\]
 unix\_stream\_read\_skb+0x9e/0xf0 net/unix/af\_unix.c:2682
 sk\_psock\_verdict\_data\_ready+0x77/0x220 net/core/skmsg.c:1223
 unix\_stream\_sendmsg+0x527/0x860 net/unix/af\_unix.c:2339
 sock\_sendmsg\_nosec net/socket.c:730 \[inline\]
 \_\_sock\_sendmsg+0x140/0x180 net/socket.c:745
 \_\_\_\_sys\_sendmsg+0x312/0x410 net/socket.c:2584
 \_\_\_sys\_sendmsg net/socket.c:2638 \[inline\]
 \_\_sys\_sendmsg+0x1e9/0x280 net/socket.c:2667
 \_\_do\_sys\_sendmsg net/socket.c:2676 \[inline\]
 \_\_se\_sys\_sendmsg net/socket.c:2674 \[inline\]
 \_\_x64\_sys\_sendmsg+0x46/0x50 net/socket.c:2674
 do\_syscall\_64+0xd3/0x1d0
 entry\_SYSCALL\_64\_after\_hwframe+0x6d/0x75

value changed: 0xffffffff83d7feb0 -\> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10713 Comm: syz-executor.4 Tainted: G        W          6.8.0-syzkaller-08951-gfe46a7dd189e \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024

Prior to this, commit 4cd12c6065df ("bpf, sockmap: Fix NULL pointer
dereference in sk\_psock\_verdict\_data\_ready()") fixed one NULL pointer
similarly due to no protection of saved\_data\_ready. Here is another
different caller causing the same issue because of the same reason. So
we should protect it with sk\_callback\_lock read lock because the writer
side in the sk\_psock\_drop() uses "write\_lock\_bh(&sk-\>sk\_callback\_lock);".

To avoid errors that could happen in future, I move those two pairs of
lock into the sk\_psock\_data\_ready(), which is suggested by John Fastabend.

## Affected and fixed versions

- Linux: \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< c0809c128dad4c3413818384eb06a341633db973; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 5965bc7535fb87510b724e5465ccc1a1cf00916d; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 39dc9e1442385d6e9be0b6491ee488dddd55ae27; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< b397a0ab8582c533ec0c6b732392f141fc364f87; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 772d5729b5ff0df0d37b32db600ce635b2172f80; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 6648e613226e18897231ab5e42ffc29e63fa3365 (cvelist)
- Linux: 4.20 (cvelist)

## Mitigation

- Upgrade Linux to 6648e613226e18897231ab5e42ffc29e63fa3365 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-36938.md
Affected: Linux >= 604326b41a6fb9b4a78b6179335decee0365cd8c, < c0809c128dad4c3413818384eb06a341633db973; >= 604326b41a6fb9b4a78b6179335decee0365cd8c, < 5965bc7535fb87510b724e5465ccc1a1cf00916d; >= 604326b41a6fb9b4a78b6179335decee0365cd8c, < 39dc9e1442385d6e9be0b6491ee488dddd55ae27; >= 604326b41a6fb9b4a78b617…
Fixed in: Linux 5965bc7535fb87510b724e5465ccc1a1cf00916d, Linux 39dc9e1442385d6e9be0b6491ee488dddd55ae27, Linux 772d5729b5ff0df0d37b32db600ce635b2172f80, Linux 6648e613226e18897231ab5e42ffc29e63fa3365

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-2024-36938 being exploited?

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

### How serious is CVE-2024-36938?

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

### Which versions are affected by CVE-2024-36938?

Linux \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< c0809c128dad4c3413818384eb06a341633db973; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 5965bc7535fb87510b724e5465ccc1a1cf00916d; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 39dc9e1442385d6e9be0b6491ee488dddd55ae27; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< b397a0ab8582c533ec0c6b732392f141fc364f87; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 772d5729b5ff0df0d37b32db600ce635b2172f80; \>= 604326b41a6fb9b4a78b6179335decee0365cd8c, \< 6648e613226e18897231ab5e42ffc29e63fa3365; Linux 4.20.

### Is there a fix for CVE-2024-36938?

Yes. Fixed in Linux 5965bc7535fb87510b724e5465ccc1a1cf00916d, Linux 39dc9e1442385d6e9be0b6491ee488dddd55ae27, Linux 772d5729b5ff0df0d37b32db600ce635b2172f80, Linux 6648e613226e18897231ab5e42ffc29e63fa3365. Upgrade Linux to 6648e613226e18897231ab5e42ffc29e63fa3365 or later.

### How do I check if I'm affected by CVE-2024-36938?

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/5965bc7535fb87510b724e5465ccc1a1cf00916d>
- patch: <https://git.kernel.org/stable/c/39dc9e1442385d6e9be0b6491ee488dddd55ae27>
- patch: <https://git.kernel.org/stable/c/b397a0ab8582c533ec0c6b732392f141fc364f87>
- patch: <https://git.kernel.org/stable/c/772d5729b5ff0df0d37b32db600ce635b2172f80>
- patch: <https://git.kernel.org/stable/c/6648e613226e18897231ab5e42ffc29e63fa3365>
- other: <https://git.kernel.org/stable/c/c0809c128dad4c3413818384eb06a341633db973>

## 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-2024-36938>

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