Skip to content
Memory corruption Advisory Advanced CVE-2018-4421

Apple IntelHD5000 Graphics Process Token Privilege Escalation Vulnerability

A use-after-free vulnerability in the IntelHD5000 kernel extension allows a local attacker to escalate privileges to kernel level by manipulating a user-supplied index to delete a resource that is later reused. An attacker could execute arbitrary code in the kernel context.

Tyler Bohan Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A memory corruption vulnerability exists in the IntelHD5000 kernel extension when dealing with graphics resources inside of OSX 10.13.4. A library inserted into the VLC media application can cause an out-of-bounds access inside of the KEXT leading to a use after free and invalid memory access in the context of the…

Tyler Bohan, 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

The kernel extension fails to properly validate a user-supplied index before using it to look up and release a resource, allowing an attacker to free an arbitrary resource that is later accessed without proper checks.

Impact

An attacker could execute arbitrary code in the context of the kernel, leading to privilege escalation; the vulnerability is also reachable from inside the Safari sandbox, increasing the attack surface.

What the attacker needed

Local access to the system; ability to inject a library into VLC

The fix

The vendor patched the vulnerability and released an update.

How it was found

  1. Inject a library into the VLC media application.
  2. The library intercepts IOConnectCallMethod calls and modifies the input argument from 11 to 3 after 700 calls.
  3. This causes the kernel extension to delete a different resource than intended.
  4. The deleted resource is later accessed in process_token_IndirectStateBaseAddress, leading to a use-after-free.

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 is a bug in a macOS driver that handles graphics. A program can ask the driver to delete a resource, but due to a missing check, it can delete the wrong one. Later, when the driver tries to use that resource, it's already gone, leading to memory corruption that can be exploited to run malicious code with high privileges.

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 Tyler Bohan

View all

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