CVE-2024-26731: bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready()
In the Linux kernel, the following vulnerability has been resolved:
bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready()
syzbot reported the following NULL pointer dereference issue [1]:
BUG: kernel NULL pointer dereference, address: 0000000000000000
[...]
RIP: 0010:0x0
[...]
Call Trace:
<TASK>
sk_psock_verdict_data_ready+0x232/0x340 net/core/skmsg.c:1230
unix_stream_sendmsg+0x9b4/0x1230 net/unix/af_unix.c:2293
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:745
____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
___sys_sendmsg net/socket.c:2638 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
do_syscall_64+0xf9/0x240
entry_SYSCALL_64_after_hwframe+0x6f/0x77
If sk_psock_verdict_data_ready() and sk_psock_stop_verdict() are called
concurrently, psock->saved_data_ready can be NULL, causing the above issue.
This patch fixes this issue by calling the appropriate data ready function
using the sk_psock_data_ready() helper and protecting it from concurrency
with sk->sk_callback_lock.
Security readout for executives and security teams
Plain-English summary
CVE-2024-26731 is a Linux kernel flaw where a race in BPF sockmap verdict handling can crash kernel code through a NULL pointer dereference. The documented impact is limited availability loss, not data theft or integrity compromise. Treat it as a routine but real kernel patching priority.
Executive priority
Prioritize through normal kernel maintenance, with faster handling for critical or externally reachable Linux infrastructure. The evidence supports availability risk, not confirmed compromise risk. No active exploitation is cited in the provided sources.
Technical view
The issue is in sk_psock_verdict_data_ready(). Concurrent calls with sk_psock_stop_verdict() can leave psock->saved_data_ready NULL. The fix routes through sk_psock_data_ready() and protects callback handling with sk->sk_callback_lock. CVSS 3.1 is 5.3 with availability-only impact.
Likely exposure
Exposure is limited to Linux systems running affected kernel versions or downstream builds without the stable fix. The source bundle lists affected Linux versions including 6.4, 6.1.80, 6.6.19, 6.7.7, and 6.8. Distribution backports may change version-based assessment.
Exploitation context
The bundle does not show CISA KEV listing or public active exploitation. The CVSS vector says network attack complexity is low and no privileges or user interaction are required, but the documented technical detail is a kernel NULL dereference causing limited availability impact.
Researcher notes
This is a CWE-476 NULL pointer dereference in Linux BPF sockmap verdict callback handling. The interesting area is callback concurrency around saved_data_ready and sk_callback_lock. Evidence is strongest for root cause and fix, weaker for real-world exploitability.
Mitigation direction
Update to a vendor kernel containing the referenced stable fix commits.
Check distribution advisories for backported fixes for CVE-2024-26731.
Reboot systems after kernel update so the fixed kernel is active.
If patching is delayed, follow vendor guidance for supported mitigations.
Validation and detection
Inventory running Linux kernel versions across production and edge systems.
Confirm installed kernel packages reference CVE-2024-26731 or the stable commits.
Verify each host rebooted into the patched kernel after updating.
Review crash logs for matching sk_psock_verdict_data_ready NULL dereferences.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-476: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-476 · source CWE mapping
NULL Pointer Dereference
NULL Pointer Dereference represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.