Linux kernel TLS zero-length record bug (CVE-2025-39682) [PoC]
CVE-2025-39682
CVE-2025-39682: Linux kernel TLS recvmsg zero-length record handling bug (CVSS 9.8). Update to your distro's patched kernel; fixes shipped by upstream.
Actively exploited in the wild - CVE-2025-39682 is a critical TLS receive-path flaw in the Linux kernel that corrupts recvmsg() record handling, letting a remote peer break TLS stream integrity or crash the socket in affected kernels. Upstream fixes are merged; update your kernel package immediately.
Overview
The Linux kernel’s kTLS subsystem lets applications offload TLS record processing to the kernel. Each recvmsg() call must return either a run of contiguous DATA records or exactly one non-DATA record. When a record has already been decrypted but does not belong to the current call, the kernel queues the pending record on the rx_list for the next recvmsg() to pick up.
That queueing step is impossible when decryption was done in zero-copy mode, because the plaintext was written straight into the user’s buffer and no skb exists to enqueue. The code assumed zero-copy could never overlap with a record-type change, since only DATA records are eligible for zero-copy and any non-DATA record ends the loop. The missed corner case: the first record of a recvmsg() comes from rx_list and has zero length. The kernel then mishandles that empty record, producing a state where queued data and in-flight decryption disagree.
Getting this wrong means a remote TLS peer can drive the kernel into inconsistent record state. The reachable consequences are memory-safety class bugs in the networking stack, stream integrity failures where a caller reads data it should not, or a kernel crash via denial of service. Because kTLS is reachable from ordinary network input, the attack vector is unauthenticated.
Impact
Any Linux system using kTLS with zero-copy receive is in scope, including TLS terminators, proxies, service meshes, and storage or database servers that enable kernel TLS offload. Attackers do not need credentials or user interaction. CVSS 9.8 reflects network reachability, low complexity, and no privileges required. Note that EPSS currently sits near 0.5 percent, so opportunistic mass scanning is unlikely, but targeted exploitation of a kernel network path is realistic for any internet-facing TLS endpoint.
Remediation
Update your distribution’s kernel package to the release carrying the upstream fix for CVE-2025-39682. Reboot to load the new image, and verify with uname -r that the running kernel matches. If you cannot patch immediately, disable zero-copy receive in kTLS-dependent services, or terminate TLS in user space rather than through kTLS. Restrict network exposure of TLS termination points while patching.
Related: CISA Adds Actively Exploited Linux Root Bug CVE-2026-31, Weekly Threat Roundup: Apache & cPanel Zero-Days (Apr 27 - May 3), Nine CrackArmor Flaws in Linux AppArmor Enable Root.
Security Insight
Record-boundary state machines are a recurring source of kernel TLS bugs: the same class of off-by-one record handling has appeared in kTLS before, and it survives review because it only triggers on rare interleavings from rx_list. What stands out here is the framing - a 9.8 network vector paired with a sub-1 percent EPSS score and a KEV listing is a contradiction worth interrogating, since KEV entry implies observed exploitation while EPSS models it as improbable at scale. That gap usually means targeted use rather than worm behavior, which fits an attacker who controls both ends of a TLS session.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Am I Affected by CVE-2025-39682?
Pick an ecosystem, paste your installed version, and we'll compare it against the fixed version published on OSV.dev. Browser-only — nothing is sent to a server.
Heuristic comparison only. Always cross-check against the vendor advisory before making patching decisions.
Public PoC References
Unverified third-party code
These repositories are publicly listed on GitHub and have not been audited by Yazoul Security. They may contain malware, backdoors, destructive payloads, or operational security risks (telemetry, exfiltration). Treat them as hostile binaries. Inspect source before execution. Run only in isolated, disposable lab environments (offline VM, no credentials, no production data).
Authorized use only. This information is provided for defensive research, detection engineering, and patch validation. Using exploit code against systems you do not own or do not have explicit written permission to test is illegal in most jurisdictions and violates Yazoul's terms of use.
| Repository | Stars |
|---|---|
| khoatran107/cve-2025-39682 A variant of CVE-2024-58239 | ★ 5 |
Showing 1 of 1 known references. Source: nomi-sec/PoC-in-GitHub.
Related Advisories
A vulnerability was found in the Linux kernel’s cgroup_release_agent_write in the kernel/cgroup/cgroup-v1.c function. This flaw, under certain circumstances, allows the use of the cgroups v1 release_a...
In the Linux kernel, the following vulnerability has been resolved: ipv6: account for fraggap on the paged allocation path In __ip6_append_data(), when the paged-allocation branch is taken (MSG_MORE...
In the Linux kernel, the following vulnerability has been resolved: netfilter: bridge: make ebt_snat ARP rewrite writable The ebtables SNAT target keeps the Ethernet source address rewrite behind sk...
In the Linux kernel, the following vulnerability has been resolved: crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg Issuing two writes to the same af_alg socket is bogus as the data wi...
Related Across Yazoul
Other Linux Kernel Vulnerabilities
In the Linux kernel, the following vulnerability has been resolved: ipv6: account for fraggap on the paged allocation path In __ip6_append_data(), when the paged-allocation branch is taken (MSG_MORE...
In the Linux kernel, the following vulnerability has been resolved: netfilter: bridge: make ebt_snat ARP rewrite writable The ebtables SNAT target keeps the Ethernet source address rewrite behind sk...
Out of bounds read and write in V8 in Google Chrome prior to 149.0.7827.103 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page. (Chromium security severity: H...
Integer overflow in Blink in Google Chrome prior to 148.0.7778.96 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page. (Chromium security severity: Critical)...