Description
In the Linux kernel, the following vulnerability has been resolved:

bpf, sockmap: Fix cork use-after-free in tcp_bpf_sendmsg()

tcp_bpf_sendmsg() keeps msg_tx across sk_stream_wait_memory(), which
drops and reacquires the socket lock. Its error path tries to decide
whether msg_tx names the local temporary message by comparing it with
the current value of psock->cork.

This comparison is unsafe when two threads send on the same socket:

Thread A Thread B
msg_tx = psock->cork
sk_msg_alloc() fails
sk_stream_wait_memory()
releases the socket lock acquires the socket lock
completes the cork
psock->cork = NULL
frees the cork
reacquires the socket lock
msg_tx != psock->cork
sk_msg_free(msg_tx)

The stale cork is therefore mistaken for the local temporary message
and freed again. KASAN reported:

BUG: KASAN: slab-use-after-free in sk_msg_free+0x49/0x50
Read of size 4 at addr ffff88810c908800 by task poc/90
Call Trace:
sk_msg_free+0x49/0x50
tcp_bpf_sendmsg+0x14f5/0x1cc0
__sys_sendto+0x32c/0x3a0
__x64_sys_sendto+0xdb/0x1b0
Allocated by task 89:
__kasan_kmalloc+0x8f/0xa0
tcp_bpf_sendmsg+0x16b3/0x1cc0
Freed by task 91:
__kasan_slab_free+0x43/0x70
kfree+0x131/0x3c0
tcp_bpf_sendmsg+0xec3/0x1cc0

msg_tx can only name the stack-local tmp or the shared cork. Check for
tmp directly so a changed psock->cork cannot turn a shared message into
an apparent local one.
Published: 2026-08-10
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw exists in the Linux kernel function tcp_bpf_sendmsg() used by BPF and sockmap features. When two threads send data on the same socket concurrently, the function records a reference to the message buffer (msg_tx) across a call that releases and later re‑acquires the socket lock. If a second thread completes its own cork operation during that wait, the shared cork buffer is cleared and freed while the first thread still holds a stale reference. The error path then compares the stale cork value with the local temporary buffer, mistakenly identifies the freed buffer as local, and frees it again. This double free triggers a use‑after‑free condition detected by KASAN, causing kernel memory corruption that could crash the system or corrupt kernel data structures. The vulnerability is classified under CWE‑825 (Improper Handling of Uninitialized Memory).

Affected Systems

Any Linux kernel version that implements the vulnerable tcp_bpf_sendmsg() before the patches incorporated in the commit chain referenced in the advisory is affected. Since the fix was merged into all current upstream kernels, systems running older kernels that have not been updated are at risk. Linux distributions that ship or maintain unpatched kernels of such versions, including Alpine, Ubuntu, CentOS, RHEL, Debian, Fedora, SUSE, and others, may have impacted installations if their packages contain the vulnerable code.

Risk and Exploitability

The CVSS score of 7.8 attests to high severity, while the EPSS score of less than 1% indicates a low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog, suggesting no known active exploitation. The attack surface is narrow: it requires two overlapping send operations on the same socket, which in practice corresponds to concurrent traffic over the same TCP connection managed by the kernel. No details in the advisory indicate a viable remote exploitation path or that privilege escalation is feasible without additional conditions.

Generated by OpenCVE AI on August 14, 2026 at 00:17 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the kernel to a version that includes the tcp_bpf_sendmsg fix
  • If an update is not immediately possible, consider disabling BPF or sockmap features in the kernel configuration or removing them from the system to avoid the vulnerable code path
  • Monitor kernel logs for KASAN messages, panics, or abnormal socket behavior that could indicate an attempt to trigger the double free

Generated by OpenCVE AI on August 14, 2026 at 00:17 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4745-1 linux-6.12 security update
History

Wed, 19 Aug 2026 16:45:00 +0000


Thu, 13 Aug 2026 22:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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

cvssV3_1

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


Thu, 13 Aug 2026 05:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Wed, 12 Aug 2026 00:15:00 +0000

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

None

cvssV3_1

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

threat_severity

Important


Mon, 10 Aug 2026 15:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Mon, 10 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf, sockmap: Fix cork use-after-free in tcp_bpf_sendmsg() tcp_bpf_sendmsg() keeps msg_tx across sk_stream_wait_memory(), which drops and reacquires the socket lock. Its error path tries to decide whether msg_tx names the local temporary message by comparing it with the current value of psock->cork. This comparison is unsafe when two threads send on the same socket: Thread A Thread B msg_tx = psock->cork sk_msg_alloc() fails sk_stream_wait_memory() releases the socket lock acquires the socket lock completes the cork psock->cork = NULL frees the cork reacquires the socket lock msg_tx != psock->cork sk_msg_free(msg_tx) The stale cork is therefore mistaken for the local temporary message and freed again. KASAN reported: BUG: KASAN: slab-use-after-free in sk_msg_free+0x49/0x50 Read of size 4 at addr ffff88810c908800 by task poc/90 Call Trace: sk_msg_free+0x49/0x50 tcp_bpf_sendmsg+0x14f5/0x1cc0 __sys_sendto+0x32c/0x3a0 __x64_sys_sendto+0xdb/0x1b0 Allocated by task 89: __kasan_kmalloc+0x8f/0xa0 tcp_bpf_sendmsg+0x16b3/0x1cc0 Freed by task 91: __kasan_slab_free+0x43/0x70 kfree+0x131/0x3c0 tcp_bpf_sendmsg+0xec3/0x1cc0 msg_tx can only name the stack-local tmp or the shared cork. Check for tmp directly so a changed psock->cork cannot turn a shared message into an apparent local one.
Title bpf, sockmap: Fix cork use-after-free in tcp_bpf_sendmsg()
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-19T16:32:41.174Z

Reserved: 2026-07-30T09:28:09.379Z

Link: CVE-2026-68284

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-10T13:20:17.670

Modified: 2026-08-19T17:20:40.573

Link: CVE-2026-68284

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-10T12:02:16Z

Links: CVE-2026-68284 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-14T00:30:03Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference