CVE-2017-5332

7.8 HIGH

📋 TL;DR

CVE-2017-5332 is a memory corruption vulnerability in icoutils' wrestool component that allows local users to crash processes and potentially execute arbitrary code via crafted executables. This affects systems running icoutils before version 0.31.1, primarily Linux distributions that include this icon/cursor extraction utility. The vulnerability requires local access to trigger.

💻 Affected Systems

Products:
  • icoutils
Versions: All versions before 0.31.1
Operating Systems: Linux distributions including Debian, Red Hat, openSUSE, and derivatives
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where icoutils is installed and used to process executable files with icon/cursor resources.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation leading to full system compromise through arbitrary code execution with the privileges of the icoutils process.

🟠

Likely Case

Denial of service through application crashes when processing malicious icon/cursor resources.

🟢

If Mitigated

Limited impact if icoutils is not installed or if SELinux/AppArmor restricts process capabilities.

🌐 Internet-Facing: LOW - Requires local access to execute malicious files; not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users could exploit this for privilege escalation or DoS attacks on affected systems.

🎯 Exploit Status

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

Exploitation requires local user access and ability to run icoutils on crafted files. Memory corruption vulnerabilities in parsing utilities often lead to reliable exploits.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.31.1

Vendor Advisory: http://www.nongnu.org/icoutils/

Restart Required: No

Instructions:

1. Update icoutils package using your distribution's package manager. 2. For Debian/Ubuntu: sudo apt update && sudo apt install icoutils. 3. For RHEL/CentOS: sudo yum update icoutils. 4. For openSUSE: sudo zypper update icoutils.

🔧 Temporary Workarounds

Remove icoutils package

linux

Uninstall icoutils if not required for system functionality

sudo apt remove icoutils
sudo yum remove icoutils
sudo zypper remove icoutils

Restrict icoutils execution

linux

Use SELinux/AppArmor to restrict icoutils capabilities and file access

# Configure SELinux: semanage permissive -d icoutils_t
# Or create AppArmor profile restricting icoutils

🧯 If You Can't Patch

  • Remove execute permissions from icoutils binary for non-privileged users
  • Implement strict file upload controls to prevent malicious executables from reaching systems

🔍 How to Verify

Check if Vulnerable:

Check icoutils version: wrestool --version | grep -q '0.3[0-9]\|0\.2\|0\.1\|0\.0' && echo 'VULNERABLE'

Check Version:

wrestool --version 2>/dev/null || icoutils --version 2>/dev/null || dpkg -l icoutils 2>/dev/null || rpm -q icoutils 2>/dev/null

Verify Fix Applied:

Verify version is 0.31.1 or later: wrestool --version | grep -q '0\.31\.[1-9]\|0\.3[2-9]\|0\.[4-9]\|[1-9]' && echo 'PATCHED'

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault crashes in icoutils/wrestool processes
  • Abnormal process termination with memory access errors

Network Indicators:

  • Not applicable - local exploitation only

SIEM Query:

process.name:"wrestool" AND (event.action:"segmentation_fault" OR event.outcome:"failure")

🔗 References

📤 Share & Export