Skip to main content

Linux Kernel CVE-2026-31519

| EUVDEUVD-2026-24903 MEDIUM
NULL Pointer Dereference (CWE-476)
2026-04-22 416baaa9-dc9f-4396-8d5f-8c081fb06d67 GHSA-p3jm-9f4h-xp4f
5.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Create Btrfs subvolume via mksubvol
  2. Delivery
    Evict dentry from cache
  3. Exploit
    Trigger file unlink with delayed iput
  4. Install
    Invoke orphan cleanup on lookup
  5. C2
    Orphan cleanup fails with ENOENT
  6. Execute
    Negative dentry created
  7. Impact
    Filesystem abort on subsequent operations

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Null pointer safety, defensive checks
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all of the following specific, concrete conditions: (1) the attacker must have local authenticated access to a system with Btrfs filesystem mounted in read-write mode (not read-only); (2) the attacker must have permissions to create Btrfs subvolumes (typically root capability CAP_SYS_ADMIN or explicit subvolume creation rights via btrfs-progs); (3) the target filesystem must use Btrfs with subvolume support enabled; (4) the newly created subvolume's dentry must be evicted from the kernel's dentry cache before the first legitimate lookup operation that would trigger BTRFS_ROOT_ORPHAN_CLEANUP flag setting - this requires either (a) induced memory pressure and cache shrinking, (b) explicit cache drop via /proc/sys/vm/drop_caches (root-level), or (c) filesystem unmount/remount; (5) concurrent orphan cleanup operations must be triggered while the dentry is evicted, typically via delayed iput from ordered extent completion on concurrently unlinked inodes. Non-default configurations that increase risk include multi-tenant environments with shell access for non-root users, systems configured to allow unprivileged user namespaces with CAP_SYS_ADMIN, or workloads with high transient inode creation/deletion rates that fragment the dentry cache. The vulnerability does NOT exploit systems where subvolume creation is restricted to root and unprivileged cache manipulation is blocked.

Impact

This vulnerability presents a localized denial-of-service risk with a CVSS score of 5.5 (AV:L/AC:L/PR:L/UI:N/S:U). The attack vector is local (AV:L) requiring authenticated access (PR:L), with low complexity (AC:L) and no user interaction (UI:N). The scope is unchanged (S:U) and there is no confidentiality or integrity impact (C:N/I:N), but availability is severely affected (A:H) via filesystem corruption and crashes. However, the EPSS score of 0.02% (percentile 7%) is notably low despite the high CVSS impact rating. This discrepancy reflects the strict exploitation requirements: the attacker must (1) have local authenticated access, (2) create a Btrfs subvolume, (3) trigger dentry cache eviction at precise timing, and (4) initiate concurrent orphan cleanup operations. These conditions rarely occur in production unless an attacker specifically orchestrates them. The vulnerability is not actively exploited (no CISA KEV status), and the precise race window makes this primarily a risk for systems where local users can create Btrfs subvolumes and manipulate filesystem caches. For typical server deployments restricting subvolume creation to root, risk is minimal; for multi-tenant or development environments, risk is elevated. The gap between CVSS and EPSS suggests this is a real but low-probability attack requiring significant control over filesystem operations.

Exploit ScenarioDerived

An authenticated local attacker creates a Btrfs subvolume on a shared system, then immediately triggers dentry cache eviction (e.g., via memory pressure, dropping caches, or unmounting/remounting the filesystem). Concurrently, the attacker performs operations that invoke orphan cleanup (such as triggering delayed iput operations by rapidly unlinking and closing files with pending ordered extents). The race window causes btrfs_orphan_cleanup() to fail with ENOENT, creating a negative dentry. The attacker then attempts to delete the subvolume or create a new file/subvolume with the same name, causing the filesystem to abort with an assertion error. On systems where this occurs, further filesystem operations fail, effectively denying service to legitimate users until the system is rebooted or the filesystem is unmounted and checked.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 28, 2026

