CVE-2023-31284
📋 TL;DR
CVE-2023-31284 is a stack buffer overflow vulnerability in illumos's /dev/net device driver that allows local attackers to execute arbitrary code with elevated privileges. The vulnerability can be triggered by performing a stat operation on a file with an excessively long name in /dev/net. This affects all illumos-based systems running vulnerable versions.
💻 Affected Systems
- illumos
- illumos-gate
- OpenIndiana
- OmniOS
- other illumos-based distributions
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise via privilege escalation to root, allowing complete control over the affected system and potential lateral movement.
Likely Case
Local privilege escalation from an unprivileged user to root, enabling installation of persistent backdoors, data theft, or system manipulation.
If Mitigated
Limited impact if proper access controls restrict local user accounts and file permissions in /dev/net.
🎯 Exploit Status
Exploitation requires local access and knowledge of the vulnerability. No public exploit code has been released as of the advisory dates.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: illumos-gate commit 676abcb and later
Vendor Advisory: https://illumos.topicbox.com/groups/developer/T13ef186a53edeb5c-M821cc18b5884e04e16daa8fd/cve-2023-31284-buffer-overflow-in-dev-net
Restart Required: Yes
Instructions:
1. Update to illumos-gate commit 676abcb or later. 2. For distributions: Update via package manager (pkg update on OpenIndiana/OmniOS). 3. Reboot the system after patching.
🔧 Temporary Workarounds
Restrict /dev/net access
allLimit access to /dev/net device to prevent stat operations by non-privileged users
chmod 600 /dev/net
chown root:root /dev/net
🧯 If You Can't Patch
- Implement strict access controls on /dev/net device to prevent unauthorized stat operations
- Monitor for suspicious activity involving /dev/net and restrict local user accounts to trusted personnel only
🔍 How to Verify
Check if Vulnerable:
Check illumos-gate version: pkg info entire | grep version or check if commit hash is before 676abcb
Check Version:
pkg info entire | grep version
Verify Fix Applied:
Verify system is running illumos-gate commit 676abcb or later: pkg info entire | grep version
📡 Detection & Monitoring
Log Indicators:
- Multiple failed stat operations on /dev/net with long filenames
- Unexpected privilege escalation events
Network Indicators:
- None - local exploit only
SIEM Query:
process.name="stat" AND file.path="/dev/net/*" AND file.path.length>threshold
🔗 References
- http://www.openwall.com/lists/oss-security/2023/09/13/4
- http://www.openwall.com/lists/oss-security/2023/09/13/5
- http://www.openwall.com/lists/oss-security/2023/09/14/4
- https://github.com/illumos/illumos-gate/tree/16b76d3cb933ff92018a2a75594449010192eacb
- https://illumos.topicbox.com/groups/developer/T13ef186a53edeb5c-M821cc18b5884e04e16daa8fd/cve-2023-31284-buffer-overflow-in-dev-net
- http://www.openwall.com/lists/oss-security/2023/09/13/4
- http://www.openwall.com/lists/oss-security/2023/09/13/5
- http://www.openwall.com/lists/oss-security/2023/09/14/4
- https://github.com/illumos/illumos-gate/tree/16b76d3cb933ff92018a2a75594449010192eacb
- https://illumos.topicbox.com/groups/developer/T13ef186a53edeb5c-M821cc18b5884e04e16daa8fd/cve-2023-31284-buffer-overflow-in-dev-net