CVE-2026-74400

bpf: fix crash in bpf_[set|remove]_dentry_xattr for negative dentries

Published Aug 15, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: fix crash in bpf_[set|remove]_dentry_xattr for negative dentries

bpf_set_dentry_xattr and bpf_remove_dentry_xattr BPF kfuncs attempt to
lock the inode of the supplied dentry without checking if it is
NULL. If a negative dentry is passed (e.g. from
security_inode_create), d_inode(dentry) returns NULL, and
inode_lock(inode) will cause a NULL pointer dereference.

Trivially fix this by adding a NULL check for inode before attempting
to lock it, returning -EINVAL if it is NULL.

Additionally, drop WARN_ON(!inode) in bpf_xattr_read_permission() and
bpf_xattr_write_permission(). These warnings could be triggered by
passing a negative dentry to bpf_get_dentry_xattr() or the _locked
variants of the xattr kfuncs, potentially causing a Denial of Service
on systems with panic_on_warn enabled. Instead, simply return -EINVAL.

Analysis

AI-generated

Technical impact

The vulnerability arises in the Linux kernel BPF subsystem, where the functions bpf_set_dentry_xattr and bpf_remove_dentry_xattr attempt to lock the inode of a supplied dentry without verifying that the inode is not null, causing a NULL pointer dereference (CWE-476). If a negative dentry is passed, the inode field is null and the lock call triggers a null pointer dereference, leading to a kernel crash. The same flaw exists in xattr permission checks, where a negative dentry could trigger a warning via WARN_ON, potentially leading to a panic on systems configured with panic_on_warn, which is equivalent to a denial‑of‑service condition. The damage is confined to the affected kernel, resulting in loss of availability for the host system.

Affected Systems

All Linux kernel implementations are affected, with the issue present in any kernel build that has not applied the patches referenced in the advisory. The exact version range is not specified, but the bug was fixed in the commit 0160edf2af51c5fde742973742c5d10497901b21 and subsequent related patches.

Risk and Exploitability

The vulnerability does not appear in the CISA KEV catalog and has an EPSS score of less than 1 %, indicating that exploitation is unlikely or untracked. The CVSS score of 5.5 classifies the issue as medium severity; it can trigger a kernel crash that results in a denial‑of‑service for the affected host. It is inferred that a local attacker with sufficient privileges could provoke the crash via malicious BPF programs that reference negative dentries, though no widespread exploitation has been reported.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a Linux kernel update that includes commit 0160edf2af51c5fde742973742c5d10497901b21 (and its associated patches cited in the advisory).
  • Rebuild the kernel modules to ensure the updated code is loaded into the running system.
  • Verify that security_policy parameters such as panic_on_warn are configured to prevent unintended panics in environments where kernel updates cannot be applied immediately.

Generated by OpenCVE AI on August 22, 2026 at 00:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8887-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8888-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8889-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8887-2 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8888-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8887-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9003-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9043-1 Linux kernel (NVIDIA) vulnerabilities
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-476
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: fix crash in bpf_[set|remove]_dentry_xattr for negative dentries bpf_set_dentry_xattr and bpf_remove_dentry_xattr BPF kfuncs attempt to lock the inode of the supplied dentry without checking if it is NULL. If a negative dentry is passed (e.g. from security_inode_create), d_inode(dentry) returns NULL, and inode_lock(inode) will cause a NULL pointer dereference. Trivially fix this by adding a NULL check for inode before attempting to lock it, returning -EINVAL if it is NULL. Additionally, drop WARN_ON(!inode) in bpf_xattr_read_permission() and bpf_xattr_write_permission(). These warnings could be triggered by passing a negative dentry to bpf_get_dentry_xattr() or the _locked variants of the xattr kfuncs, potentially causing a Denial of Service on systems with panic_on_warn enabled. Instead, simply return -EINVAL.
Title bpf: fix crash in bpf_[set|remove]_dentry_xattr for negative dentries
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Aug 17, 2026, 5:18 AM
Reserved
Aug 15, 2026, 5:44 AM
Status
Received
Published
Aug 15, 2026, 6:22 AM
Modified
Aug 17, 2026, 6:19 AM
Severity
Moderate
Public date
Aug 15, 2026, 12:00 AM