Skip to content
Memory corruption Write-up Advanced

(CVE-2019-16337) Hancom Office Use-after-Free in HncBD90

A use-after-free flaw exists in Hancom Office when it opens a specially crafted spreadsheet file. The text claims this could lead to code execution in the context of the application.

starlabs.sg

Published on starlabs.sg

Hangul Office is published by Hancom, Inc. and is considered one of the more popular Office suites used within South Korea. When opening a specially crafted Office Open XML Workbook (.xlsx), HncBD90 uses realloc function to reallocate a memory buffer, but after the realloc it continues using the old pointer that has…

The author, 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

The program reallocated a memory buffer but continued to use the stale pointer to the old buffer instead of the new one.

Impact

This could lead to code execution under the context of the application.

What the attacker needed

Victim opens a crafted .xlsx file

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.

When a program needs more memory for some data, it can ask the system to resize an existing block. If the block moves, the old address becomes invalid. This report says the program kept using the old address after the resize, which can let an attacker who supplies a malicious file take control of the program.

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.

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.