HIGH Introduced in 5.2
bpf Syncookie Deref
CVE-2026-80738
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L
KernelScan AI5.5MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Check sk_state before sk_protocol in bpf_tcp_*_syncookie bpf_tcp_gen_syncookie and bpf_tcp_check_syncookie accept a socket pointer 'sk' with argument type ARG_PTR_TO_BTF_ID_SOCK_COMMON. However, they access sk->sk_protocol without validating whether 'sk' represents a full socket. Fix this issue by checking sk->sk_state != TCP_LISTEN before inspecting sk->sk_protocol in both bpf_tcp_gen_syncookie and bpf_tcp_check_syncookie. Since mini-sockets are never in the TCP_LISTEN state, the condition short-circuits and prevents dereferencing fullsock-specific fields.
02KernelScan AI Analysis
Risk summary
A BPF helper for TCP SYN cookie operations accepts a socket pointer that may be a mini-socket, then dereferences a field only valid for full sockets. An attacker with BPF program loading privileges can trigger a kernel crash.
Vulnerability analysis
A helper used for TCP SYN cookies accepts generic socket pointers that may refer to lightweight mini-sockets instead of full sockets. The helper originally read a field that exists only on full sockets before confirming the socket was in the listening state. When passed a mini-socket, this read accessed invalid memory and crashed the kernel. The corrected code checks the listening state first; because mini-sockets are never listening, the helper exits safely before reaching the invalid access. Any process able to load a BPF program can reach this path.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 5.2 | 6.12.114 | b5525e853a2a |
| 6.18 | 5.2 | 6.18.57 | 22c2169770ad |
| 6.6 | 5.2 | 6.6.160 | 5702e4c25980 |
| 7.1 | 5.2 | 7.1.9 | 23f682083aa3 |
| mainline | 5.2 | 7.2 | 31a420a822ff |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Affected — no CIP fix yet (latest 6.12.112-cip33) |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.189-cip61) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.271-cip78) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |