Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-93813 Overview
CVE-2026-93813 is a Linux kernel vulnerability in the btrfs filesystem's tree-checker code. The flaw stems from missing validation of the namelen field in INODE_REF items. A crafted btrfs image containing an INODE_REF entry with a namelen greater than the BTRFS_NAME_LEN limit of 255 triggers an out-of-bounds memory access during read_extent_buffer and btrfs_get_name operations. The result is a kernel page fault and panic. Exploitation requires local access to mount a malicious filesystem image, placing this issue in the local attack vector category [CWE: Out-of-Bounds Read / Improper Input Validation].
Critical Impact
A local user able to mount a crafted btrfs image can trigger a kernel panic, denying service to the host and potentially corrupting kernel memory.
Affected Products
- Linux kernel builds containing the btrfs tree-checker prior to the fix commits
- Distributions shipping vulnerable btrfs kernel modules
- Systems that allow unprivileged mounting of user-supplied filesystem images (for example, via automount or removable media)
Discovery Timeline
- 2026-09-24 - CVE-2026-93813 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-93813
Vulnerability Analysis
The btrfs on-disk format stores file name references in INODE_REF items. Each entry contains an index, a namelen, and a name buffer. The btrfs tree-checker is responsible for validating item integrity when leaves are read from disk. Before this fix, the tree-checker verified several INODE_REF fields but did not enforce the upper bound of BTRFS_NAME_LEN (255 bytes) on the namelen field.
A crafted image containing an INODE_REF item with namelen = 4096 passes initial checks because itemsize matches namelen. When filesystem code later calls btrfs_get_name and read_extent_buffer, the kernel copies 4096 bytes into a 255-byte destination buffer. This causes a supervisor-mode page fault in memcpy, producing the reported unable to handle page fault for address crash and a fatal kernel panic.
Root Cause
The root cause is improper input validation in the btrfs tree-checker. The checker enforced namelen limits for ROOT_REF items but omitted the equivalent check for INODE_REF. Without that bound, any namelen value up to the item size was treated as valid, allowing a length larger than the fixed-size name buffer used by downstream consumers.
Attack Vector
An attacker with local access crafts a btrfs image containing a malformed INODE_REF item and arranges for it to be mounted. On systems where unprivileged mount paths exist, such as removable media handlers or container runtimes, this escalates to a reliable denial-of-service primitive. Because the overflow writes into kernel memory, memory-corruption consequences beyond a panic cannot be ruled out depending on allocator layout. The crafted image described in the upstream report uses item 9 key (258 INODE_REF 257) with namelen 4096, which reliably reproduces the crash.
No verified public exploit code is available. See the kernel git commits 3dc22ab, 8f75c19, and eeddee0 for the fix.
Detection Methods for CVE-2026-93813
Indicators of Compromise
- Kernel log entries matching BTRFS critical (device ...): corrupt leaf: ... invalid inode ref name length, has <N> expect [1, 255]
- Kernel panic traces containing memcpy+0xc/0x10 called from read_extent_buffer and btrfs_get_name
- Unexpected mount attempts of btrfs images originating from user-writable paths or removable media
Detection Strategies
- Monitor dmesg and /var/log/kern.log for btrfs tree-checker corruption warnings and page fault traces referencing btrfs symbols
- Audit mount and exportfs syscalls targeting btrfs filesystems from non-root paths using auditd or eBPF
- Collect kernel crash dumps on btrfs hosts and alert on panics whose call stacks include read_extent_buffer or exportfs_decode_fh_raw
Monitoring Recommendations
- Centralize kernel ring buffer and crash telemetry from Linux endpoints into a SIEM for pattern matching on btrfs corruption strings
- Track installed kernel versions across the fleet and flag hosts running kernels predating the fix commits
- Correlate removable-media insertion events with subsequent btrfs mount and panic events to surface suspicious sequences
How to Mitigate CVE-2026-93813
Immediate Actions Required
- Apply the upstream kernel patches referenced in commits 3dc22ab, 8f75c19, and eeddee0 once they are available in your distribution's kernel package
- Restrict btrfs mount permissions so only trusted administrators can mount filesystem images
- Disable automatic mounting of removable media on servers and multi-user systems until patched kernels are deployed
Patch Information
The fix adds explicit namelen validation to the btrfs tree-checker for INODE_REF items, mirroring the existing check for ROOT_REF. Values outside the range [1, 255] are rejected and the leaf is reported as corrupt before any name buffer is read. Patches are available in the stable kernel tree via commits 3dc22ab, 8f75c19, and eeddee0. Rebuild and reboot into the patched kernel to remediate.
Workarounds
- Prevent unprivileged users from invoking mount on btrfs images by removing user and users options from /etc/fstab entries
- Block loading of the btrfs module on hosts that do not require it using modprobe blacklists
- Enforce mandatory access controls (SELinux, AppArmor) to restrict which processes can mount filesystems
# Configuration example: blacklist btrfs on hosts that do not need it
echo 'blacklist btrfs' | sudo tee /etc/modprobe.d/blacklist-btrfs.conf
sudo update-initramfs -u
# Verify installed kernel version against patched builds
uname -r
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

