CVE-2026-45951 in Linuxinfo

Summary

by MITRE • 05/27/2026

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

bpf: Fix a potential use-after-free of BTF object

Refcounting in the check_pseudo_btf_id() function is incorrect: the __check_pseudo_btf_id() function might get called with a zero refcounted btf. Fix this, and patch related code accordingly.

v3: rephrase a comment (AI) v2: fix a refcount leak introduced in v1 (AI)

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 08/23/2026

The vulnerability resides in the Linux kernel's eBPF (extended Berkeley Packet Filter) subsystem where a potential use-after-free condition exists in the BTF (BPF Type Format) object handling mechanism. This issue specifically affects the check_pseudo_btf_id() function which contains incorrect refcounting logic that can lead to improper memory management during BPF program validation and execution processes. The flaw occurs when the __check_pseudo_btf_id() function receives a BTF object with zero refcount, creating a scenario where memory could be accessed after it has been freed, potentially leading to system instability or privilege escalation.

The technical implementation flaw stems from improper reference counting mechanisms within the kernel's BPF subsystem where the refcounting logic fails to properly track BTF object lifecycle management. When the check_pseudo_btf_id() function processes BTF identifiers, it does not adequately verify the reference count status of the BTF object before proceeding with validation operations. This incorrect handling can result in a race condition where the BTF object is freed while still being referenced by other kernel components, creating a use-after-free vulnerability that violates fundamental memory safety principles. The vulnerability is categorized under CWE-416 as a use-after-free condition and can be mapped to ATT&CK technique T1059.006 for kernel-level exploitation.

The operational impact of this vulnerability extends beyond simple memory corruption, as it can potentially allow malicious users to escalate privileges or cause system crashes. Attackers could exploit this weakness by crafting specific BPF programs that trigger the problematic code path, leading to either denial of service through system crashes or more severe consequences including privilege escalation. The vulnerability affects systems running Linux kernels that implement BPF functionality, particularly those utilizing BTF for enhanced program validation and debugging capabilities. The issue is particularly concerning in containerized environments or systems where BPF programs are frequently loaded and executed, as these scenarios increase the likelihood of triggering the vulnerable code path.

Mitigation strategies should focus on implementing proper reference counting mechanisms and ensuring that BTF objects maintain valid references throughout their lifecycle. Kernel patches must address the incorrect refcounting logic in check_pseudo_btf_id() by ensuring that __check_pseudo_btf_id() functions properly validate reference counts before accessing BTF objects. Additionally, defensive programming practices should be enforced to prevent premature object deallocation, including proper locking mechanisms and atomic reference counting operations. System administrators should prioritize applying the official kernel patches that correct the refcounting logic and monitor for any anomalous behavior in systems handling BPF programs. The fix should also include comprehensive testing of BPF program validation flows to ensure that all code paths properly handle reference counting scenarios and prevent similar vulnerabilities from emerging in related kernel subsystems.

Responsible

Linux

Reservation

05/13/2026

Disclosure

05/27/2026

Moderation

accepted

CPE

ready

EPSS

0.00168

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!