Technology1 min read

Sshole

By · Published by Everything Blog

In short

The vulnerability emerged from a chain reaction of changes meant to enhance system stability and resist timing attacks. While musl altered its crypt function to return an asterisk on failure for passwords exceeding 256 bytes, OpenSSH simultaneously modified its timing protections to hash inputs even against locked accounts. In environments like Alpine Linux 3.16 that used asterisk-locked accounts without PAM, supplying an oversized password allowed an attacker to match the stored lock character.

Key points

  • Disconnected software patches can interact unpredictably across independent projects to c…: Disconnected software patches can interact unpredictably across independent projects to compromise overall system security.
  • The flaw persisted undetected for roughly a decade because upstream developers primarily…: The flaw persisted undetected for roughly a decade because upstream developers primarily tested against glibc and OpenBSD instead of musl.
  • Distributions relying on PAM avoided the bug because they bypass crypt calls entirely for…: Distributions relying on PAM avoided the bug because they bypass crypt calls entirely for locked accounts.

Sources checked by our analysis pipeline: 1

1980

the first star

back in old unix your password hash just sat in /etc/passwd

, right next to your username. in a file everyone could read.

in 1980 bill joy put a *

there for an account called daemon

. nobody's supposed to ever log in as it.

a *

isn't a hash, so no password can match it. unix still does this today

3bsd · /etc/passwd · 1980

Addressgithub.com/dspinellis/unix-history-repo/blob/BSD-3/etc/passwd

the next field is the real name. he wrote "the devil himself"

1990s

how sshd checks your password

ok so these days the hash lives in /etc/shadow

and looks like $6$abc$k2P9…

. the $6$

means sha512, abc

is the salt, the rest is the actual hash

you type your password, sshd hashes it with that same salt and checks if it comes out identical. same = you're in. that's it

and if the field is just *

? there's nothing to match. type whatever you want, it's never getting you in

1990s

the fine print

one more rule. if crypt()

can't do its job, it returns NULL. like if…

Technology