Skip to content
Info disclosure Advisory Advanced CVE-2023-27953

Apple DCERPC array marshaling uninitialized memory disclosure vulnerability

The DCERPC array marshaling code on macOS can use uninitialized memory when preparing a reply for an out-only open array, potentially disclosing fragments of previously used memory. An authenticated remote attacker can trigger this via a crafted RPC request to the mdssvc service, or a local attacker via a local socket.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

Medium 5.3 View original

There exists a vulnerability in the array marshaling code 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 parts of uninitialized memory to be disclosed.

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, an out-only open array is allocated during unmarshalling but not initialised before marshalling, and a strlen call on the uninitialised buffer determines the length of data to include in the reply.

Impact

An attacker could potentially disclose fragments of previously used memory, including other requests and replies as well as memory pointers, though with an idle service uninitialized memory often contains zeroes and no ill effect is achieved.

What the attacker needed

Authenticated remote attacker; or local attacker with socket access; target service mdssvc running

The fix

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

How it was found

  1. Send a valid mdssvc_open RPC request with a non-existent target share to the mdssvc endpoint, either directly or over SMB.
  2. The service allocates an out-only array during unmarshalling but does not initialise it.
  3. During marshalling of the reply, strlen is called on the uninitialised array, and its contents may be included in the response.

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.

When a program allocates memory for a reply, it should fill it with data before sending it. Here, the program sometimes sends back memory that was never filled in, which can contain leftover data from earlier operations. An attacker who can send requests to the service might receive that leftover data in the response.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

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.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.