Linux Kernel
CVE-2024-38623
HIGH
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Local attack via filesystem interaction, low-privilege user can mount NTFS; full kernel memory corruption impact across CIA.
Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).
CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Lifecycle Timeline
6DescriptionCVE.org
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: Use variable length array instead of fixed size
Should fix smatch warning: ntfs_set_label() error: __builtin_memcpy() 'uni->name' too small (20 vs 256)
AnalysisAI
Buffer overflow in the Linux kernel's NTFS3 filesystem driver (ntfs_set_label()) allows a local attacker with low privileges to corrupt memory by triggering a memcpy of up to 256 bytes into a fixed 20-byte buffer (uni->name). The root cause is a fixed-size array declaration that does not accommodate the maximum Unicode volume-label length, identified via smatch static analysis. No public exploit code or confirmed active exploitation (CISA KEV) has been identified at time of analysis; however, the CVSS 7.8 rating reflects the potential for high-impact local exploitation with full confidentiality, integrity, and availability consequences.
Technical ContextAI
The vulnerability resides in fs/ntfs3/ntfs_set_label() within the ntfs3 driver, the modern NTFS filesystem implementation merged into the mainline Linux kernel in version 5.15. The affected code path constructs a Unicode structure (uni) whose name member was statically declared with a fixed size of 20 characters. An NTFS volume label can be up to 128 Unicode characters (256 bytes), so a __builtin_memcpy() targeting uni->name with a label of non-trivial length overflows the allocation. CWE-129 (Improper Validation of Array Index) is the assigned root cause class, reflecting the failure to validate the copy length against the buffer capacity before the memcpy. The fix replaces the fixed-size array with a variable-length array (VLA) sized appropriately for the input. Affected products per CPE: cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* across multiple stable branches.
RemediationAI
The primary fix is to update to a patched Linux kernel version that incorporates one of the five stable-branch commits referenced in the NVD patch references (https://git.kernel.org/stable/c/1997cdc3e727526aa5d84b32f7cbb3f56459b7ef and siblings). Upstream fixes are available as stable commits; exact released patched kernel versions per stable branch are not confirmed in the available data and should be verified against distribution advisories. As a compensating control where immediate patching is not possible, restrict the ability of unprivileged users to mount NTFS filesystems by ensuring CONFIG_NTFS3_FS is not enabled if NTFS support is not required, or by enforcing kernel namespace restrictions (e.g., kernel.unprivileged_userns_clone=0 on applicable distros) to limit the attack surface. Disabling or restricting FUSE-based NTFS mounts for unprivileged users is a lower-impact workaround that does not address the ntfs3 kernel driver directly. Distributors such as Debian, Ubuntu, and RHEL typically backport these stable fixes; check vendor-specific security trackers for confirmed patched package versions.
Same weakness CWE-129 – Improper Validation of Array Index
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today