158 points

For your convenience:

The researchers pointed out that the vulnerability cannot be exploited remotely. An attacker can trigger the issue by providing crafted inputs to applications that employ these [syslog] logging functions [in apps that allow the user to feed crafted data to those functions].

This is a privilege escalation.

permalink
report
reply
54 points

The hero we need."; DROP TABLE “users”;

permalink
report
parent
reply
7 points

If it isn’t little Bobby Tables again.

permalink
report
parent
reply
4 points

This may be difficult to exploit in practice - I don’t think most user applications use syslog.

permalink
report
parent
reply
1 point

Unless you have user access to a system with gcc on it.

permalink
report
parent
reply
9 points

You still need some privileged process to exploit. Glibc code doesn’t get any higher privileges than the rest of the process. From kernel’s point of view, it’s just a part of the program like any other code.

So if triggering the bug in your own process was enough for privilege escalation, it would also be a critical security vulnerability in the kernel - it can’t allow you to execute a magic sequence of instructions in your process and become a root, that completely destroys any semblance of process / user isolation.

permalink
report
parent
reply
95 points

"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.

permalink
report
reply
67 points
*

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.

permalink
report
parent
reply
9 points

So, it must be with the BSDs too?

permalink
report
parent
reply
1 point

BSDs use libc

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
-2 points

Wait, why has a compiler system log functionlity?

permalink
report
parent
reply
22 points

glibc is a library, gcc is the compiler.

permalink
report
parent
reply
5 points

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

permalink
report
parent
reply
35 points

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

permalink
report
parent
reply
6 points

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?

permalink
report
parent
reply
4 points

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.

permalink
report
parent
reply
52 points

Security-critical C and memory safety bugs. Name a more iconic duo…

I’d have kinda preferred for public disclosure to have happened after the fix propagated to distros. Now we get to hurry the patch to end-users which isn’t always easily possible. Could we at least have a coordinated disclosure time each month? That’d be great.

permalink
report
reply
12 points

Public disclosure is typically done 90 days after Deva are privately notified. That should be enough time for security-critical bugs.

permalink
report
parent
reply
12 points

They did follow that. You can read their disclosure timeline in their report.

Problem is that the devs of glibc aren’t the only people interested in getting glibc patched but us distro maintainers too.

What I would have preferred would be an early private disclosure to the upstream maintainers and then a public but intentionally unspecific disclosure with just the severity to give us distro people some time to prepare a swift rollout when the full disclosure happens and the patch becomes public.

Alternatively, what would be even better would have been to actually ship the patch in a release but not disclose its severity (or even try to hide it by making it seem like a refactor or non-security relevant bugfix) until a week or two later; ensuring that any half-decent distro release process and user upgrade cycle will have the patch before its severity is disclosed. That’s how the Linux kernel does it AFAIK and it’s the most reasonable approach I’ve seen.

permalink
report
parent
reply
6 points
Deleted by creator
permalink
report
parent
reply
3 points

I’m afraid I don’t understand what you’re trying to say.

permalink
report
parent
reply
4 points

I am not sure as well, but maybe they meant “maybe an early and public disclosure increases the urgency of the fix for the developers”?

permalink
report
parent
reply
31 points

glibc is great, but holy shit the source code is obscured into oblivion, so hard to understand, with hardcoded optimizations, and compiler optimizations. I understand how difficult is to find vulnerabilities. A bit sad that the only C lib truely free software is so hard to actually read its code or even contribute to it.

permalink
report
reply
23 points
*

For what it’s worth, glibc is very much performance-critical, so this shouldn’t be a surprise. Any possible optimization is worth it.

There are a ton of free software libc implementations outside of glibc. I think most implementations of libc are free software at this point. There’s Bionic, the BSD libcs, musl, the Haiku libc, the OpenSolaris/OpenIndiana libc, Newlib, relibc, the ToaruOS libc, the SerenityOS libc and a bunch more. Pretty sure Wine/ReactOS also have free implementations of the Windows libc.

permalink
report
parent
reply
2 points

Glibc has extensions that fragment compatibility. If Glibc is replaced by another libc, some apps prints an error, or don’t work. I noticed that on Alpine.

permalink
report
parent
reply
5 points
*

Eventually it’ll be easier to create a compatible drop-in replacement than maintain the decades old code, if it isn’t already

permalink
report
parent
reply
11 points

Unlikely, unless you drop backwards compatibility for undefined behaviour. Unless you write a complete specification on it, you’ll end up either breaking old stuff, or slowly rebuilding the same problems.

permalink
report
parent
reply
2 points

Like what’s happening to X. Wayland is replacing it.

permalink
report
parent
reply
3 points

Wayland is not a drop-in replacement tho. It’s like if glibc developers declared it obsolete and presented a “replacement” that has a completely different API and has 1/100 of glibc functionality and a plugin interface. And then all the dozens of Linux distros have to write all the plugins from scratch to add back missing functionality and do it together in perfect cooperation so that they remain compatible with each other.

permalink
report
parent
reply
29 points

Debian (versions 12 and 13), Ubuntu (23.04 and 23.10), and Fedora (37 to 39). Other distributions are probably also impacted.

permalink
report
reply
13 points

Patch time

permalink
report
parent
reply
4 points
*

https://security-tracker.debian.org/tracker/CVE-2023-6246

Don’t know if Fedora has any similar easy way of tracking vulnerabilities

permalink
report
parent
reply
4 points

12 and 13 have patches out in the security repo. Apt update && apt upgrade fixed it right up.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.4K

    Monthly active users

  • 6.3K

    Posts

  • 172K

    Comments