Skip to content
Memory corruption Advisory Advanced CVE-2023-27935

Apple DCERPC association groups heap overflow

A heap overflow exists in Apple macOS DCERPC due to an integer overflow when expanding the association group table. An authenticated remote attacker could send a crafted network packet to trigger memory corruption, potentially leading to arbitrary code execution.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 7.5 View original

A heap overflow vulnerability exists in the way DCERPC library as used in Apple macOS 12.6.1 keeps track of association groups related to BIND requests. A specially-crafted network packet can cause an integer overflow, which can result in heap overflow, possibly leading to arbitrary code execution.

Aleksandar Nikolic, on Cisco Talos

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

Likely a 16-bit unsigned integer overflow when adding a fixed allocation size to the current group count, leading to an undersized heap allocation followed by a memcpy using the original (non-overflowed) size.

Impact

A remote authenticated attacker could cause memory corruption and possibly arbitrary code execution; a local attacker could trigger it via a local socket.

What the attacker needed

Authenticated remote access or local socket access; ability to send crafted DCERPC packets

The fix

It was fixed by Apple on 2023-03-27.

How it was found

  1. Craft two BIND PDUs to trigger TALOS-2022-1679 and reach the vulnerable code path.
  2. Send the crafted packets to the DCERPC service, causing the association group table to expand.
  3. The integer overflow leads to a small allocation, and the subsequent memcpy overflows the heap buffer.

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 corruption bug in a part of macOS that handles a network protocol called DCERPC. When the system tries to make room for a new 'association group', a number used for the size wraps around to a small value, so too little memory is reserved and then a large copy overflows the buffer. An attacker who can send network packets could exploit this to crash the service or possibly 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.

More by Aleksandar Nikolic

View all

147 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.