hah.. even worse, if you follow down the thread in your last link, apparently there is an SXID_IGNORE which they decided was better implemented as an SXID_ERASE for some variables.
musl (used by default on Alpine and Chimera Linux) and the BSD libc’s on the other hand are much more minimal and conservative.
Read: slower and with less comprehensive standards compliance (even if some of those standards are a bit nutty).
the rest is mostly fewer specialized implementations of stuff for different cpus, but that rarely makes a difference in practice (i.e. outside of microbenchmarks)
the overall standards compliance is pretty good in musl
Also available on Void Linux.
What are you basing this on? Can you demonstrate how this works?
The "house of" attack method are attacks against the allocator, its been a while since I've looked into it, I hope musl have hardened their allocator against this kind of attacks.
Musl was not being used by the business I worked in, therefore I had no interest in continuing investigation other than trying to get an understanding of how other implementations dealt with it.
I'm sorry for any confusion.
Why is this even an attack and why would musl have whatever weakness is claimed here?
GLIBC_TUNABLES=glibc.cpu.hwcaps=
-AVX
-AVX2
-AVX_Usable
-AVX2_Usable
-AVX512F_Usable
-SSE4_1
-SSE4_2
-SSSE3
-Fast_Unaligned_Load
-ERMS
-AVX_Fast_Unaligned_Load
GLIBC_TUNABLES is apparently an environment variable that lets you turn various performance knobs affecting glibc internals: https://www.gnu.org/software/libc/manual/html_node/Tunables....
OK, so obviously someone calling a SUID program shouldn't be able to set these options at all, right? So I guess the bug must be that they forgot to clear this env var when starting a suid program? Given that there have been so many vulnerabilities like this you'd think they would have really audited environment variable usage to avoid this but maybe it slipped through?
... NO WAIT! It's worse! They apparently intentionally allow some tunables to be tuned across a SUID boundary. Looking at the commit that is blamed for introducing this problem, it is explicitly dealing with the filter logic for tunables in SUID mode!
https://patchwork.ozlabs.org/project/glibc/patch/20210316070...
But whyyyyyyy? Why not just ignore it altogether? Is the use case for tuning ultra-advanced performance settings across SUID so strong that it outweighs the obvious security risks?
I mean, I'll admit, I've never seen this env var before, I have no idea how it's used and whether there's actually a good reason why you'd want to use it over SUID. But boy this seems like a hugely risky feature and sure enough... it broke.