by Flow · 5y ago · 0 comments
Big Ouch. I wonder how the Linux developers will approach this bug since they don't enforce syscalls to be done from glibc.
I don't think it'll be a bit problem, anyway. In my experience not very much calls syscalls directly. Go is a big exception, though...
What about musl? uClibc?
Linux is well known for the fact that it guarantees its syscall interface as primary contract to userspace.
In either case though there is a libc that most software will use, and the mitigations can be applied there. Even though direct use of syscalls is legal on Linux, the fact that it's stable is primarily relevant and interesting to said libc developers.
The fact that syscalls aren't guaranteed on other systems is usually of little consequence since the libc is developed in tandem with the kernels of those systems. Linux's situation as a fully decoupled kernel means it does things differently in that sense. The developers are fully separated, so there needs to be a strong "contract" that syscalls will be stable.
Doesn't mean (IMO) it's a good idea for end-users e.g. software developers to use syscalls except in exceptional circumstances. Which is usually the case!
libc is not intended to be the official entry point in any way or form, and kernel vulnerabilities and workarounds are not meant to be handled by a libc implementation.
That other OSs make libc their official interface is primarily because it's the simplest thing to do when kernel, libc and the rest of userspace is co-developed, as it allows for breaking kernel changes and other fun things that are not allowed under Linux ABI guarantees anyways.
It is not because it is the most secure choice, or that dealing with syscalls is hard (syscalls are easy and safe to work with). It's just that stable ABIs are a lot of work to develop, and this structure is just the simplest for smaller OS communities to develop.
If someone successfully injects code that perform a direct syscall they can successfully use this info leak despite a safe and patched (g)libc.
Desktop Linux is hardly the majority of Linux installations. How many containers in the cloud are using something like Alpine Linux?
I'd dare say by and large glibc is in the minority.
Note that the mail is from 2020. So it probably already is fixed. It might be this one
https://patchwork.kernel.org/project/linux-arm-kernel/patch/...