Skip to content
Memory corruption Write-up Advanced

Apple CoreText - An Unexpected Journey to Learn about Failure

An out-of-bounds write exists in Apple CoreText's handling of the morx table. An attacker could potentially trigger memory corruption with a crafted font, though the Safari exploit was not completed.

Daniel Lim Wee Soong Follow

Published on starlabs.sg

Late last year, I have focused my research on the CoreText framework for 2-3 months. In particular, the code related to the text shaping engine and the code responsible for parsing the AAT tables.

Daniel Lim Wee Soong (@daniellimws), on starlabs.sg

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a missing bounds check when parsing the morx table, allowing an out-of-bounds write.

What the attacker needed

Victim loads a crafted font; font contains a morx table

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 write-up has not been written yet. The Original tab links to the source.

Fonts contain instructions for shaping text. CoreText reads these. A mistake in handling the morx table let data be written out of bounds, which could corrupt memory.

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 from Apple

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.