CVE-2023-33551
📋 TL;DR
This CVE describes a heap buffer overflow vulnerability in erofs-utils v1.6 that allows remote attackers to execute arbitrary code by providing a maliciously crafted erofs filesystem image. Systems using erofs-utils v1.6 for filesystem operations are affected, particularly when processing untrusted filesystem images.
💻 Affected Systems
- erofs-utils
📦 What is this software?
Erofs Utils by Erofs Utils Project
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with the privileges of the erofsfsck process, potentially leading to full system compromise if the process runs with elevated privileges.
Likely Case
Denial of service through application crash, with potential for limited code execution depending on process privileges and exploit sophistication.
If Mitigated
Application crash without code execution if exploit fails or process runs with minimal privileges.
🎯 Exploit Status
Exploitation requires crafting a malicious erofs filesystem image and getting it processed by vulnerable systems.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Version 1.7 or later
Vendor Advisory: https://github.com/lometsj/blog_repo/issues/2
Restart Required: No
Instructions:
1. Update erofs-utils to version 1.7 or later using your distribution's package manager. 2. For Fedora: 'sudo dnf update erofs-utils'. 3. For other distributions, check package repositories for updated version.
🔧 Temporary Workarounds
Restrict erofsfsck usage
linuxLimit execution of erofsfsck to trusted users and avoid processing untrusted erofs images.
chmod 750 /usr/bin/erofsfsck
setfacl -m u:trusteduser:rx /usr/bin/erofsfsck
🧯 If You Can't Patch
- Implement strict input validation for erofs filesystem images before processing
- Run erofsfsck in a sandboxed environment with minimal privileges
🔍 How to Verify
Check if Vulnerable:
Check erofs-utils version: 'erofsfsck --version' or 'rpm -q erofs-utils' or 'dpkg -l erofs-utils'
Check Version:
erofsfsck --version
Verify Fix Applied:
Verify version is 1.7 or later: 'erofsfsck --version | grep -q "1\.7" && echo "Patched"'
📡 Detection & Monitoring
Log Indicators:
- Segmentation fault or crash logs from erofsfsck process
- Unexpected process termination of erofsfsck
Network Indicators:
- Unusual file transfers of erofs images to vulnerable systems
SIEM Query:
process.name:"erofsfsck" AND (event.action:"segmentation_fault" OR event.action:"crash")
🔗 References
- https://github.com/lometsj/blog_repo/issues/2
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FHOIRL6XH5NYR3LYI3KP5DE4SDSQWR7W/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IGGIYW7PHYQM2NPYCJPSPSLULLD2P2PE/
- https://github.com/lometsj/blog_repo/issues/2
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FHOIRL6XH5NYR3LYI3KP5DE4SDSQWR7W/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IGGIYW7PHYQM2NPYCJPSPSLULLD2P2PE/