Post by @xgranade@wandering.shop
So, if I'm reading this right, the *sshole thing is both very bad and requires the stars to align in just the wrong way for you to actually be vulnerable?
[Edit: See replies for some very important context and corrections.]
@xgranade Anyone with PasswordAuthentication=yes (default) and UsePAM=no, and users who have no password set alongside users who do, running pre-fix OpenSSH on musl libc, is vulnerable to full authentication bypass logging in as one of the accounts with no password.
@dalias I thought PAM also had to be disabled and there had to be another account that did have a valid password?
Regardless, thank you for the correction on that.
@darkuncle @xgranade And one more requirement: the account with a real password has to be using the nasty sha256 or sha512 hash algos that require length-limiting the password. If you're using bcrypt or des or even md5, the OpenSSH vuln is not reachable.
@darkuncle @dalias @xgranade and presumably a usable shell on the target account (not /bin/false, etc). This appears to exclude OpenWrt (even when switching from Dropbear to OpenSSH).
@RoganDawes @darkuncle @xgranade Are you sure lack of a usable shell excludes access? ssh protocol has options to request sessions without a shell (forwarding only, for example) and I think these will work without a shell set on the account. I can't imagine sshd having a way to validate "shell would be valid if we tried to run it" without actually trying to run it.
@dalias @darkuncle @xgranade ok, that’s a fair point. Forwarding in its various forms would likely still work even for accounts with an unusable shell. And I guess OpenSSH Unix socket forwarding for things like docker sockets would be reachable, assuming suitable user permissions.
Not sure how much of that is used in OpenWrt, but it might give you access to uci or something similar.
@RoganDawes @darkuncle @xgranade I think OpenWRT is good about not treating the network layer as trusted itself, but if ssh access from WAN is allowed, it would let an attacker tunnel across the router onto the LAN via ssh forwarding.