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

bpf: Fix UAF in sock clone early bailouts

Similar to recent commit 9b51a6155d14 ("bpf,fork: wipe ->bpf_storage
before bailouts that access it"), sk_clone() performs an initial
shallow copy of the socket field ->sk_bpf_storage via sock_copy()
for the cloned socket newsk.

If sk_clone() bails out early (e.g. if sk_filter_charge() fails) prior
to calling bpf_sk_storage_clone(), newsk->sk_bpf_storage still points
to the parent socket's BPF local storage. When newsk is subsequently
freed via sk_free(), the deallocation path (__sk_destruct() ->
bpf_sk_storage_free()) destroys the parent socket's BPF local storage,
leading to a use-after-free (UAF) on the parent socket.

Fix this by resetting newsk->sk_bpf_storage to NULL immediately after
sock_copy() in sk_clone(), and remove the now redundant initialization
from bpf_sk_storage_clone().
Published: 2026-08-10
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The described flaw is a use‑after‑free (UAF) condition in the Linux kernel’s socket‑cloning routine. When a socket is cloned and an early bailout occurs, the new socket’s BPF storage pointer still references the parent socket’s storage. If the new socket is freed before the pointer is cleared, the parent’s BPF data is freed while still in use, potentially allowing an attacker to read or overwrite kernel memory, leading to arbitrary kernel code execution. The vulnerability is confined to kernel space and would require the attacker to trigger the cloning path, implying local or system‑level privilege escalation. The underlying weakness is a classic pointer handling bug, catalogued as CWE‑416.

Affected Systems

The flaw affects Linux kernel implementations. Specific product names are listed as "Linux:Linux" in the CNA data, and affected kernel versions are not enumerated in the CVE record, so any system running a kernel prior to the commit that introduced the patch is potentially vulnerable.

Risk and Exploitability

The CVSS score is not supplied, and no EPSS estimate is available, while the vulnerability is not listed in CISA’s KEV catalog. Nevertheless, a use‑after‑free in the kernel can be leveraged to gain elevated privileges, a highly severe outcome. The likely attack vector is a local one, as the flaw is triggered by socket operations that a user process can initiate. Exploitation would require the attacker to create a socket with BPF filters that trigger the early bailout condition, then arrange for cleanup of the new socket. While the CVE description does not detail the full exploit chain, the presence of a kernel UAF indicates a severe, high‑impact risk if an adversary can meet the prerequisite conditions.

Generated by OpenCVE AI on August 10, 2026 at 16:09 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest kernel update that includes the fix (commits 14b49b5ab299... and 7cbd0c4cebe4c9f678d15e6b9ba975e1155a107f were used to resolve the issue).
  • Reboot the system to load the updated kernel image so the vulnerability is fully addressed.
  • If immediate kernel rollback or patching is not possible, restrict BPF usage by disabling the BPF filter capability for sockets through kernel configuration or sysctl tunables to mitigate the risk until a patch can be applied.

Generated by OpenCVE AI on August 10, 2026 at 16:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 16:30: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: Fix UAF in sock clone early bailouts Similar to recent commit 9b51a6155d14 ("bpf,fork: wipe ->bpf_storage before bailouts that access it"), sk_clone() performs an initial shallow copy of the socket field ->sk_bpf_storage via sock_copy() for the cloned socket newsk. If sk_clone() bails out early (e.g. if sk_filter_charge() fails) prior to calling bpf_sk_storage_clone(), newsk->sk_bpf_storage still points to the parent socket's BPF local storage. When newsk is subsequently freed via sk_free(), the deallocation path (__sk_destruct() -> bpf_sk_storage_free()) destroys the parent socket's BPF local storage, leading to a use-after-free (UAF) on the parent socket. Fix this by resetting newsk->sk_bpf_storage to NULL immediately after sock_copy() in sk_clone(), and remove the now redundant initialization from bpf_sk_storage_clone().
Title bpf: Fix UAF in sock clone early bailouts
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-10T12:04:18.837Z

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

Link: CVE-2026-68399

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T16:15:04Z

Weaknesses