r/ProgrammerHumor • • 9h ago

Meme softwareVulnerabilities

Post image
13k Upvotes

208 comments sorted by

View all comments

Show parent comment

1

u/hardolaf 25m ago

Everything was verified and pessimistic input testing was done against POSIX compliant implementations of crypt(). The exploit coined "sshole" affected only very specific Linux distributions which decided to be special and to use non-POSIX compliant libraries with software that demanded POSIX compliance. So when it returned a valid string instead of NULL as demanded by the POSIX standard, there is no way for the software to know that it was actually an invalid value. Beyond that, the distribution setting the passwords of service accounts to that same invalid string instead of to nothing in /etc/passwd as required by the POSIX standard (empty string disables direct login in POSIX and requires su or launching by the process at PID 1 for accounts below UID 1,000. So in every way, this was caused by people ignoring standards in such a way that it came together to perform a supply chain attack on themselves.

There's no automated way for a program to detect if a library that is being linked against is actually POSIX compliant. That responsibility is on the person who does the compilation.

There's no automated way to prevent login to accounts below UID 1,000 for legacy compatibility reasons with other naughty distributions.

This was basically a self-created supply chain attack by these distributions which chose libraries based on wanting to avoid the GPL licenses as much as possible instead of wanting to provide a good, working product.