macOS Mojave System Lockup via vmmap Utility Targeting PID 1
A bug in macOS Mojave causes a system lockup when the vmmap utility is executed against process ID 1 (launchd), due to a deadlock triggered by XPC calls during symbolication.
A critical bug exists in macOS Mojave (10.14) where executing the vmmap utility against process ID 1, which is always launchd, causes a complete system lockup. This issue was discovered when users reported that the TaskExplorer utility, which uses vmmap to enumerate loaded dynamic libraries in remote processes, would freeze the system when run. The root cause is that vmmap suspends the target process before enumerating memory regions. When launchd (PID 1) is targeted, this suspension prevents vmmap from completing its symbolication process, which relies on XPC communication facilitated by launchd. The blocked XPC call results in a deadlock, requiring a hard reboot of the affected macOS Mojave system.
Attack Chain
- An attacker (or a system utility like TaskExplorer) attempts to enumerate loaded libraries of a process.
- TaskExplorer executes the
vmmapcommand, targeting a specific process ID (PID). - The
vmmaputility starts and is given PID 1 as a command-line argument. vmmapinvokestask_suspendto suspend the target process (launchd) before taking a memory snapshot.vmmapattempts to symbolicate the memory regions of the suspended process via the CoreSymbolication framework, callingCoreSymbolication'mmap_storage_daemon.- The CoreSymbolication framework makes XPC calls, including
xpc_connection_resume, which are routed to launchd. - Because launchd is suspended, the XPC requests are never serviced, specifically a call to
libxpc’s_xpc_look_up_endpointforcom.apple.coresymbolicationd. - This blocked XPC call deadlocks the system, as
vmmapwaits for a response fromlaunchd, butlaunchdcannot respond because it is suspended byvmmap. The entire system becomes unresponsive, requiring a hard reboot.
Impact
Successful exploitation of this bug results in a complete system lockup on macOS Mojave. The user loses any unsaved data and must perform a hard reboot to restore functionality. While the bug does not directly lead to data theft or code execution, it causes significant disruption and data loss. This affects any user running macOS Mojave who attempts to run vmmap against PID 1, either directly or indirectly through a utility like TaskExplorer.
Recommendation
- Deploy the Sigma rule
Detect vmmap Execution Against PID 1to detect direct attempts to exploit this bug via command-line execution. - Investigate any system lockups on macOS Mojave systems and correlate them with
vmmapexecutions, using themacOS Mojave System Lockup via vmmaprule as a starting point. - Consider blocking execution of
vmmapwith PID 1 as an argument via endpoint detection and response (EDR) tools, preventing the vulnerability from being triggered.
Detection coverage 2
Detect vmmap Execution Against PID 1
highDetects command-line execution of the vmmap utility targeting PID 1, which triggers a system lockup on macOS Mojave.
macOS Mojave System Lockup via vmmap
mediumDetects potential system lockups on macOS Mojave related to vmmap activity by looking for abnormal process termination events following vmmap execution.
Detection queries are available on the platform. Get full rules →