CVE-2021-39262
📋 TL;DR
CVE-2021-39262 is an out-of-bounds memory access vulnerability in NTFS-3G's decompression function that can be triggered by a specially crafted NTFS image. Attackers could exploit this to cause denial of service, information disclosure, or potentially execute arbitrary code. Systems using NTFS-3G to mount NTFS filesystems are affected.
💻 Affected Systems
- NTFS-3G
- FUSE-based NTFS implementations
- Linux distributions with NTFS-3G
📦 What is this software?
Ntfs 3g by Tuxera
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to full system compromise if attacker can supply malicious NTFS image and trigger decompression.
Likely Case
Denial of service (system crash) or information disclosure from memory corruption when mounting malicious NTFS volumes.
If Mitigated
Limited impact if NTFS-3G is not used or if untrusted NTFS images are not mounted.
🎯 Exploit Status
Exploitation requires attacker to provide malicious NTFS image and victim to mount it. Proof-of-concept code exists in advisory.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2021.8.22 and later
Vendor Advisory: https://github.com/tuxera/ntfs-3g/security/advisories/GHSA-q759-8j5v-q5jp
Restart Required: No
Instructions:
1. Update NTFS-3G to version 2021.8.22 or later. 2. For Linux distributions, use package manager: 'sudo apt update && sudo apt upgrade ntfs-3g' (Debian/Ubuntu) or 'sudo yum update ntfs-3g' (RHEL/CentOS). 3. Verify installation with 'ntfs-3g --version'.
🔧 Temporary Workarounds
Disable NTFS-3G mounting
linuxPrevent automatic mounting of NTFS filesystems using NTFS-3G
sudo systemctl disable ntfs-3g
sudo rm /usr/bin/mount.ntfs-3g
Mount with noexec option
linuxMount NTFS filesystems with noexec to prevent code execution
sudo mount -t ntfs-3g -o noexec /dev/sdX1 /mnt/ntfs
🧯 If You Can't Patch
- Restrict mounting of NTFS filesystems to trusted sources only
- Implement filesystem monitoring for unexpected NTFS mount attempts
🔍 How to Verify
Check if Vulnerable:
Check NTFS-3G version: 'ntfs-3g --version | head -1' and compare to 2021.8.22
Check Version:
ntfs-3g --version | head -1
Verify Fix Applied:
Confirm version is 2021.8.22 or later: 'ntfs-3g --version | grep -q "2021.8.22\|2021.8.23\|2021.8.24" && echo "Patched"'
📡 Detection & Monitoring
Log Indicators:
- Kernel logs showing NTFS-3G crashes
- System logs with segmentation faults in ntfs-3g process
Network Indicators:
- Unusual network shares mounting NTFS volumes
- SMB/CIFS connections to untrusted sources
SIEM Query:
process.name="ntfs-3g" AND event.action="segmentation fault"
🔗 References
- https://github.com/tuxera/ntfs-3g/releases
- https://github.com/tuxera/ntfs-3g/security/advisories/GHSA-q759-8j5v-q5jp
- https://lists.debian.org/debian-lts-announce/2021/11/msg00013.html
- https://security.gentoo.org/glsa/202301-01
- https://www.debian.org/security/2021/dsa-4971
- https://github.com/tuxera/ntfs-3g/releases
- https://github.com/tuxera/ntfs-3g/security/advisories/GHSA-q759-8j5v-q5jp
- https://lists.debian.org/debian-lts-announce/2021/11/msg00013.html
- https://security.gentoo.org/glsa/202301-01
- https://www.debian.org/security/2021/dsa-4971