CVE-2018-9387

7.8 HIGH

📋 TL;DR

CVE-2018-9387 is an integer overflow vulnerability in Android's mnh-sm.c driver that can trigger a heap overflow, allowing local privilege escalation without user interaction. This affects Android devices, particularly Google Pixel phones, enabling attackers to gain elevated system privileges from a standard user context.

💻 Affected Systems

Products:
  • Google Pixel
  • Google Pixel XL
  • Google Pixel 2
  • Google Pixel 2 XL
Versions: Android versions prior to 2018-06-05 security patch level
Operating Systems: Android
Default Config Vulnerable: ⚠️ Yes
Notes: Specifically affects the mnh-sm.c driver in the kernel. Devices must be running vulnerable Android versions with the affected driver loaded.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete device compromise with root/system-level access, allowing installation of persistent malware, data theft, and bypassing all security controls.

🟠

Likely Case

Local privilege escalation where a malicious app gains elevated permissions to access sensitive data or system functions normally restricted.

🟢

If Mitigated

Limited impact if devices are fully patched and have additional security controls like SELinux enforcing mode and app sandboxing.

🌐 Internet-Facing: LOW - This is a local privilege escalation vulnerability requiring local access or malicious app installation.
🏢 Internal Only: MEDIUM - Could be exploited by malicious apps or users with physical access to devices within an organization.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires understanding of kernel heap manipulation and driver interaction. No user interaction needed but requires local access or malicious app installation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Android security patch level 2018-06-05 or later

Vendor Advisory: https://source.android.com/security/bulletin/pixel/2018-06-01

Restart Required: Yes

Instructions:

1. Check current Android security patch level in Settings > System > About phone. 2. If patch level is before 2018-06-05, update via Settings > System > System update. 3. Reboot device after update completes.

🔧 Temporary Workarounds

Disable unnecessary kernel modules

Android with root access

Unload or blacklist the mnh-sm driver if not required for device functionality

rmmod mnh_sm
echo 'blacklist mnh_sm' >> /etc/modprobe.d/blacklist.conf

🧯 If You Can't Patch

  • Restrict physical access to devices and implement strict app installation policies
  • Use mobile device management (MDM) solutions to monitor for suspicious activity and enforce security policies

🔍 How to Verify

Check if Vulnerable:

Check Android security patch level: Settings > System > About phone > Android security patch level. If date is before 2018-06-05, device is vulnerable.

Check Version:

adb shell getprop ro.build.version.security_patch

Verify Fix Applied:

Verify patch level shows 2018-06-05 or later. Check kernel version and ensure mnh-sm driver is patched or not loaded.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic logs
  • Unexpected driver crashes in dmesg
  • SELinux denials related to mnh-sm driver

Network Indicators:

  • None - this is a local privilege escalation vulnerability

SIEM Query:

Search for kernel panic events, unexpected reboots, or privilege escalation attempts in Android device logs

🔗 References

📤 Share & Export