Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-63808

CVE-2026-63808: Linux Kernel exFAT Use-After-Free Flaw

CVE-2026-63808 is a use-after-free vulnerability in the Linux kernel exFAT filesystem that could lead to memory corruption when processing directory entries. This article covers technical details, affected versions, and patches.

Published:

CVE-2026-63808 Overview

CVE-2026-63808 is a use-after-free vulnerability in the Linux kernel exFAT filesystem driver, specifically in the exfat_find_dir_entry() function. The flaw occurs because the buffer_head obtained from exfat_get_dentry() is released with brelse(bh) before the fall-through TYPE_EXTEND branch reads the directory entry through the ep pointer, which references memory inside bh->b_data. After the buffer is released, nothing guarantees the underlying page remains valid for the subsequent exfat_extract_uni_name() read. The issue was confirmed on QEMU x86_64 with KASAN and page poisoning enabled using a crafted exFAT image containing long filenames with same-hash collisions.

Critical Impact

An attacker able to trigger the TYPE_EXTEND code path — for example, through a maliciously crafted exFAT image mounted by a victim system — can reference freed kernel memory, potentially causing kernel panics, memory corruption, or privilege escalation.

Affected Products

  • Linux kernel versions containing the vulnerable exfat_find_dir_entry() implementation prior to the referenced fix commits
  • Linux distributions shipping the exFAT filesystem driver in the mainline and stable kernel trees
  • Systems that mount user-supplied exFAT filesystems (removable media, USB drives, SD cards)

Discovery Timeline

  • 2026-07-19 - CVE CVE-2026-63808 published to NVD
  • 2026-07-20 - Last updated in NVD database

Technical Details for CVE-2026-63808

Vulnerability Analysis

The vulnerability resides in the exFAT directory entry lookup path in the Linux kernel. Inside exfat_find_dir_entry(), the code obtains a buffer_head (bh) via exfat_get_dentry() and derives a pointer ep into bh->b_data. The function then calls brelse(bh) before checking whether the entry type is TYPE_EXTEND. When the TYPE_EXTEND branch is taken, the code dereferences ep — and therefore bh->b_data — after the buffer reference has already been dropped.

Once brelse() drops the last reference, the block layer may reclaim the underlying page. Any subsequent read through ep accesses freed memory. The maintainers describe this as the same lifetime bug pattern fixed previously in commit fc961522ddbd for exfat_load_upcase_table(). The fix moves brelse(bh) so it runs only after ep is no longer dereferenced in each branch.

Root Cause

The root cause is incorrect object lifetime management. The code releases the owning buffer_head before completing all reads through a pointer that aliases into that buffer. This is a classic use-after-free ([CWE-416]) introduced by reordering resource cleanup relative to consumer reads.

Attack Vector

Triggering the flaw requires the kernel to parse an exFAT directory that forces the TYPE_EXTEND fall-through path. A crafted exFAT image with long filenames producing same-hash collisions reaches this branch during lookup. Attackers deliver such images through removable media inserted into a target system or through automount-enabled endpoints. Reliable exploitation on an uninstrumented kernel requires racing memory reclaim against the stale dereference; the reporter confirmed the lifetime violation deterministically only with debug-only invalidate_bdev() inserted between brelse() and the ep read.

No verified exploitation code is available. The vulnerability mechanism is documented in the upstream fix commits referenced in the kernel git tree.

Detection Methods for CVE-2026-63808

Indicators of Compromise

  • Kernel oops or panic messages referencing exfat_find_dir_entry+0x1188/0x15a0 or nearby offsets in the exFAT module
  • KASAN reports of the form BUG: KASAN: use-after-free in exfat_find_dir_entry in dmesg or /var/log/kern.log
  • Page fault entries such as unable to handle page fault for address: immediately following an exFAT mount or directory traversal
  • Unexpected exFAT mount events sourced from removable media on servers or workstations that do not normally use the filesystem

Detection Strategies

  • Monitor kernel logs for KASAN, Oops, or BUG traces originating in the exfat module and correlate with recent block device attach events
  • Audit mount system calls and udev events for exFAT filesystems mounted from untrusted sources
  • Deploy fleet-wide kernel version inventory to identify hosts still running vulnerable kernels prior to the fix commits

Monitoring Recommendations

  • Alert on repeated kernel crashes on the same host, particularly following USB or SD card insertion
  • Track auditd SYSCALL records for mount with -t exfat or -t auto against removable devices
  • Capture and centralize /var/log/kern.log and journald kernel messages for retrospective hunting when new IOCs emerge

How to Mitigate CVE-2026-63808

Immediate Actions Required

  • Apply the upstream Linux kernel patches referenced in the fix commits (06c4e1e9, 3f5f8ee9, 4d101016, 708b97e7, 8e0abc17, adfacfba, e48f413c, e6f1a11c) or upgrade to a stable kernel release that includes them
  • Restrict mounting of exFAT filesystems from untrusted or removable media on servers and multi-user endpoints
  • Disable automount services (udisks2, autofs) on systems that do not require automatic removable media handling

Patch Information

The fix moves the brelse(bh) call so that it executes only after ep is no longer dereferenced on each branch of exfat_find_dir_entry(). Distribution vendors have backported the change through the stable kernel process. Consult the kernel.org stable commit and related references for the exact patch series, and track your distribution's security tracker for backport availability.

Workarounds

  • Unload the exfat kernel module (modprobe -r exfat) on systems that do not require the filesystem
  • Blacklist the exfat module in /etc/modprobe.d/ to prevent on-demand loading when removable media is inserted
  • Enforce policy on removable storage through USB device control or endpoint policy to block untrusted exFAT media
bash
# Blacklist the exfat module to prevent automatic loading
echo "blacklist exfat" | sudo tee /etc/modprobe.d/disable-exfat.conf
echo "install exfat /bin/true" | sudo tee -a /etc/modprobe.d/disable-exfat.conf
sudo update-initramfs -u

# Verify the module is not currently loaded
lsmod | grep exfat

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.