bpf, skmsg: fix verdict sk_data_ready racing with ktls rx
Linux kernel branches 5.10.0 to before 6.6.142, 6.7.0 to before 6.12.92, 6.13.0 to before 6.18.34, and 6.19.0 to before 7.0.11 are affected when a socket is inserted into a sockmap (BPF_SK_SKB_VERDICT) before TLS RX is configured.
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Unclear
- Fix
- Fixed in 6.6.142, 6.12.92, 6.18.34, 7.0.11
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: yes
- Technical impact: total
Summary
The Linux kernel's BPF sockmap verdict path, used with kernel TLS (kTLS) receive, is affected: when a socket is in a sockmap before TLS RX is configured, incoming data can be drained from the receive queue while TLS still expects it, which can lead to a use-after-free during decryption. The impact is potential memory corruption and a crash or privilege escalation risk in systems using these features.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
In the Linux kernel, the following vulnerability has been resolved: bpf, skmsg: fix verdict sk_data_ready racing with ktls rx sk_psock_strp_data_ready() already checks tls_sw_has_ctx_rx() and defers to psock->saved_data_ready when a TLS RX context is present, avoiding a conflict with the TLS strparser's ownership of the receive queue (commit e91de6afa81c, "bpf: Fix running sk_skb program types with ktls"). sk_psock_verdict_data_ready() has no equivalent guard. When a socket is inserted into a sockmap (BPF_SK_SKB_VERDICT) before TLS RX is configured, tls_sw_strparser_arm() saves sk_psock_verdict_data_ready as rx_ctx->saved_data_ready. On data arrival: tls_data_ready -> tls_strp_data_ready -> tls_rx_msg_ready -> saved_data_ready() = sk_psock_verdict_data_ready() -> tcp_read_skb() drains sk_receive_queue via __skb_unlink() without calling tcp_eat_skb(), so copied_seq is not advanced. tls_strp_msg_load() then finds tcp_inq() >= full_len (stale), calls tcp_recv_skb() on the now-empty queue, hits WARN_ON_ONCE(!first), and returns with rx_ctx->strp.anchor.frag_list pointing at a psock-owned (potentially freed) skb. tls_decrypt_sg() subsequently walks that frag_list: use-after-free. Apply the same fix as sk_psock_strp_data_ready(): if a TLS RX context is present, call psock->saved_data_ready (sock_def_readable) to wake recv() waiters and return immediately, leaving the receive queue untouched. TLS retains sole ownership of the queue and decrypts the record normally through tls_sw_recvmsg().
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
Version range not reported
- Linux Linux
5.10
- KernelLinux
From 5.10.0 · fixed in 6.6.142; From 6.7.0 · fixed in 6.12.92; From 6.13.0 · fixed in 6.18.34; From 6.19.0 · fixed in 7.0.11
References 6
git.kernel.org
Questions about CVE-2026-64025
What does this mean?
A race between the BPF sockmap verdict path and the kernel TLS receive path can leave the TLS decrypt code walking a fragment list that points to a socket buffer owned by the sockmap layer. That buffer may already be freed, which is a use-after-free.Source: git.kernel.org
Am I affected, and how do I check?
The listed ranges are kernel 5.10.0 through 6.6.142, 6.7.0 through 6.12.92, 6.13.0 through 6.18.34, and 6.19.0 through 7.0.11 (fixed in 6.6.142, 6.12.92, 6.18.34, and 7.0.11). To check a system, run uname -r for the kernel version and look for sockmap use with BPF_SK_SKB_VERDICT that is set up before kTLS RX is configured.Source: git.kernel.org
What should I do about it?
Move to a kernel release that includes the fix for your branch: 6.6.142, 6.12.92, 6.18.34, or 7.0.11 or later. The sources provided do not list a workaround.Source: git.kernel.org
Is it being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data