CVE-2026-80738 PUBLISHED

bpf: Check sk_state before sk_protocol in bpf_tcp_*_syncookie

Assigner: Linux
Reserved: 26.08.2026 Published: 03.09.2026 Updated: 03.09.2026

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.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 399040847084a69f345e0a52fd62f04654e0fce3 to 23f682083aa3fbc0c49667818efd6979a8bc5ac2 (excl.)
  • affected from 399040847084a69f345e0a52fd62f04654e0fce3 to 31a420a822ff92e2090bd5d65efe8e34e2d6d9b8 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 5.2 is affected
  • unaffected from 0 to 5.2 (excl.)
  • unaffected from 7.1.9 to 7.1.* (incl.)
  • unaffected from 7.2 to * (incl.)

References