CVE-2026-53111: Linux Kernel BPF Test_Run Null Pointer Dereference DoS
A null pointer dereference vulnerability exists in the Linux kernel's BPF (Berkeley Packet Filter) subsystem, specifically in the test_run functionality used to validate BPF programs. When certain BPF encapsulation helper functions attempt to access network device information during testing, they may crash the kernel if the test framework hasn't properly initialized the socket buffer's destination reference. This is a local denial-of-service issue that requires user-level access to trigger.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-476
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-24 / 2026-07-23
NVD description (verbatim)
In the Linux kernel, the following vulnerability has been resolved: bpf: test_run: Fix the null pointer dereference issue in bpf_lwt_xmit_push_encap The bpf_lwt_xmit_push_encap helper needs to access skb_dst(skb)->dev to calculate the needed headroom: err = skb_cow_head(skb, len + LL_RESERVED_SPACE(skb_dst(skb)->dev)); But skb->_skb_refdst may not be initialized when the skb is set up by bpf_prog_test_run_skb function. Executing bpf_lwt_push_ip_encap function in this scenario will trigger null pointer dereference, causing a kernel crash as Yinhao reported: [ 105.186365] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 105.186382] #PF: supervisor read access in kernel mode [ 105.186388] #PF: error_code(0x0000) - not-present page [ 105.186393] PGD 121d3d067 P4D 121d3d067 PUD 106c83067 PMD 0 [ 105.186404] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 105.186412] CPU: 3 PID: 3250 Comm: poc Kdump: loaded Not tainted 6.19.0-rc5 #1 [ 105.186423] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 105.186427] RIP: 0010:bpf_lwt_push_ip_encap+0x1eb/0x520 [ 105.186443] Code: 0f 84 de 01 00 00 0f b7 4a 04 66 85 c9 0f 85 47 01 00 00 31 c0 5b 5d 41 5c 41 5d 41 5e c3 cc cc cc cc 48 8b 73 58 48 83 e6 fe <48> 8b 36 0f b7 be ec 00 00 00 0f b7 b6 e6 00 00 00 01 fe 83 e6 f0 [ 105.186449] RSP: 0018:ffffbb0e0387bc50 EFLAGS: 00010246 [ 105.186455] RAX: 000000000000004e RBX: ffff94c74e036500 RCX: ffff94c74874da00 [ 105.186460] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff94c74e036500 [ 105.186463] RBP: 0000000000000001 R08: 0000000000000002 R09: 0000000000000000 [ 105.186467] R10: ffffbb0e0387bd50 R11: 0000000000000000 R12: ffffbb0e0387bc98 [ 105.186471] R13: 0000000000000014 R14: 0000000000000000 R15: 0000000000000002 [ 105.186484] FS: 00007f166aa4d680(0000) GS:ffff94c8b7780000(0000) knlGS:0000000000000000 [ 105.186490] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 105.186494] CR2: 0000000000000000 CR3: 000000015eade001 CR4: 0000000000770ee0 [ 105.186499] PKRU: 55555554 [ 105.186502] Call Trace: [ 105.186507] <TASK> [ 105.186513] bpf_lwt_xmit_push_encap+0x2b/0x40 [ 105.186522] bpf_prog_a75eaad51e517912+0x41/0x49 [ 105.186536] ? kvm_clock_get_cycles+0x18/0x30 [ 105.186547] ? ktime_get+0x3c/0xa0 [ 105.186554] bpf_test_run+0x195/0x320 [ 105.186563] ? bpf_test_run+0x10f/0x320 [ 105.186579] bpf_prog_test_run_skb+0x2f5/0x4f0 [ 105.186590] __sys_bpf+0x69c/0xa40 [ 105.186603] __x64_sys_bpf+0x1e/0x30 [ 105.186611] do_syscall_64+0x59/0x110 [ 105.186620] entry_SYSCALL_64_after_hwframe+0x76/0xe0 [ 105.186649] RIP: 0033:0x7f166a97455d Temporarily add the setting of skb->_skb_refdst before bpf_test_run to resolve the issue.
6 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-53111 involves a null pointer dereference in bpf_lwt_xmit_push_encap within the Linux kernel's BPF testing infrastructure. The vulnerability occurs because the bpf_lwt_push_ip_encap helper function accesses skb_dst(skb)->dev to calculate headroom requirements via skb_cow_head(), but the bpf_prog_test_run_skb function may initialize socket buffers without setting the skb->_skb_refdst field. When a BPF program under test invokes encapsulation helpers, the uninitialized destination reference causes dereferencing of a null pointer, triggering a kernel panic. The fix involves initializing skb->_skb_refdst before executing the test harness.
Business impact
This vulnerability enables local attackers to crash Linux systems by submitting specially crafted BPF programs through the kernel's BPF testing interface. While exploitation requires local access and appropriate capabilities to use the BPF subsystem, successful exploitation results in immediate kernel panic and system unavailability. For development environments, CI/CD pipelines, and container platforms where untrusted users may load BPF programs, this represents a practical denial-of-service vector. Systems hosting BPF-based security tools or network packet processing are at elevated risk.
Affected systems
The Linux kernel is affected across versions prior to the patch. The vulnerability is specific to systems where the BPF subsystem is enabled and the test_run interface is accessible. This includes standard kernel configurations on modern Linux distributions, Kubernetes nodes using BPF-based networking (Cilium, etc.), and development systems with BPF tooling. The issue is most practically exploitable on systems where BPF program loading is permitted to unprivileged or semi-privileged users.
Exploitability
Exploitability is moderate but practical. The vulnerability requires local access and the ability to invoke BPF syscalls (CAP_BPF or CAP_SYS_ADMIN depending on kernel version), which is not typically available to arbitrary unprivileged users by default. However, it may be accessible in containerized environments, development machines, or systems with overly permissive BPF access controls. No authentication bypass or privilege escalation is needed—only the ability to submit a BPF test run request. Public proof-of-concept code exists, but no evidence indicates active exploitation in the wild.
Remediation
The fix involves initializing the socket buffer's destination reference (skb->_skb_refdst) before invoking the BPF test harness. This ensures that encapsulation helpers have valid network device information available. The patch is minimal and surgical, addressing the root cause without broad subsystem changes. Administrators should update to patched kernel versions as soon as feasible, prioritizing systems where BPF program testing is frequent or BPF access is broadly permitted.
Patch guidance
Patch availability depends on your Linux distribution and kernel version. Check your vendor's security advisory for specific patched kernel versions (verify against the vendor advisory for your distribution). For distributions following upstream Linux releases, the fix appears in kernel versions addressing this CVE post-June 2026. Enable automatic security updates where possible, and test kernel updates in non-production environments before broad deployment. If immediate patching is delayed, restrict BPF program loading to trusted administrators only.
Detection guidance
Monitor kernel logs for BPF-related panic messages, particularly those referencing bpf_lwt_push_ip_encap or null pointer dereferences in BPF code paths. Enable audit logging for BPF syscalls (bpf() system call invocations) to track which users or processes are attempting to load or test BPF programs. On systems where unexpected BPF activity is rare, anomalous BPF test_run invocations should trigger investigation. Check kernel version and confirmed patch status regularly; unpatched systems remain vulnerable until updates are applied.
Why prioritize this
Although rated MEDIUM severity due to local-only access requirements, this vulnerability warrants prompt attention because: (1) it provides straightforward denial-of-service against critical kernel infrastructure, (2) modern container and Kubernetes deployments increasingly expose BPF capabilities, and (3) no workaround exists short of disabling BPF or severely restricting access. Prioritize patching for development systems, container platforms, and any infrastructure where BPF-based tools are operationally important.
Risk score, explained
The CVSS 3.1 score of 5.5 (MEDIUM) reflects local attack vector (AV:L), low complexity (AC:L), and low privilege requirements (PR:L), with impact limited to availability (A:H). The score appropriately captures that exploitation requires local access and some level of privilege, but the resulting kernel crash is a complete availability impact. The score does not account for operational context—organizations heavily reliant on BPF for networking or security should weight this higher than the base score suggests.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. CVE-2026-53111 requires local access and the ability to invoke BPF syscalls. Remote exploitation is not possible, though attackers who gain local access (via another vulnerability or legitimate system access) could trigger it.
Does this affect unprivileged users on systems with standard configurations?
Not typically. By default, BPF syscalls require CAP_BPF or CAP_SYS_ADMIN. However, on development machines, some container platforms, or systems with custom capability assignments, unprivileged users may have access, increasing risk.
What happens if we disable BPF entirely?
Disabling BPF in kernel configuration eliminates the vulnerability but removes all BPF-based functionality, including eBPF-based observability, networking, and security tools. This is impractical for most modern deployments. Patching is the recommended solution.
Are container images affected if the host kernel is patched?
Container images themselves are not vulnerable, but the shared host kernel remains the attack surface. If the host kernel is patched, the vulnerability is mitigated. Containers can still trigger the vulnerability on unpatched hosts if they have access to BPF syscalls.
This analysis is based on published CVE data and the Linux kernel vulnerability description. Specific patch version numbers and vendor release dates must be verified against official vendor security advisories for your distribution. This vulnerability requires local access and BPF capability; assess your organizational exposure based on who can access BPF on your systems. Testing should be confined to non-production environments. SEC.co does not provide legal advice regarding compliance obligations related to this CVE. Source: NVD (public-domain), retrieved 2026-08-02. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-71313MEDIUMLinux Kernel PCI Endpoint NULL Pointer Dereference
- CVE-2026-46118MEDIUMLinux Kernel PAPR Hypervisor Pipe Null Pointer Dereference (POWER Systems)
- CVE-2026-46127MEDIUMLinux Kernel OCRDMA Null Pointer Dereference (DoS)
- CVE-2026-46134MEDIUMLinux Kernel cros_ec Mutex Initialization DoS Vulnerability
- CVE-2026-46188MEDIUMLinux Octeon EP VF NULL Pointer Dereference Denial of Service
- CVE-2026-46211MEDIUMLinux Kernel MSM DRM NULL Pointer and Silent Error in gem_info_get_metadata
- CVE-2026-46216MEDIUMLinux Intel Arc GPU NULL Pointer Dereference (HDCP)
- CVE-2026-46222MEDIUMLinux Rockchip RKCam Driver Null Pointer Dereference