Apple DCERPC call request uninitialized memory heap overflow vulnerability
A heap overflow vulnerability in Apple's DCERPC library allows a remote or local attacker to trigger use of uninitialized memory by sending a specially crafted network packet, potentially leading to arbitrary code execution.
Originally disclosed on Cisco Talos
A heap overflow vulnerability exists in the request processing functionality of DCERPC library as used in Apple macOS 12.6.1 that can lead to use of uninitialized memory. A specially-crafted network packet can cause use of uninitialized memory which can lead to heap overflow and arbitrary code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code fails to initialize the iovector length field when processing a MAYBE call, leaving it with an uninitialized value that is later used as a loop bound, leading to a heap overflow.
Impact
A remote attacker could potentially achieve arbitrary code execution by controlling the uninitialized memory contents, though the report notes that this would require multiple simultaneous connections and precise timing.
What the attacker needed
Network access to SMB service or local UNIX socket access; authentication for network vector
The fix
The vulnerability was fixed by Apple on 2023-03-27.
How it was found
- Send a bind request packet to reach the proper state of the state machine.
- Send a subsequent RPC call request with the MAYBE flag set.
- The uninitialized num_elt value causes an out-of-bounds access in rpc__cn_call_end.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This report describes a memory safety bug in a network service on macOS. When a particular type of request is sent, the program uses a value that was never set, which can cause it to read or write outside its intended memory, potentially letting an attacker run their own code.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.