CVE-2023-40084

7.8 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in Android's mDNS service discovery component (MDnsSdListener.cpp) that allows local privilege escalation without user interaction. Attackers can exploit memory corruption to gain elevated privileges on affected Android devices. All Android devices running vulnerable versions are affected.

💻 Affected Systems

Products:
  • Android
Versions: Android versions prior to December 2023 security patch level
Operating Systems: Android
Default Config Vulnerable: ⚠️ Yes
Notes: Affects Android's netd daemon which runs with system privileges. All Android devices with vulnerable versions are affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete device compromise allowing attackers to execute arbitrary code with system privileges, potentially installing persistent malware or accessing sensitive data.

🟠

Likely Case

Local privilege escalation allowing attackers to bypass application sandboxing and gain system-level access to the device.

🟢

If Mitigated

Limited impact if patched; unpatched devices remain vulnerable to local attackers with physical or remote access.

🌐 Internet-Facing: LOW (requires local access to device)
🏢 Internal Only: HIGH (exploitable by any local user or app on the device)

🎯 Exploit Status

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

Exploitation requires local access to the device but no user interaction. The vulnerability is in system-level code, making exploitation non-trivial but feasible for skilled attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: December 2023 Android Security Patch Level or later

Vendor Advisory: https://source.android.com/security/bulletin/2023-12-01

Restart Required: Yes

Instructions:

1. Check for Android system updates in Settings > System > System update. 2. Install December 2023 or later security patch. 3. Reboot device after installation.

🔧 Temporary Workarounds

Disable mDNS service discovery

android

Disable multicast DNS service discovery functionality to prevent exploitation

adb shell settings put global mdns_discovery_enabled 0
adb shell service call connectivity 33 i32 0

🧯 If You Can't Patch

  • Restrict physical access to devices and implement strict app installation policies
  • Monitor for suspicious privilege escalation attempts using Android security logging

🔍 How to Verify

Check if Vulnerable:

Check Android security patch level in Settings > About phone > Android version > Security patch level

Check Version:

adb shell getprop ro.build.version.security_patch

Verify Fix Applied:

Verify security patch level shows December 2023 or later date

📡 Detection & Monitoring

Log Indicators:

  • Unexpected privilege escalation in system logs
  • Crash reports from netd daemon
  • SELinux denials related to mDNS

Network Indicators:

  • Unusual mDNS traffic patterns
  • Unexpected service discovery requests

SIEM Query:

source="android_system" AND (process="netd" AND (event="crash" OR event="privilege_escalation"))

🔗 References

📤 Share & Export