CVE-2026-64025

bpf, skmsg: fix verdict sk_data_ready racing with ktls rx

State
Published
Severity
9.8 Critical
Published
Jul 19, 2026
Updated
Oct 30, 2026
Reserved
Jul 19, 2026

Read the record on cve.org

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().

Scores

CVSSScoreVectorSource
3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

  • CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Affected Products

ProductVersions
LinuxLinux
  • ef5659280eb13e8ac31c296f58cfdfa1684ac06b to before d698bdba0f9969a6e390d1b1a9a3e283f1f174a7Affected
  • ef5659280eb13e8ac31c296f58cfdfa1684ac06b to before c9ea01768903ae47f210cd457af1dead6de7a9c3Affected
  • ef5659280eb13e8ac31c296f58cfdfa1684ac06b to before 7c8cf21bc4efb4af18d6096db3f8bd06d622251cAffected
  • ef5659280eb13e8ac31c296f58cfdfa1684ac06b to before 1861d369efd62d67796563bf3e01fc22e5626f8bAffected
  • ef5659280eb13e8ac31c296f58cfdfa1684ac06b to before 8a52139560f833c3975032e1f5762611e3a36d71Affected
  • ef5659280eb13e8ac31c296f58cfdfa1684ac06b to before ddf8029623a1af20e984c040e89ff918158397abAffected
LinuxLinux
  • 5.10Affected
  • before 5.10Not affected
  • 6.1.191 through 6.1.*Not affected
  • 6.6.142 through 6.6.*Not affected
  • 6.12.92 through 6.12.*Not affected
  • 6.18.34 through 6.18.*Not affected
  • 7.0.11 through 7.0.*Not affected
  • 7.1 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.