Skip to content
Race condition Advisory Advanced CVE-2020-9939

(Pwn2Own) Apple macOS kextload Time-Of-Check Time-Of-Use Memory Corruption Vulnerability

A time-of-check time-of-use memory corruption flaw in macOS kextload's handling of kernel extensions allows a local attacker with high-privileged code execution to escalate to kernel privileges. The attacker can leverage this in conjunction with other vulnerabilities to execute code in the kernel context.

(@jinmo123 Follow

Originally disclosed on Zero Day Initiative

High 8.2 View original

This vulnerability allows local attackers to escalate privileges on affected installations of Apple macOS. An attacker must first obtain the ability to execute high-privileged code on the target system in order to exploit this vulnerability.

@SSLab_Gatech (@jinmo123, @setuid0x0_, and @insu_yun_en), on the Zero Day Initiative

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 race condition due to missing locking when accessing a shared object during kernel extension loading.

Impact

A local attacker with high-privileged code execution could escalate to kernel-level code execution, but only in conjunction with other vulnerabilities.

What the attacker needed

Local access; high-privileged code execution; another vulnerability

The fix

Apple issued an update to correct this vulnerability.

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 how macOS loads kernel extensions (kexts), which are pieces of code that run with the highest privileges. Because the program checks something and then uses it later without locking, an attacker who already has some high-level access can trick it into corrupting memory and gain even more control, potentially taking over the whole system.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by (@jinmo123

View all

1 more disclosed report, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.