CVE-2023-33551

7.8 HIGH

📋 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

Products:
  • erofs-utils
Versions: Version 1.6
Operating Systems: Linux distributions with erofs-utils v1.6
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability triggers when processing crafted erofs filesystem images with the erofsfsck utility.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: MEDIUM - Risk exists if systems process untrusted erofs images from external sources, but requires specific file processing scenarios.
🏢 Internal Only: LOW - Typically requires local access or specific file processing workflows to exploit.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

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

linux

Limit 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

📤 Share & Export