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

Apple DCERPC association groups use-after-free vulnerability

A use-after-free flaw exists in Apple's DCERPC association group handling: when an association is freed, a dangling reference can remain in the group's linked list, and growing the group table later writes through that stale pointer. An attacker who can send crafted RPC requests could corrupt memory and potentially execute arbitrary code.

Dimitrios Tatsis Follow

Originally disclosed on Cisco Talos

High 7.5 View original

A use-after-free vulnerability exists in the library supporting DCERPC functionality in Apple macOS 13.1. A series of specially crafted network packets trigger a use-after-free condition which can lead to memory corruption and arbitrary code execution.

Dimitrios Tatsis, 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 the association deallocation routine frees an association object without unlinking it from its association group, so the group's linked list retains a dangling pointer that is later dereferenced during table growth.

Impact

With precise timing and memory layout control, this use-after-free could result in memory corruption and ultimately arbitrary code execution.

What the attacker needed

Ability to reach the RPC service; authenticated remote or local socket access; precise timing of connections

The fix

It was fixed by Apple in May 2023; the underlying fix should unlink an association from its group when the association is deallocated.

How it was found

  1. Open RPC sessions so that association objects are created and added to association groups.
  2. Terminate a connection so its association object is freed while a dangling reference remains in the group list.
  3. Send further association requests until the group table must be expanded.
  4. Trigger the table growth so the code updates the list head pointers, writing through the freed association.

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.

A use-after-free happens when a program frees a piece of memory but keeps a pointer to it and later writes through that pointer. Here the RPC service keeps a list of connections, and a closed connection can stay in the list after its memory is released. When the list is resized, the program writes into the freed memory, which an attacker may be able to shape into code execution.

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 Dimitrios Tatsis

View all

21 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.