Apple IntelHD5000 Graphics Delete Resource Privilege Escalation Vulnerability
A use-after-free flaw in the AppleIntelHD5000Graphics kernel extension lets a user-supplied resource index select and release the wrong graphics resource, which is later reused. An attacker with local code execution could exploit this to run arbitrary code in the kernel and escalate privileges.
Originally disclosed on Cisco Talos
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…
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 delete_resource function trusts a user-supplied index to look up a resource, and the later execute and prepare functions use a fallback resource pointer without checking it is valid.
Impact
An attacker could execute arbitrary code in the context of the kernel and escalate privileges; the flaw is also reachable from inside the Safari sandbox, widening the attack surface.
What the attacker needed
Local code execution on the target; inject a library into a process such as VLC; affected Intel HD 5000 GPU model
How it was found
- Build the proof-of-concept as a shared library and inject it into the VLC process.
- Intercept the IOConnectCallMethod call that talks to the IGAccelSharedUserClient.
- Change the resource index passed to the delete_resource selector from 1 to 5 or 7.
- Trigger the execute or prepare function so the freed resource is used again, causing a kernel panic.
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 kernel extension is a piece of software that runs with the highest privileges inside the operating system. Here, a graphics driver could be tricked into freeing a memory object and then using it again, which is called a use-after-free. If an attacker controls what fills that freed memory, they can take over the kernel and gain full control of the machine.
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.