CVE-2020-14314 Overview
CVE-2020-14314 is an out-of-bounds read vulnerability in the Linux kernel's ext3/ext4 file system, present in versions prior to 5.9-rc2. The flaw occurs when the kernel accesses a directory with broken indexing, causing the file system code to read memory outside the intended bounds [CWE-125]. A local authenticated user can trigger the condition by accessing a crafted or corrupted directory, resulting in a kernel crash. The vulnerability affects multiple Linux distributions including Debian, Ubuntu, and downstream products such as StarWind Virtual SAN. The primary impact is to system availability rather than confidentiality or integrity.
Critical Impact
A local user with file system access can crash the kernel by accessing an ext3/ext4 directory with broken hash indexing, causing denial of service on affected Linux systems.
Affected Products
- Linux Kernel versions before 5.9-rc2
- Debian Linux 9.0 and Ubuntu 14.04 ESM, 16.04 ESM, 18.04 LTS, 20.04 LTS
- StarWind Virtual SAN V8 (builds 12533 through 13861) for vSphere
Discovery Timeline
- 2020-09-15 - CVE-2020-14314 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2020-14314
Vulnerability Analysis
The vulnerability resides in the directory entry handling code of the ext3 and ext4 file systems within the Linux kernel. When the kernel traverses a directory that uses hash-tree (htree) indexing, it relies on metadata structures to locate directory entries on disk. If that indexing metadata is malformed or corrupted, the kernel's lookup routines compute offsets that fall outside the allocated buffer. This out-of-bounds read [CWE-125] reaches into adjacent kernel memory and dereferences invalid data, leading to a kernel oops or panic. The condition is reachable by any local user who can access the affected directory. The Linux kernel upstream fix is commit 5872331b3d91820e14716632ebb56b1399b34fe1.
Root Cause
The root cause is insufficient validation of htree directory indexing metadata before it is used to compute read offsets in ext3/ext4 directory traversal code. The kernel trusts on-disk index values without bounds checking, allowing corrupted or maliciously crafted directory structures to drive reads beyond mapped pages.
Attack Vector
Exploitation requires local access and low privileges. An attacker mounts or accesses a file system containing a directory with broken indexing, then performs a directory operation such as a lookup or listing. The kernel attempts to walk the directory's index structure, dereferences out-of-bounds memory, and crashes. No user interaction beyond the file system access is required. Refer to the Linux Kernel Commit 5872331b and Red Hat CVE-2020-14314 Bug Report for technical details. No public proof-of-concept code is available.
Detection Methods for CVE-2020-14314
Indicators of Compromise
- Kernel oops or panic messages referencing ext4_dx_find_entry, htree_dirblock_to_tree, or related ext4 directory functions in dmesg and /var/log/kern.log
- Repeated system crashes or reboots correlated with access to specific user-controlled directories or mounted images
- Unexpected mount operations of untrusted ext3/ext4 file system images by non-administrative users
Detection Strategies
- Monitor kernel ring buffer logs for out-of-bounds read warnings emitted by KASAN-enabled kernels during ext4 directory operations
- Inventory kernel versions across the Linux fleet and flag hosts running kernels older than 5.9-rc2 without distribution backports applied
- Track mount syscalls from non-root users and audit access to removable media or loopback-mounted images
Monitoring Recommendations
- Forward kernel logs to a centralized logging or SIEM platform and alert on BUG:, Oops:, or general protection fault entries linked to ext4 modules
- Run fsck.ext4 periodically on mounted volumes to identify directories with corrupted htree indexes before they trigger crashes
- Audit package versions against Ubuntu, Debian, and Red Hat security advisories to confirm patched kernels are deployed
How to Mitigate CVE-2020-14314
Immediate Actions Required
- Apply the kernel update from your Linux distribution that includes upstream commit 5872331b3d91820e14716632ebb56b1399b34fe1 and reboot affected systems
- Install the patched kernel packages referenced in Ubuntu Security Notice USN-4576-1, USN-4578-1, USN-4579-1, and the Debian LTS Security Announcement
- Update StarWind Virtual SAN per StarWind Security Advisory SW-20210325-0003
Patch Information
The upstream fix landed in Linux kernel 5.9-rc2 via commit 5872331b3d91820e14716632ebb56b1399b34fe1. Distribution vendors backported the fix to supported branches: Ubuntu issued USN-4576-1, USN-4578-1, and USN-4579-1; Debian published DLA announcements on the debian-lts-announce list; Red Hat addressed the issue via the linked Bugzilla entry. Apply vendor kernel updates and reboot to load the patched image.
Workarounds
- Restrict the ability of unprivileged users to mount untrusted ext3/ext4 file systems by disabling user mounts in /etc/fstab and removing the SUID bit from mount where feasible
- Disable automounting of removable media for non-administrative users until patched kernels are in place
- Run e2fsck -fD on suspected ext3/ext4 volumes during maintenance windows to repair broken directory indexes before they are accessed at runtime
# Configuration example - verify kernel version and apply distribution updates
uname -r
# Debian/Ubuntu
sudo apt-get update && sudo apt-get install --only-upgrade linux-image-$(uname -r)
sudo reboot
# Disable user mounts for removable media (example /etc/fstab entry)
# /dev/sdb1 /mnt/usb ext4 noauto,nouser,nosuid,nodev 0 0
# Repair broken ext4 directory indexes offline
sudo umount /dev/sdX1
sudo e2fsck -fD /dev/sdX1
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

