Root access vulnerability in glibc library impacts many Linux distros

joojmachine@lemmy.ml to Linux@lemmy.ml – 353 points –
Root access vulnerability in glibc library impacts many Linux distros
securityaffairs.com
87

You are viewing a single comment

"A qsort vulnerability is due to a missing bounds check and can lead to memory corruption. It has been present in all versions of glibc since 1992. "

This one amazes me. Imagine how many vulnerabilities future researchers will discover in ancient software that persisted/persist for decades.

That's not the main part of the article, just a footnote, for anyone wondering.

The flaw resides in the glibc’s syslog function, an attacker can exploit the flaw to gain root access through a privilege escalation.

The vulnerability was introduced in glibc 2.37 in August 2022.

So, it must be with the BSDs too?

Iirc bad does not use glibc, but I'm not very involved with BSD.

It wouldn't make sense. Glibc is LGPL licensed, not really compatible with the BSD license...

Wait, why has a compiler system log functionlity?

You are probably confusing the glibc with gcc and g++. Glibc is an implementation of the C standard library, made by GNU (thats where the g in the name comes from).

If you were to look into it, it uses the syscalls to tell the underlying computer system what to do when you call functions, such as printf.

If you want to read more, see here

C is just crazy. You accidentally forget to put the bounds in a sorting function, and now you are root.

According to the link in the article, the qsort() bug can only be triggered with a non-transitive cmp() function. Would such a cmp function ever be useful?

You don't necessarily have to write a non-transitive cmp() function willingly, it may happen that you write one without realizing due to some edge cases where it's not transitive.