CVE-2026-53078: Linux Kernel BPF sock_ops Pointer Leak and Stack Corruption
A flaw in the Linux kernel's BPF (Berkeley Packet Filter) virtual machine allows unprivileged users to read kernel memory and corrupt the stack. When a BPF program running in sock_ops context accesses socket fields using the same register for both source and destination, the kernel fails to properly clear the destination register. This leaves a stale kernel pointer in place, which can be misused to read sensitive kernel data or write to kernel stack memory. The vulnerability requires local access and a user with BPF program loading privileges.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-125
- Affected products
- 9 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-21
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix same-register dst/src OOB read and pointer leak in sock_ops When a BPF sock_ops program accesses ctx fields with dst_reg == src_reg, the SOCK_OPS_GET_SK() and SOCK_OPS_GET_FIELD() macros fail to zero the destination register in the !fullsock / !locked_tcp_sock path. Both macros borrow a temporary register to check is_fullsock / is_locked_tcp_sock when dst_reg == src_reg, because dst_reg holds the ctx pointer. When the check is false (e.g., TCP_NEW_SYN_RECV state with a request_sock), dst_reg should be zeroed but is not, leaving the stale ctx pointer: - SOCK_OPS_GET_SK: dst_reg retains the ctx pointer, passes NULL checks as PTR_TO_SOCKET_OR_NULL, and can be used as a bogus socket pointer, leading to stack-out-of-bounds access in helpers like bpf_skc_to_tcp6_sock(). - SOCK_OPS_GET_FIELD: dst_reg retains the ctx pointer which the verifier believes is a SCALAR_VALUE, leaking a kernel pointer. Fix both macros by: - Changing JMP_A(1) to JMP_A(2) in the fullsock path to skip the added instruction. - Adding BPF_MOV64_IMM(si->dst_reg, 0) after the temp register restore in the !fullsock path, placed after the restore because dst_reg == src_reg means we need src_reg intact to read ctx->temp.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in the SOCK_OPS_GET_SK() and SOCK_OPS_GET_FIELD() macros used during BPF sock_ops program verification and JIT compilation. When dst_reg equals src_reg (same register used for both source and destination operands), these macros temporarily borrow a register to check socket state flags (is_fullsock and is_locked_tcp_sock). On the negative path—when a socket is not in a fully-established state (e.g., TCP_NEW_SYN_RECV with a request_sock)—the destination register should be zeroed but is not. This leaves the original ctx pointer (kernel context structure address) in dst_reg. The verifier incorrectly tags this as PTR_TO_SOCKET_OR_NULL (for SOCK_OPS_GET_SK) or SCALAR_VALUE (for SOCK_OPS_GET_FIELD), enabling either stack-out-of-bounds reads via socket helpers or direct kernel pointer leaks. The fix involves correcting jump offsets and explicitly zeroing dst_reg in the failure path after temporary register restoration.
Business impact
A local attacker with BPF program load permissions can compromise kernel confidentiality and integrity. Information disclosure of kernel pointers defeats address space layout randomization (ASLR) hardening, facilitating further exploits. Stack corruption can trigger denial of service or privilege escalation chains. In containerized or multi-tenant environments where unprivileged users have BPF capabilities enabled, this becomes a high-priority container escape vector. Affected organizations should evaluate whether their threat model includes local attackers with CAP_BPF/CAP_PERFMON privileges.
Affected systems
All Linux kernel versions containing the vulnerable SOCK_OPS_GET_SK() and SOCK_OPS_GET_FIELD() macros in BPF sock_ops handling. The vulnerability affects any deployment where BPF sock_ops programs are permitted (this may be disabled by default on some distributions). Systems with unprivileged user namespaces and BPF enabled are at elevated risk.
Exploitability
Exploitation requires local access and the ability to load BPF programs (typically CAP_BPF and CAP_PERFMON, or older CAP_SYS_ADMIN). This is not a remote vulnerability. Craft is moderate: an attacker must write a sock_ops BPF program that triggers the same-register code path and either leaks kernel pointers or corrupts stack via a helper function. Public proof-of-concept code does not currently exist, but the bug is deterministic and reproducible by anyone with local BPF access. This is not listed in CISA's Known Exploited Vulnerabilities catalog.
Remediation
Apply the Linux kernel patch that modifies both macros to correctly handle the dst_reg == src_reg case: adjust JMP_A(1) to JMP_A(2) in the fullsock path and add BPF_MOV64_IMM(si->dst_reg, 0) to zero the register after temp register restoration. Verify the patch against the kernel version used in your environment (see vendor advisory for exact commit hash and affected releases). For interim mitigation, restrict BPF program loading via LSM policies or by disabling unprivileged BPF if your workloads do not require it.
Patch guidance
Check the Linux kernel security advisory and your distribution's kernel update channels for the specific patch version addressing CVE-2026-53078. The fix is typically backported to stable/LTS branches (e.g., linux-6.x.y, linux-5.x.y). Apply patches in order of your release schedule, prioritizing systems where local users can load BPF programs. Verify that both SOCK_OPS_GET_SK and SOCK_OPS_GET_FIELD macro fixes are present in your kernel binary.
Detection guidance
Monitor for attempts to load BPF sock_ops programs using tools like auditd (audit syscall BPF program load events) or eBPF-based runtime security. Kernel logs may show unexpected stack traces or memory access violations in BPF JIT code. Review BPF program audit logs and restrict sock_ops program loading to trusted administrators. During incident response, correlate BPF program load events with kernel oops messages or memory corruption alerts.
Why prioritize this
This is a HIGH-severity local privilege escalation and information disclosure affecting the Linux kernel. It bypasses ASLR, leaks kernel pointers, and corrupts kernel stack—all primitives useful in chaining to full system compromise. While it requires local access and BPF privileges, many production environments (containers, cloud instances, developer machines) enable BPF. Prioritize patching systems where BPF is enabled and unprivileged users exist.
Risk score, explained
CVSS 3.1 score of 7.8 (HIGH) reflects: Attack Vector Local (AV:L), Attack Complexity Low (AC:L), Privileges Required Low (PR:L—BPF capability), User Interaction None (UI:N), and high impact on Confidentiality, Integrity, and Availability. The score does not account for real-world prevalence (BPF availability varies) but correctly weights the severity of kernel memory corruption and pointer leaks. Organizations with stricter BPF policies may assess risk lower; those with broad BPF enablement should treat as critical.
Frequently asked questions
What is BPF and why is this vulnerability limited to sock_ops programs?
BPF (Berkeley Packet Filter) is an in-kernel virtual machine that runs sandboxed programs without requiring kernel modules. sock_ops programs specifically hook into TCP socket state transitions and operations. The vulnerability exists only in the register handling for sock_ops context access; other BPF program types are unaffected.
Do I need BPF enabled to be vulnerable?
Yes. If your kernel has BPF disabled (CAP_BPF / CAP_PERFMON restricted), this vulnerability cannot be exploited. However, many modern distributions enable BPF by default. Check your kernel config and LSM policies to determine if sock_ops BPF loading is permitted for unprivileged users.
Can this vulnerability be exploited remotely?
No. This requires local access and the ability to load BPF programs. Remote attack is not possible without first gaining local code execution.
What is the difference between SOCK_OPS_GET_SK and SOCK_OPS_GET_FIELD?
SOCK_OPS_GET_SK retrieves a socket structure pointer (verified as PTR_TO_SOCKET_OR_NULL), while SOCK_OPS_GET_FIELD retrieves scalar fields from a socket. The bug affects both: the first leaks a pointer that passes NULL checks and can corrupt stack; the second leaks a kernel pointer value that the verifier believes is a scalar.
This analysis is based on the published CVE record and kernel security advisory. Patch version numbers and affected kernel releases must be verified against official Linux distribution advisories and kernel.org. This advisory provides educational context only and does not constitute legal or compliance advice. Organizations should conduct their own risk assessment based on their specific kernel versions, BPF policy, and threat model. No exploit code or step-by-step weaponization guidance is provided in this document. Source: NVD (public-domain), retrieved 2026-08-01. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10889HIGHCritical ANGLE Sandbox Escape in Google Chrome – Patch to 149.0.7827.53
- CVE-2026-10927HIGHChrome Sandbox Escape via Dawn Out-of-Bounds Read
- CVE-2026-10941HIGHSkia Out-of-Bounds Memory Vulnerability in Chrome – Urgent Patch Required
- CVE-2026-11015HIGHCritical Chrome WebGPU Out-of-Bounds Read Vulnerability
- CVE-2026-11077HIGHChrome Dawn Graphics Vulnerability – Sandbox Escape Risk
- CVE-2026-11091HIGHCritical Chrome Memory Corruption Vulnerability in Dawn Graphics Engine
- CVE-2026-11111HIGHChrome Out-of-Bounds Read in ANGLE Graphics Engine — Patch Guidance
- CVE-2026-11191HIGHOut-of-Bounds Memory Access in Chrome ANGLE Library