Skip to content
Memory corruption Write-up Advanced

Qualys TRU Discovers Important Vulnerabilities in GNU C Library’s syslog()

A heap-based buffer overflow in glibc's __vsyslog_internal() function allows local privilege escalation, enabling an unprivileged user to gain full root access. Two minor related flaws (off-by-one and integer overflow) were also found, and a separate memory corruption in qsort() requires a non-transitive comparison function and attacker-controlled element count.

Qualys Threat Research Unit (TRU) Follow

Published on blog.qualys.com

The Qualys Threat Research Unit (TRU) has recently unearthed four significant vulnerabilities in the GNU C Library, a cornerstone for countless applications in the Linux environment.

Qualys Threat Research Unit (TRU), on blog.qualys.com

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 or incorrect size check when formatting the syslog message, leading to a heap buffer overflow; the qsort issue stems from a missing bounds check when a non-transitive comparison function is used with many elements.

Impact

The syslog flaw could allow local privilege escalation to root on affected distributions, while the qsort flaw could lead to memory corruption but no real-world vulnerable programs have been identified.

What the attacker needed

Local access to a vulnerable system; application uses syslog with long argv[0] or ident; qsort used with non-transitive comparison

The fix

The glibc developers addressed the qsort issue in a recent update, and patches for the syslog vulnerabilities were developed and shared with distributors.

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.

The GNU C Library (glibc) is a core piece of software that almost every program on a Linux computer uses. A bug in one of its logging functions lets a normal user trick a program into writing too much data into a small memory space, which can be used to take full control of the machine. The report also mentions a separate bug in a sorting function that only appears when a program uses an unusual comparison rule and processes a very large number of items.

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 Qualys Threat Research Unit (TRU)

View all

2 more disclosed reports, best first.

More from GNU C Library (glibc)

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.