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().
Published: 2026-07-19
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw arises in the Linux kernel when a socket is placed into a BPF socket map (BPF_SK_SKB_VERDICT) before the socket’s TLS receive context is configured. A missing guard in sk_psock_verdict_data_ready() races with the TLS strparser’s handling of incoming data, draining the receive queue without advancing the copy sequence number. Subsequent TLS decryption logic reads a stale, freed socket buffer, producing a kernel use‑after‑free condition that can corrupt memory. An attacker who can load a BPF program capable of manipulating sockets or inject data into a TLS connection can trigger this race, potentially leading to kernel corruption, denial of service, or privilege escalation. The vulnerability is tied to a specific commit, e91de6afa81c, which adds a guard to sk_psock_verdict_data_ready(). All Linux kernel versions prior to this commit that still lack the guard are vulnerable.

Affected Systems

All users running a Linux kernel prior to the inclusion of commit e91de6afa81c are affected. The vulnerability impacts the Linux kernel’s handling of BPF socket maps (BPF_SK_SKB_VERDICT) and TLS reception logic. No specific version ranges are listed; any kernel that predates the applied commit remains vulnerable.

Risk and Exploitability

The CVSS score of 9.8 marks the issue as critical, while the EPSS score of <1% indicates a very low likelihood of discovery and exploitation in the wild. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires local kernel privilege or the ability to load custom BPF programs that access socket maps, restricting the attack surface to privileged or compromised systems. Nevertheless, the memory corruption could enable arbitrary code execution or a system crash if successfully leveraged.

Generated by OpenCVE AI on August 4, 2026 at 18:03 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the kernel patch containing commit e91de6afa81c, which introduces the guard that prevents the race condition (CWE-364) and eliminates the use‑after‑free by ensuring the receive queue is protected when a TLS RX context is present.
  • Limit the ability to load and use BPF programs that target BPF socket maps (BPF_SK_SKB_VERDICT) until the patch is applied, thereby reducing the opportunity for a race condition leading to a use‑after‑free bug (CWE-364).
  • As a temporary mitigative measure, avoid inserting sockets into BPF socket maps before establishing a TLS receive context on those sockets, which helps avoid triggering the race that results in a use‑after‑free.

Generated by OpenCVE AI on August 4, 2026 at 18:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
History

Thu, 30 Jul 2026 21:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Wed, 22 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-364
References
Metrics threat_severity

None

threat_severity

Moderate


Tue, 21 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Mon, 20 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Sun, 19 Jul 2026 15:45:00 +0000

Type Values Removed Values Added
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().
Title bpf, skmsg: fix verdict sk_data_ready racing with ktls rx
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-05T12:38:19.891Z

Reserved: 2026-07-19T07:54:57.027Z

Link: CVE-2026-64025

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-64025 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T18:15:03Z

Weaknesses
  • CWE-364

    Signal Handler Race Condition