<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
  <title>sshhole.com</title>
  <link>https://aggr.aymericbeaumet.com/sources/sshhole.com/</link>
  <description>Browse aymeric&#39;s, an independent, searchable archive of readable snapshots from followed feeds, preserved in Git with aggr.</description>
  <language>en</language>
  <atom:link href="https://aggr.aymericbeaumet.com/sources/sshhole.com/rss.xml" rel="self" type="application/rss+xml"/>
  <lastBuildDate>Thu, 5 Nov 2026 12:24:42 +0000</lastBuildDate>
  <generator>aggr</generator>
  <item>
    <title>sshhole</title>
    <link>https://aggr.aymericbeaumet.com/items/lobste-rs/2026-11-05-sshhole/</link>
    <guid isPermaLink="false">urn:aggr:item:eda9e02e215c1fbb5a41e63d50ebdf9c865611ce</guid>
    <atom:link href="https://sshhole.com/" rel="via" type="text/html"/>
    <pubDate>Thu, 5 Nov 2026 12:24:42 +0000</pubDate>
    <dc:creator>sshhole.com via serce</dc:creator>
    <description>Comments</description>
    <content:encoded>&lt;p&gt;so openssh on musl linux (alpine, openwrt, buildroot, yocto, and a lot of the docker images you&#39;ve pulled) has had a little problem since 2016.&lt;/p&gt;
&lt;p&gt;accounts that should never take a password at all (root, your key-only deploy user, ldap users, the default user on alpine&#39;s aws and azure images) take any password longer than 256 characters.&lt;/p&gt;
&lt;p&gt;yes, any password. yes. i know. yes.&lt;/p&gt;
&lt;p&gt;1980&lt;/p&gt;
&lt;h2&gt;the first star&lt;/h2&gt;
&lt;p&gt;back in old unix your password hash just sat in &lt;code&gt;/etc/passwd&lt;/code&gt;, right next to your username. in a file everyone could read.&lt;/p&gt;
&lt;p&gt;in 1980 bill joy put a &lt;code&gt;*&lt;/code&gt; there for an account called &lt;code&gt;daemon&lt;/code&gt;. nobody&#39;s supposed to ever log in as it.&lt;/p&gt;
&lt;p&gt;a &lt;code&gt;*&lt;/code&gt; isn&#39;t a hash, so no password can match it. unix still does this today&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://github.com/dspinellis/unix-history-repo/blob/BSD-3/etc/passwd&quot;&gt;3bsd · /etc/passwd · 1980&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; github.com/dspinellis/unix-history-repo/blob/BSD-3/etc/passwd&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/3bsd-passwd.png&quot; alt=&quot;daemon:*:1:1:The devil himself:/:&quot; loading=&quot;eager&quot; decoding=&quot;async&quot; fetchpriority=&quot;high&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;the next field is the real name. he wrote &amp;quot;the devil himself&amp;quot;&lt;/p&gt;
&lt;p&gt;1990s&lt;/p&gt;
&lt;h2&gt;how sshd checks your password&lt;/h2&gt;
&lt;p&gt;ok so these days the hash lives in &lt;code&gt;/etc/shadow&lt;/code&gt; and looks like &lt;code&gt;$6$abc$k2P9…&lt;/code&gt;. the &lt;code&gt;$6$&lt;/code&gt; means sha512, &lt;code&gt;abc&lt;/code&gt; is the salt, the rest is the actual hash&lt;/p&gt;
&lt;p&gt;you type your password, sshd hashes it with that same salt and checks if it comes out identical. same = you&#39;re in. that&#39;s it&lt;/p&gt;
&lt;p&gt;and if the field is just &lt;code&gt;*&lt;/code&gt;? there&#39;s nothing to match. type whatever you want, it&#39;s never getting you in&lt;/p&gt;
&lt;p&gt;1990s&lt;/p&gt;
&lt;h2&gt;the fine print&lt;/h2&gt;
&lt;p&gt;one more rule. if &lt;code&gt;crypt()&lt;/code&gt; can&#39;t do its job, it returns NULL. like if the salt asks for some algorithm the system doesn&#39;t have, there&#39;s nothing to compute, so you get NULL instead of a hash&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://pubs.opengroup.org/onlinepubs/7908799/xsh/crypt.html&quot;&gt;the single unix spec · crypt() · 1997&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; pubs.opengroup.org/onlinepubs/7908799/xsh/crypt.html&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/posix-crypt.png&quot; alt=&quot;RETURN VALUE: Upon successful completion, crypt() returns a pointer to the encoded string. Otherwise it returns a null pointer and sets errno to indicate the error.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;pretty clear.&lt;/p&gt;
&lt;p&gt;except a lot of programs never check for NULL. they just compare whatever &lt;code&gt;crypt()&lt;/code&gt; gives back with the stored field, hit the NULL, and crash&lt;/p&gt;
&lt;p&gt;2012&lt;/p&gt;
&lt;h2&gt;crypt stops saying NULL&lt;/h2&gt;
&lt;p&gt;so musl (the libc under alpine) goes ok fine, &lt;code&gt;crypt()&lt;/code&gt; just won&#39;t return NULL anymore. if it fails, it returns a single character instead. that character can never match a real password, so programs don&#39;t crash, they just see a wrong password&lt;/p&gt;
&lt;p&gt;now guess which character they picked for that&lt;/p&gt;
&lt;p&gt;&amp;quot; &amp;quot;&lt;/p&gt;
&lt;p&gt;yep. the star. again.&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.musl-libc.org/cgit/musl/commit/?id=b3c4cc121f70faea45389fe7ddc1127ed5cbd8bb&quot;&gt;musl · b3c4cc12 · aug 2012&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; git.musl-libc.org/cgit/musl/commit/?id=b3c4cc12&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/musl-b3c4cc12.png&quot; alt=&quot;make crypt return an unmatchable hash rather than NULL on failure. always &amp;quot;succeeding&amp;quot; but giving an unmatchable hash is reportedly a better behavior than failing on error.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;reportedly.&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.musl-libc.org/cgit/musl/commit/?id=b3c4cc121f70faea45389fe7ddc1127ed5cbd8bb&quot;&gt;musl · b3c4cc12 · the diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; git.musl-libc.org/cgit/musl/commit/?id=b3c4cc12&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/musl-b3c4cc12-diff.png&quot; alt=&quot;diff of crypt_des.c: removed the comment &amp;#39;Should not happen.&amp;#39; and &amp;#39;return NULL;&amp;#39;, added: return (setting[0]==&amp;#39;&amp;#39;) ? &amp;quot;x&amp;quot; : &amp;quot;&amp;quot;;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;should not happen&amp;quot; gone, NULL gone, &lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt; in&lt;/p&gt;
&lt;p&gt;2012&lt;/p&gt;
&lt;h2&gt;three weeks later&lt;/h2&gt;
&lt;p&gt;then musl adds sha512 crypt. the thing is, sha512crypt gets slower the longer the password is, so someone could send one giant password and keep your server busy for a long time. so musl just caps it at 256 bytes and refuses anything longer&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.musl-libc.org/cgit/musl/commit/?id=88bf5a8a8d7d796f63cca8589f4de67aa8345f1a&quot;&gt;musl · 88bf5a8a · aug 29 2012&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; git.musl-libc.org/cgit/musl/commit/?id=88bf5a8a&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/musl-88bf5a8a.png&quot; alt=&quot;add sha256/sha512 crypt. Rich Felker, 2012-08-29.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;twenty days after the &amp;quot;*&amp;quot; commit btw&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.musl-libc.org/cgit/musl/tree/src/misc/crypt_sha512.c?id=88bf5a8a8d7d796f63cca8589f4de67aa8345f1a#n189&quot;&gt;musl · crypt_sha512.c @ 88bf5a8a&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; git.musl-libc.org/cgit/musl/tree/src/misc/crypt_sha512.c?id=88bf5a8a&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/musl-keymax.png&quot; alt=&quot;key limit is not part of the original design, added for DoS protection. #define KEY_MAX 256. if (i &amp;gt; KEY_MAX) return 0;&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;so past 256 bytes crypt fails. and when crypt fails… it says &lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://git.musl-libc.org/cgit/musl/tree/src/crypt/crypt_sha512.c#n8&quot;&gt;musl · crypt_sha512.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; git.musl-libc.org/cgit/musl/tree/src/crypt/crypt_sha512.c&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/musl-sha512-header.png&quot; alt=&quot;on error &amp;quot;*&amp;quot; is returned.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;literally in the comment the whole time&lt;/p&gt;
&lt;p&gt;2016&lt;/p&gt;
&lt;h2&gt;sshd borrows bob&#39;s salt&lt;/h2&gt;
&lt;p&gt;CVE-2016-6210. ask sshd about a user that doesn&#39;t exist and it says no instantly, cause there&#39;s nothing to hash. real users take a few ms longer. so just time it and you know who exists&lt;/p&gt;
&lt;p&gt;the fix is kinda funny. no real hash to check? sshd grabs some other account&#39;s salt and hashes your password anyway, just to waste the same amount of time. still a no, just a slower no&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;http://lists.mindrot.org/pipermail/openssh-commits/2016-July/005428.html&quot;&gt;openssh-commits · jul 2016&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; lists.mindrot.org/pipermail/openssh-commits/2016-July/005428.html&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/openssh-9286875a7.png&quot; alt=&quot;Determine appropriate salt for invalid users.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;for invalid users.&amp;quot; and also, it turns out, real users with a &lt;code&gt;*&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;2019 → 2022&lt;/p&gt;
&lt;h2&gt;the fix for the fix&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;2019.&lt;/strong&gt; turns out alpine&#39;s docker images had no root password. at all. CVE-2019-5021. alpine fixes it by locking root with &lt;code&gt;!&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;but without pam, &lt;code&gt;!&lt;/code&gt; also kills ssh keys. and cloud images log in with keys.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2022.&lt;/strong&gt; alpine 3.16 switches root to &lt;code&gt;*&lt;/code&gt;. still locked, keys work again&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://gitlab.alpinelinux.org/alpine/aports/-/commit/fbe926afc76de76e07d078f266badc4144dde8e3&quot;&gt;alpine aports · fbe926af · shipped in 3.16, 2022&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; gitlab.alpinelinux.org/alpine/aports/-/commit/fbe926af.patch&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/alpine-fbe926af.png&quot; alt=&quot;this still forbids password login but allows logins via ssh keys with pam disabled. # make sure root login is disabled. root:! becomes root:*&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;narrator: it did not.&lt;/p&gt;
&lt;p&gt;2016 → 2026&lt;/p&gt;
&lt;h2&gt;ten quiet years&lt;/h2&gt;
&lt;p&gt;why did nobody notice? well, maybe someone did. maybe someone pasted the wrong thing into a password prompt, half a slack message or a whole ssh key, and it just let them in. you&#39;ve never pasted the wrong thing into a password prompt?? amazing. a fresh box with no passwords set isn&#39;t affected. a &lt;code&gt;*&lt;/code&gt; in shadow needs a wrong try first. openssh tests on openbsd and glibc, musl doesn&#39;t test sshd, and most distros go through pam, which never even calls crypt for a &lt;code&gt;*&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;so as far as anyone knows, nobody noticed. as far as anyone knows.&lt;/p&gt;
&lt;p&gt;some people got really close though&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://bugs.debian.org/714219&quot;&gt;libc-alpha · debian #714219 · 2013&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; sourceware.org/legacy-ml/libc-alpha/2013-07/msg00046.html&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/libc-alpha-2013.png&quot; alt=&quot;The scheme of returning * or x, which are never valid matches, comes from dalias from musl, and I think it is the best compromise/solution.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;a debian dev asks glibc to copy musl&#39;s &lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt;. six years later debian moves to libxcrypt, which says &lt;code&gt;&amp;quot;*0&amp;quot;&lt;/code&gt;, and closes the bug. one character away.&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;https://www.openwall.com/lists/musl/2024/12/31/2&quot;&gt;musl mailing list · dec 2024&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; openwall.com/lists/musl/2024/12/31/2&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/musl-list-2024.png&quot; alt=&quot;Sure there&amp;#39;s no reason it couldn&amp;#39;t have been 257 or 300 or whatever, but either way you&amp;#39;d get things like this when software has bugs in handling the condition.&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;this thread is about busybox &lt;code&gt;passwd&lt;/code&gt; breaking on a 257 character password. same &lt;code&gt;&amp;quot;*&amp;quot;&lt;/code&gt;, same limit. nobody says &amp;quot;sshd&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;a target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; href=&quot;http://lists.mindrot.org/pipermail/openssh-commits/2026-October/013271.html&quot;&gt;openssh-commits · 30 oct 2026&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Address&lt;/strong&gt; lists.mindrot.org/pipermail/openssh-commits/2026-October/013271.html&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/receipts/openssh-84f8f4666.png&quot; alt=&quot;fix fake password salt generation for bcrypt hashes&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;a security review fixes &lt;code&gt;pick_salt()&lt;/code&gt;. the bug is four lines below it. four days before i found it.&lt;/p&gt;
&lt;p&gt;nov 2026&lt;/p&gt;
&lt;h2&gt;how i ran into it&lt;/h2&gt;
&lt;p&gt;i was messing around with openssh, mostly the boring parts where it talks to libc, like the password code. people don&#39;t really look at that stuff, they look at the crypto. so i built sshd every way i could think of (glibc, musl, pam, no pam, shadow, no shadow) and threw like 17,600 weird logins at it. weird hashes, broken accounts, passwords way too long&lt;/p&gt;
&lt;p&gt;oh did i say &amp;quot;i&amp;quot;? sorry. i had agent swarms. a lot of them. let&#39;s not get into it&lt;/p&gt;
&lt;p&gt;every build agreed on every login. except musl without pam. that one said yes to things it shouldn&#39;t&lt;/p&gt;
&lt;p&gt;tl;dr&lt;/p&gt;
&lt;p&gt;&lt;picture class=&quot;article-picture article-picture-fallback&quot; style=&quot;--image-ratio:16 / 9&quot;&gt;&lt;img src=&quot;https://sshhole.com/comic.svg&quot; alt=&quot;six panel comic: 1980 daemon gets a star; 2012 musl crypt returns star instead of NULL; 2016 openssh borrows bob&amp;#39;s salt; 2021 alpine changes root from ! to star, narrator: it did not; 2016 to 2026 a cat sleeps on a server; 2026 me and some agents, 300 A&amp;#39;s give uid 0&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;low&quot; referrerpolicy=&quot;no-referrer&quot; class=&quot;progressive-image&quot;&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;h2&gt;try it&lt;/h2&gt;
&lt;p&gt;one debian box, one alpine box. type stuff. it all runs right here in your browser, nothing gets sent anywhere&lt;/p&gt;
&lt;p&gt;256&lt;/p&gt;
&lt;p&gt;1024&lt;/p&gt;
&lt;p&gt;0 bytes&lt;/p&gt;
&lt;p&gt;debian · glibc&lt;/p&gt;
&lt;p&gt;crypt(pw, bob&#39;s salt)&lt;/p&gt;
&lt;p&gt;alice&#39;s field&lt;/p&gt;
&lt;p&gt;*&lt;/p&gt;
&lt;p&gt;alpine · musl&lt;/p&gt;
&lt;p&gt;crypt(pw, bob&#39;s salt)&lt;/p&gt;
&lt;p&gt;alice&#39;s field&lt;/p&gt;
&lt;p&gt;*&lt;/p&gt;
&lt;h2&gt;are you affected?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;is your sshd running on &lt;strong&gt;musl&lt;/strong&gt;? (alpine, openwrt, buildroot, yocto)&lt;/li&gt;
&lt;li&gt;is it &lt;strong&gt;not using pam&lt;/strong&gt;? alpine&#39;s &lt;code&gt;openssh-server&lt;/code&gt; doesn&#39;t by default, or maybe you set &lt;code&gt;UsePAM no&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;are &lt;strong&gt;password logins&lt;/strong&gt; still on? they are by default&lt;/li&gt;
&lt;li&gt;is there an account with just &lt;code&gt;*&lt;/code&gt; as its password? key-only users, ldap users, root on alpine&lt;/li&gt;
&lt;li&gt;and some &lt;em&gt;other&lt;/em&gt; account with a real password?&lt;/li&gt;
&lt;li&gt;then that &lt;code&gt;*&lt;/code&gt; account takes any password between 257 and 1024 characters&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;on alpine&#39;s official aws and azure images that&#39;s the default &lt;code&gt;alpine&lt;/code&gt; user, and it has passwordless &lt;code&gt;doas&lt;/code&gt;. so it&#39;s root&lt;/p&gt;
&lt;p&gt;on debian, ubuntu, fedora or anything else with glibc? going through pam? dropbear? openbsd? you&#39;re fine&lt;/p&gt;
&lt;h2&gt;what now&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;you&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;code-snippet&quot; data-language=&quot;Shell&quot;&gt;&lt;span class=&quot;syntax-source syntax-shell syntax-bash&quot;&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell&quot;&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt; update. openssh 10.6p2 fixes it.&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;$&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; apk upgrade openssh&lt;/span&gt;

&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell&quot;&gt;#&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt; can&amp;#39;t update yet? turn password logins off.&lt;/span&gt;&lt;span class=&quot;syntax-comment syntax-line syntax-number-sign syntax-shell&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;$&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; echo &lt;span class=&quot;syntax-string syntax-quoted syntax-double syntax-shell&quot;&gt;&lt;span class=&quot;syntax-punctuation syntax-definition syntax-string syntax-begin syntax-shell&quot;&gt;&amp;quot;&lt;/span&gt;PasswordAuthentication no&lt;span class=&quot;syntax-punctuation syntax-definition syntax-string syntax-end syntax-shell&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;syntax-keyword syntax-operator syntax-assignment syntax-redirection syntax-shell&quot;&gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config.d/00-no-passwords.conf&lt;/span&gt;
&lt;span class=&quot;syntax-meta syntax-function-call syntax-shell&quot;&gt;&lt;span class=&quot;syntax-variable syntax-function syntax-shell&quot;&gt;$&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;syntax-meta syntax-function-call syntax-arguments syntax-shell&quot;&gt; rc-service sshd restart&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;one more thing&lt;/p&gt;
&lt;h2&gt;did you get hacked? check.&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;root@your-box&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;see a line like that? an account with no password just took a password&lt;/p&gt;
&lt;p&gt;if that&#39;s the case…&lt;/p&gt;
&lt;p&gt;i&#39;m sorry.&lt;/p&gt;
&lt;p&gt;you got hacked.&lt;/p&gt;
&lt;p&gt;by an&lt;/p&gt;
&lt;p&gt;* sshole&lt;/p&gt;
</content:encoded>
    <category>news</category>
    <category>linux</category>
    <category>security</category>
  </item>
</channel>
</rss>
