KernelScan.io

HIGH Introduced in 5.2

bpf Syncookie Deref

CVE-2026-80738

CVSS 7.3 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

KernelScan AI5.5MEDIUM

01

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.

02

Engine v0.6.0

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.

Affectednet/core/filter.c (bpf)

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.

03

BranchIntroducedFixed inPatch commit
7.15.27.1.923f682083aa3
mainline5.27.231a420a822ff