CVE-2023-4273: Kernel: exfat: stack overflow in exfat_get_uniname_from_ext_entry
A flaw was found in the exFAT driver of the Linux kernel. The vulnerability exists in the implementation of the file name reconstruction function, which is responsible for reading file name entries from a directory index and merging file name parts belonging to one file into a single long file name. Since the file name characters are copied into a stack variable, a local privileged attacker could use this flaw to overflow the kernel stack.
Other sources
A flaw was found in the exFAT driver of the Linux kernel. The vulnerability exists in the implementation of the file name reconstruction function, which is responsible for reading file name entries from a directory index, merging file name parts belonging to one file into a single, long file name.
In particular, there is a stack overflow in the exfatgetuninamefromextentry() function. This function iterates over a set of entries (in a directory index) looking for those belonging to a file name. And for each file name entry encountered in the current set, it calls the exfatextractuniname() function, which copies characters from a given file name entry into the "uniname" variable. This variable is actually defined on the stack of the exfatreaddir() function. According to the definition of the "exfatuniname" type, the file name limit is 258 characters, but the exfatgetuninamefromextentry() function can write more characters, because it iterates until the limit defined by the "es.numentries" field is hit (e.g., if there are 100 file name entries, the maximum number of file name characters stored in the set is 1500, so the overflow is 1242 characters, or 2484 bytes; this situation is a file system format violation, because file names longer than 255 characters are forbidden, but the current code works this way).
— Red Hat
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2023-4273?
CVE-2023-4273 has been classified with a moderate severity level due to its potential impact on the integrity and availability of file operations.
How do I fix CVE-2023-4273?
To fix CVE-2023-4273, you should upgrade to the latest kernel version above 6.5 or install recommended patches provided by your distribution.
Which Linux versions are affected by CVE-2023-4273?
CVE-2023-4273 affects Linux kernel versions up to 6.4 and specific release candidates of 6.5.
Does CVE-2023-4273 affect all Linux distributions?
CVE-2023-4273 primarily affects Linux distributions based on certain kernels, including Red Hat, Debian, and Fedora.
What potential impact does CVE-2023-4273 have on systems?
The vulnerability could lead to file system corruption and may allow unauthorized access or data loss in systems using the affected exFAT driver.