NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲Alpine Linux Security advisory: OpenSSH-server password authentication bypass (alpinelinux.org)
NewJazz 27 minutes ago [-]
musl’s crypt() returns the string * as an error indicator when the key is over 256 bytes long. * is also exactly what the stored field contains for every account with no password, so the “hash” matches and the login succeeds.

Does anyone know why musl does this? Are they the only C library that behaves this way?

For a C library that famously tries to adhere to POSIX as much as possible, this seems like a crazy choice. From POSIX standard:

Upon successful completion, crypt() shall return a pointer to the encoded string. The first two bytes of the returned value shall be those of the salt argument. Otherwise, it shall return a null pointer and set errno to indicate the error.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/c...

hnfong 11 minutes ago [-]
There's a very detailed trace of how the bug was developed over decades at sshhole.com and the relevant discussion in https://news.ycombinator.com/item?id=50378228
api 33 seconds ago [-]
TBH that sounds like a straight up bug in that it deviates dangerously from the spec.
throwa356262 40 minutes ago [-]
Discussion from a few hours ago:

https://news.ycombinator.com/item?id=50377221

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 15:50:16 GMT+0000 (Coordinated Universal Time) with Vercel.