A denial-of-service vulnerability in the Linux kernel's Btrfs filesystem implementation allows local authenticated attackers to cause filesystem corruption and crashes through a race condition during subvolume creation and lookup. When a newly created Btrfs subvolume's dentry cache is dropped before the BTRFS_ROOT_ORPHAN_CLEANUP flag is set, concurrent orphan cleanup operations can fail with ENOENT, creating negative dentries that prevent subvolume deletion and cause filesystem aborts. EPSS score of 0.02% indicates this is a low-probability exploitation scenario requiring specific timing and configuration conditions, though the impact is severe for affected systems. No public exploit code is identified at time of analysis.

RemediationAI

Vendor-released patches are available for stable Linux kernel branches: apply kernel update to version 6.1.168 or later for the 6.1 branch, 6.6.131 or later for the 6.6 branch, 6.12.80 or later for the 6.12 branch, 6.18.21 or later for the 6.18 branch, 6.19.11 or later for the 6.19 branch, or 7.0 or later for the 7.0 branch. The fix sets BTRFS_ROOT_ORPHAN_CLEANUP during subvolume creation, preventing the race condition. Interim workarounds for unpatched systems include: (1) restrict Btrfs subvolume creation permissions to root only (via file capabilities or access controls), eliminating the requirement for PR:L authentication; (2) disable Btrfs as the primary filesystem for multi-tenant environments where local users have shell access; (3) monitor Btrfs filesystem health via btrfs filesystem show and immediately investigate any subvolumes with permission display anomalies (d????????? entries), manually clearing the dentry cache with echo 3 > /proc/sys/vm/drop_caches and attempting subvolume deletion/recreation. Note that drop_caches may degrade performance on heavily loaded systems due to cache rebuild overhead. The most robust mitigation is immediate kernel patching, as the workarounds require operational overhead and do not fully prevent exploitation by determined local attackers with appropriate access levels.

Affected VersionsENISA

Linux patch: 6.1.168
Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <d43da8de0ed376abafbad8a245a1835e8f66cb0f
Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <2ec578e6452138ab76f6c9a9c18711fcd197649f
Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <a41a9b8d19a98b45591528c6e54d31cc66271d1e
Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <5131fa077f9bb386a1b901bf5b247041f0ec8f80
Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <696683f214495db3cdacab9a713efaaced8660f8
Linux patch: 6.18.21
Linux patch: 6.19.11
Linux patch: 7.0
Linux patch: 6.12.80
Linux patch: 6.6.131
Linux 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 <c57276ced3c3207f42182dfa2f0d8e860357e111

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in the Btrfs subvolume creation and directory lookup logic within the Linux kernel. When a subvolume is created via create_subvol(), the function calls d_instantiate_new() to add the dentry to the cache but fails to set the BTRFS_ROOT_ORPHAN_CLEANUP flag on the root inode. This flag is normally set during the first btrfs_orphan_cleanup() call, which occurs on subsequent lookups via btrfs_lookup_dentry(). The root cause (CWE-476: Null Pointer Dereference) manifests as a race condition: if the dentry cache is dropped between subvolume creation and the first lookup, a concurrent orphan cleanup attempt can fail with ENOENT when btrfs_search_slot() encounters missing orphan items. This causes btrfs_lookup_dentry() to return ERR_PTR(-ENOENT), which is then converted to a NULL pointer passed to d_splice_alias(), creating a negative dentry for a valid subvolume. The race is enabled by delayed iput operations that allow child dentries to be freed while parent dentries remain cached, or by concurrent unlink/writeback operations. The CPE indicates all Linux kernel versions are potentially affected, with patched versions available for 6.1.168, 6.6.131, 6.12.80, 6.18.21, 6.19.11, and 7.0 stable branches.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
SUSE MEDIUM
Red Hat 5.5 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

4
CVSS changed
Apr 28, 2026 - 19:07 NVD
5.5 (MEDIUM)
Patch released
Apr 28, 2026 - 18:54 nvd
Patch available
Patch available
Apr 22, 2026 - 16:33 EUVD
CVE Published
Apr 22, 2026 - 14:16 nvd
MEDIUM 5.5

DescriptionNVD

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

btrfs: set BTRFS_ROOT_ORPHAN_CLEANUP during subvol create

We have recently observed a number of subvolumes with broken dentries. ls-ing the parent dir looks like:

