CVE-2021-39254: Buffer Overflow
A crafted NTFS image can cause an integer overflow in memmove, leading to a heap-based buffer overflow in the function ntfsattrrecordresize, in NTFS-3G < 2021.8.22.
Other sources
From https://www.openwall.com/lists/oss-security/2021/08/30/1:
Security vulnerabilities were identified in the open source NTFS-3G and NTFSPROGS software. These vulnerabilities were confirmed and resolved. To our knowledge, these vulnerabilities have not been exploited.
These vulnerabilities may allow an attacker using a maliciously crafted NTFS-formatted image file or external storage to potentially execute arbitrary privileged code, if the attacker has either local access and the ntfs-3g binary is setuid root, or if the attacker has physical access to an external port to a computer which is configured to run the ntfs-3g binary or one of the ntfsprogs tools when the external storage is plugged into the computer. These vulnerabilities result from incorrect validation of some of the NTFS metadata that could potentially cause buffer overflows, which could be exploited by an attacker. Common ways for attackers to gain physical access to a machine is through social engineering or an evil maid attack on an unattended computer.
We recommend installing and applying the update with the security fixes, and advise to follow security guidance and frameworks such as NIST for assessing and improving an organization’s abilities to prevent, detect, and respond to security threats and cyber attacks.
AFFECTED PRODUCTS: All previous versions of open source NTFS-3G and NTFSPROGS.
WORKAROUND: None
SOLUTION: Upgrade to 2021.8.22
PROJECT URL: https://github.com/tuxera/ntfs-3g
ADVISORY ID: NTFS3G-SA-2021-0001
ISSUE DATE: 2021-08-30
SEVERITY: Moderate
CVEs: CVE-2021-33285, CVE-2021-35269, CVE-2021-35268, CVE-2021-33289, CVE-2021-33286, CVE-2021-35266, CVE-2021-33287, CVE-2021-35267, CVE-2021-39251, CVE-2021-39252, CVE-2021-39253, CVE-2021-39254, CVE-2021-39255, CVE-2021-39256, CVE-2021-39257, CVE-2021-39258, CVE-2021-39259, CVE-2021-39260, CVE-2021-39261, CVE-2021-39262, CVE-2021-39263
CVSS SCORE: 3.9-6.7
ACKNOWLEDGMENT: Jeremy Galindo, Akshay Ajayan, Kyle Zeng and Fish Wang for reporting these vulnerabilities.
— Red Hat
The ntfs3g package is susceptible to an input validation flaw. A crafted NTFS image with invalid values could trigger an improper check. This incorrect check causes an integer overflow which then leads to a heap overflow. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/ntfs3gto a version that resolves this vulnerability.Fixed in 2021.8.22 - Upgrade
Upgrade
debian/ntfs-3gto a version that resolves this vulnerability.Fixed in 1:2017.3.23AR.3-4+deb11u4Fixed in 1:2017.3.23AR.3-4+deb11u3Fixed in 1:2022.10.3-1+deb12u2Fixed in 1:2022.10.3-5 - Upgrade
Upgrade
ntfs-3g/ntfsprogsto a version that resolves this vulnerability.Fixed in 2021.8.22Patch NTFS3G-SA-2021-0001
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2021-39254?
CVE-2021-39254 is classified as a high severity vulnerability due to the potential for an integer overflow leading to a heap-based buffer overflow.
How do I fix CVE-2021-39254?
To fix CVE-2021-39254, upgrade the ntfs-3g package to version 2021.8.22 or later for affected systems.
What software is affected by CVE-2021-39254?
CVE-2021-39254 affects ntfs-3g versions prior to 2021.8.22 across multiple distributions including Red Hat, Debian, and Fedora.
What is the impact of CVE-2021-39254?
The impact of CVE-2021-39254 includes potential remote code execution and system compromise due to the buffer overflow.
Is CVE-2021-39254 a remote vulnerability?
Yes, CVE-2021-39254 can be exploited remotely through a crafted NTFS image.