drwxrwxrwt 1 root root 16 Jan 23 16:49 . drwxr-xr-x 1 root root 24 Jan 23 16:48 .. d????????? ? ? ? ? ? broken_subvol

and similarly stat-ing the file fails.

In this state, deleting the subvol fails with ENOENT, but attempting to create a new file or subvol over it errors out with EEXIST and even aborts the fs. Which leaves us a bit stuck.

dmesg contains a single notable error message reading: "could not do orphan cleanup -2"

2 is ENOENT and the error comes from the failure handling path of btrfs_orphan_cleanup(), with the stack leading back up to btrfs_lookup().

btrfs_lookup btrfs_lookup_dentry btrfs_orphan_cleanup // prints that message and returns -ENOENT

After some detailed inspection of the internal state, it became clear that:

  • there are no orphan items for the subvol
  • the subvol is otherwise healthy looking, it is not half-deleted or

anything, there is no drop progress, etc.

  • the subvol was created a while ago and does the meaningful first

btrfs_orphan_cleanup() call that sets BTRFS_ROOT_ORPHAN_CLEANUP much later.

  • after btrfs_orphan_cleanup() fails, btrfs_lookup_dentry() returns -ENOENT,

which results in a negative dentry for the subvolume via d_splice_alias(NULL, dentry), leading to the observed behavior. The bug can be mitigated by dropping the dentry cache, at which point we can successfully delete the subvolume if we want.

i.e., btrfs_lookup() btrfs_lookup_dentry() if (!sb_rdonly(inode->vfs_inode)->vfs_inode) btrfs_orphan_cleanup(sub_root) test_and_set_bit(BTRFS_ROOT_ORPHAN_CLEANUP) btrfs_search_slot() // finds orphan item for inode N ... prints "could not do orphan cleanup -2" if (inode == ERR_PTR(-ENOENT)) inode = NULL; return d_splice_alias(NULL, dentry) // NEGATIVE DENTRY for valid subvolume

btrfs_orphan_cleanup() does test_and_set_bit(BTRFS_ROOT_ORPHAN_CLEANUP) on the root when it runs, so it cannot run more than once on a given root, so something else must run concurrently. However, the obvious routes to deleting an orphan when nlinks goes to 0 should not be able to run without first doing a lookup into the subvolume, which should run btrfs_orphan_cleanup() and set the bit.

The final important observation is that create_subvol() calls d_instantiate_new() but does not set BTRFS_ROOT_ORPHAN_CLEANUP, so if the dentry cache gets dropped, the next lookup into the subvolume will make a real call into btrfs_orphan_cleanup() for the first time. This opens up the possibility of concurrently deleting the inode/orphan items but most typical evict() paths will be holding a reference on the parent dentry (child dentry holds parent->d_lockref.count via dget in d_alloc(), released in __dentry_kill()) and prevent the parent from being removed from the dentry cache.

The one exception is delayed iputs. Ordered extent creation calls igrab() on the inode. If the file is unlinked and closed while those refs are held, iput() in __dentry_kill() decrements i_count but does not trigger eviction (i_count > 0). The child dentry is freed and the subvol dentry's d_lockref.count drops to 0, making it evictable while the inode is still alive.

Since there are two races (the race between writeback and unlink and the race between lookup and delayed iputs), and there are too many moving parts, the following three diagrams show the complete picture. (Only the second and third are races)

Phase 1: Create Subvol in dentry cache without BTRFS_ROOT_ORPHAN_CLEANUP set

btrfs_mksubvol() lookup_one_len() __lookup_slow() d_alloc_parallel() __d_alloc() // d_lockref.count = 1 create_subvol(dentry) // doesn't touch the bit.. d_instantiate_new(dentry, inode) // dentry in cache with d_lockref.c ---truncated---

Threat Intelligence Overview

EPSS Score
0.0%
Top 93% exploitable
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

28
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A null pointer dereference occurs when a program attempts to access memory through a pointer that has been set to NULL (address 0x0).

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Availability Extension 15 SP7 Fixed
SUSE Linux Enterprise High Availability Extension 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy