Announcement · Security, Linux, Open Source

Security advisory: openssh-server password authentication bypass

First published at alpinelinux.org.

Alpine Linux warns that an attacker reaching sshd could log in without a password on affected openssh-server packages, explains the conditions and cause, lists fixed package versions, and advises updating and restarting sshd or disabling password logins.

Security advisory: openssh-server password authentication bypass

If you run sshd on Alpine Linux, update openssh now and restart sshd. Upgrading the package alone does not replace the running daemon.

If you cannot update yet, at least disable password logins: set PasswordAuthentication no in your sshd configuration and restart sshd. Either one closes the hole.

What is the problem?

An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries.

The attacker needs the name of an account whose password field is * (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with a $5$ or $6$ password hash. The attacker then sends a very long password (257 to 1024 bytes). One user with a password is enough: it makes every account without one reachable.

Announcement · Security, Linux, Open Source

Security advisory: openssh-server password authentication bypass

First published at alpinelinux.org.

Alpine Linux warns that an attacker reaching sshd could log in without a password on affected openssh-server packages, explains the conditions and cause, lists fixed package versions, and advises updating and restarting sshd or disabling password logins.

Security advisory: openssh-server password authentication bypass

If you run sshd on Alpine Linux, update openssh now and restart sshd. Upgrading the package alone does not replace the running daemon.

If you cannot update yet, at least disable password logins: set PasswordAuthentication no in your sshd configuration and restart sshd. Either one closes the hole.

What is the problem?

An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries.

The attacker needs the name of an account whose password field is * (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with a $5$ or $6$ password hash. The attacker then sends a very long password (257 to 1024 bytes). One user with a password is enough: it makes every account without one reachable.

or `$6 Security advisory: openssh-server password authentication bypass · Listed Articles

Announcement · Security, Linux, Open Source

Security advisory: openssh-server password authentication bypass

First published at alpinelinux.org.

Alpine Linux warns that an attacker reaching sshd could log in without a password on affected openssh-server packages, explains the conditions and cause, lists fixed package versions, and advises updating and restarting sshd or disabling password logins.

Security advisory: openssh-server password authentication bypass

If you run sshd on Alpine Linux, update openssh now and restart sshd. Upgrading the package alone does not replace the running daemon.

If you cannot update yet, at least disable password logins: set PasswordAuthentication no in your sshd configuration and restart sshd. Either one closes the hole.

What is the problem?

An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries.

The attacker needs the name of an account whose password field is * (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with a $5$ or $6$ password hash. The attacker then sends a very long password (257 to 1024 bytes). One user with a password is enough: it makes every account without one reachable.

\npassword hash. The attacker then sends a very long password (257 to 1024\nbytes). One user with a password is enough: it makes every account without\none reachable.\n\nDetails are in the [OpenSSH 10.6p2 release\nnotes](https://www.openssh.com/releasenotes.html). No CVE identifier had been\nassigned at the time of writing.\n\n## Who is affected?\n\nYou are affected if all of the following are true:\n\n- You run the Alpine `openssh-server` package, which is built without PAM, or\nyou run`openssh-server-pam` with`UsePAM no` . (`openssh-server-pam` with`UsePAM yes` is not affected.)\n- `PasswordAuthentication` is`yes` (the OpenSSH default, unless you changed it).\n- The machine has an account whose password field is `*` . This includes:\n - `root` , which ships as`root:*` in the base image since about Alpine 3.16.\nOpenSSH’s default`PermitRootLogin prohibit-password` protects root, so\nroot is only reachable if`PermitRootLogin yes` is set. That does not help if\nanother account that can log in is able to become root, for example\nthrough`doas` .\n - Any key-only user created with `adduser` without a password, or with`usermod -p '*'` .\n - Users coming from a directory service through musl-nscd (nslcd, winbind, sssd), since they have no shadow entry.\n - The `alpine` user in the official**tiny-cloud** images (see below).\n- At least one local account has a `$5 Security advisory: openssh-server password authentication bypass · Listed Articles

Announcement · Security, Linux, Open Source

Security advisory: openssh-server password authentication bypass

First published at alpinelinux.org.

Alpine Linux warns that an attacker reaching sshd could log in without a password on affected openssh-server packages, explains the conditions and cause, lists fixed package versions, and advises updating and restarting sshd or disabling password logins.

Security advisory: openssh-server password authentication bypass

If you run sshd on Alpine Linux, update openssh now and restart sshd. Upgrading the package alone does not replace the running daemon.

If you cannot update yet, at least disable password logins: set PasswordAuthentication no in your sshd configuration and restart sshd. Either one closes the hole.

What is the problem?

An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries.

The attacker needs the name of an account whose password field is * (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with a $5$ or $6$ password hash. The attacker then sends a very long password (257 to 1024 bytes). One user with a password is enough: it makes every account without one reachable.

or`$6 Security advisory: openssh-server password authentication bypass · Listed Articles

Announcement · Security, Linux, Open Source

Security advisory: openssh-server password authentication bypass

First published at alpinelinux.org.

Alpine Linux warns that an attacker reaching sshd could log in without a password on affected openssh-server packages, explains the conditions and cause, lists fixed package versions, and advises updating and restarting sshd or disabling password logins.

Security advisory: openssh-server password authentication bypass

If you run sshd on Alpine Linux, update openssh now and restart sshd. Upgrading the package alone does not replace the running daemon.

If you cannot update yet, at least disable password logins: set PasswordAuthentication no in your sshd configuration and restart sshd. Either one closes the hole.

What is the problem?

An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries.

The attacker needs the name of an account whose password field is * (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with a $5$ or $6$ password hash. The attacker then sends a very long password (257 to 1024 bytes). One user with a password is enough: it makes every account without one reachable.

password hash.\n\nAffected releases: every Alpine release we checked, 3.21 through 3.24 and edge, and the older releases that no longer receive regular updates (3.16 to 3.20).\n\n### Who is not affected?\n\n- **Docker and other container users** that do not run`sshd` in the\ncontainer.\n- Systems with `PasswordAuthentication no` .\n- Systems using `openssh-server-pam` with`UsePAM yes` (with`UsePAM no` you are affected).\n- Locked accounts: those with `!` as the password field in`/etc/shadow` (a line starting`user:!:` ). They cannot log in with a password or a key.\n- Systems where no account has a ` Security advisory: openssh-server password authentication bypass · Listed Articles

Announcement · Security, Linux, Open Source

Security advisory: openssh-server password authentication bypass

First published at alpinelinux.org.

Alpine Linux warns that an attacker reaching sshd could log in without a password on affected openssh-server packages, explains the conditions and cause, lists fixed package versions, and advises updating and restarting sshd or disabling password logins.

Security advisory: openssh-server password authentication bypass

If you run sshd on Alpine Linux, update openssh now and restart sshd. Upgrading the package alone does not replace the running daemon.

If you cannot update yet, at least disable password logins: set PasswordAuthentication no in your sshd configuration and restart sshd. Either one closes the hole.

What is the problem?

An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries.

The attacker needs the name of an account whose password field is * (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with a $5$ or $6$ password hash. The attacker then sends a very long password (257 to 1024 bytes). One user with a password is enough: it makes every account without one reachable.

-style password hash.\n- Cloud images configured through cloud-init, which writes\n`PasswordAuthentication no` .\n\n## How can I fix it?\n\n### 1. Update\n\n```\napk upgrade -U -a\n```\nAlpine 3.21.10, 3.22.8, 3.23.8 and 3.24.4 contain the fixed package (see the\n[release announcement](/posts/alpine-3.21.10-3.22.8-3.23.8-3.24.4-released/)).\nThe fixed package versions are:\n\n| Branch | Fixed `openssh` version | \n|---|---|\n| edge | 10.6_p2-r0 | \n| 3.24 | 10.3_p1-r2 | \n| 3.23 | 10.2_p1-r1 | \n| 3.22 | 10.0_p1-r11 | \n| 3.21 | 9.9_p2-r1 | \n| 3.20 | 9.7_p1-r6 | \n| 3.19 | 9.6_p1-r3 | \n| 3.18 | 9.3_p2-r4 | \n| 3.17 | 9.1_p1-r7 | \n| 3.16 | 9.0_p1-r6 | \n\n**Restart `sshd` after upgrading** (`rc-service sshd restart`). Upgrading the\npackage does not restart a running `sshd`, so you must do it after.\n\n### 2. If you cannot update: disable password authentication\n\nBefore you start, make sure your SSH key login works, and keep your current session open until you have tested a new login.\n\nRun these as root. The first two commands create a drop-in file. Alpine’s\ndefault `sshd_config` reads that directory from 3.19 onward; older releases\nignore it. The `sed` command changes `yes` to `no` on every\n`PasswordAuthentication` line in `/etc/ssh/sshd_config`, whatever the spacing,\nincluding lines inside a `Match` block. It also adds `PasswordAuthentication no` at the top of the file, for the case where there was no such line, and\nsaves the original as `/etc/ssh/sshd_config.bak`. The last two commands check\nthe configuration, restart the daemon, and show the result:\n\n```\nmkdir -p /etc/ssh/sshd_config.d\necho 'PasswordAuthentication no' > /etc/ssh/sshd_config.d/00-no-passwords.conf\nsed -i.bak -e '1i PasswordAuthentication no' \\\n -e 's/^\\(\\s*PasswordAuthentication[^y#]*\\)yes/\\1no/i' \\\n /etc/ssh/sshd_config\nsshd -t && rc-service sshd restart\nsshd -T | grep -i passwordauthentication\n```\nThe last command should print `passwordauthentication no`. To undo, delete\n`/etc/ssh/sshd_config.d/00-no-passwords.conf` and copy\n`/etc/ssh/sshd_config.bak` back over `/etc/ssh/sshd_config`.\n\n## Cloud images (tiny-cloud)\n\nThe official tiny-cloud images (the qcow2, VHD and AMI artifacts) from\n**3.18.11 through 3.24.3** ship an `alpine` user with a `*` password field and\npasswordless `doas`. They are safe on first boot. They become exploitable as\nsoon as any `$6 Security advisory: openssh-server password authentication bypass · Listed Articles

Announcement · Security, Linux, Open Source

Security advisory: openssh-server password authentication bypass

First published at alpinelinux.org.

Alpine Linux warns that an attacker reaching sshd could log in without a password on affected openssh-server packages, explains the conditions and cause, lists fixed package versions, and advises updating and restarting sshd or disabling password logins.

Security advisory: openssh-server password authentication bypass

If you run sshd on Alpine Linux, update openssh now and restart sshd. Upgrading the package alone does not replace the running daemon.

If you cannot update yet, at least disable password logins: set PasswordAuthentication no in your sshd configuration and restart sshd. Either one closes the hole.

What is the problem?

An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries.

The attacker needs the name of an account whose password field is * (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with a $5$ or $6$ password hash. The attacker then sends a very long password (257 to 1024 bytes). One user with a password is enough: it makes every account without one reachable.

hash exists on the machine, for example when an admin sets a\nconsole password, or user-data adds a user with `hashed_passwd`. An attacker\nthen gets a shell as `alpine` and can use `doas` to become root.\n\nImages built from 3.21.10, 3.22.8, 3.23.8, 3.24.4 and later include the fixed\npackage. Images from earlier point releases do not, so on every running\ninstance, update `openssh` or disable password authentication.\n\n## Releases that are no longer supported (3.21 and older)\n\nThese releases have the same bug. 3.21 reached its end of support on 2026-11-01, but we have published fixed packages for each release all the way back to 3.16.\n\n## How do I know if I was attacked?\n\nLook in `/var/log/messages` for `sshd` lines reading `Accepted password for`\nan account that has no password (`alpine`, `root`, or any key-only user).\nReview `doas` use and recently created users, files and authorized keys on\nexposed machines. If you cannot rule out a login, treat the machine as\ncompromised.\n\n## How could this happen?\n\nWhen sshd is built without PAM, it checks a password by hashing the attempt\nwith `crypt()` (the C library function that turns a password into its stored\nhash) and comparing the result to the stored password field. For an account\nwhose stored field is too short to contain a salt (the random prefix of a\nhash), sshd borrows the salt of another account.\n\nmusl’s `crypt()` returns the string `*` as an error indicator when the key is\nover 256 bytes long. `*` is also exactly what the stored field contains for\nevery account with no password, so the “hash” matches and the login succeeds.\n\nOpenSSH 10.6p2 avoids the problem in sshd. The stable-branch packages above carry a patch for the same problem.\n\n## Credits\n\nReported by Özgün Kültekin of [Wakefield](https://wakefield.co). Thanks to\nDamien Miller and Darren Tucker of the OpenSSH project for the fix and the\n10.6p2 release, to Timo Teräs for help analyzing the issue, and to Natanael\nCopa, who built and uploaded the updated packages.","body_html":"\u003ch1 id=\"security-advisory-openssh-server-password-authentication-bypass\">Security advisory: openssh-server password authentication bypass\u003c/h1>\n\u003cp>\u003cstrong>If you run \u003ccode>sshd\u003c/code> on Alpine Linux, update \u003ccode>openssh\u003c/code> now and restart \u003ccode>sshd\u003c/code>.\u003c/strong>\nUpgrading the package alone does not replace the running daemon.\u003c/p>\n\u003cp>If you cannot update yet, at least disable password logins: set\n\u003ccode>PasswordAuthentication no\u003c/code> in your sshd configuration and restart \u003ccode>sshd\u003c/code>.\nEither one closes the hole.\u003c/p>\n\u003ch2 id=\"what-is-the-problem\">What is the problem?\u003c/h2>\n\u003cp>An attacker who can reach your SSH port can log in without knowing any password. It takes one connection, works every time, and needs no retries.\u003c/p>\n\u003cp>The attacker needs the name of an account whose password field is \u003ccode>*\u003c/code>\n(an account with no password set, which is normal for key-only accounts), and\nneeds the machine to have at least one other account with a \u003ccode>$5$\u003c/code> or \u003ccode>$6$\u003c/code>\npassword hash. The attacker then sends a very long password (257 to 1024\nbytes). One user with a password is enough: it makes every account without\none reachable.\u003c/p>\n\u003cp>Details are in the \u003ca href=\"https://www.openssh.com/releasenotes.html\" rel=\"nofollow ugc noopener\">OpenSSH 10.6p2 release\nnotes\u003c/a>. No CVE identifier had been\nassigned at the time of writing.\u003c/p>\n\u003ch2 id=\"who-is-affected\">Who is affected?\u003c/h2>\n\u003cp>You are affected if all of the following are true:\u003c/p>\n\u003cul>\u003cli>\u003cp>You run the Alpine \u003ccode>openssh-server\u003c/code> package, which is built without PAM, or\u003c/p>\u003cp>you run\u003ccode>openssh-server-pam\u003c/code> with\u003ccode>UsePAM no\u003c/code> . (\u003ccode>openssh-server-pam\u003c/code> with\u003ccode>UsePAM yes\u003c/code> is not affected.)\u003c/p>\u003c/li>\u003cli>\u003ccode>PasswordAuthentication\u003c/code> is\u003ccode>yes\u003c/code> (the OpenSSH default, unless you changed it).\u003c/li>\u003cli>\u003cp>The machine has an account whose password field is \u003ccode>*\u003c/code> . This includes:\u003c/p>\u003cul>\u003cli>\u003cp>\u003ccode>root\u003c/code> , which ships as\u003ccode>root:*\u003c/code> in the base image since about Alpine 3.16.\u003c/p>\u003cp>OpenSSH’s default\u003ccode>PermitRootLogin prohibit-password\u003c/code> protects root, so\nroot is only reachable if\u003ccode>PermitRootLogin yes\u003c/code> is set. That does not help if\nanother account that can log in is able to become root, for example\nthrough\u003ccode>doas\u003c/code> .\u003c/p>\u003c/li>\u003cli>Any key-only user created with \u003ccode>adduser\u003c/code> without a password, or with\u003ccode>usermod -p '*'\u003c/code> .\u003c/li>\u003cli>Users coming from a directory service through musl-nscd (nslcd, winbind, sssd), since they have no shadow entry.\u003c/li>\u003cli>The \u003ccode>alpine\u003c/code> user in the official\u003cstrong>tiny-cloud\u003c/strong> images (see below).\u003c/li>\u003c/ul>\u003c/li>\u003cli>At least one local account has a \u003ccode>$5$\u003c/code> or\u003ccode>$6$\u003c/code> password hash.\u003c/li>\u003c/ul>\n\u003cp>Affected releases: every Alpine release we checked, 3.21 through 3.24 and edge, and the older releases that no longer receive regular updates (3.16 to 3.20).\u003c/p>\n\u003ch3 id=\"who-is-not-affected\">Who is not affected?\u003c/h3>\n\u003cul>\u003cli>\u003cp>\u003cstrong>Docker and other container users\u003c/strong> that do not run\u003ccode>sshd\u003c/code> in the\u003c/p>\u003cp>container.\u003c/p>\u003c/li>\u003cli>Systems with \u003ccode>PasswordAuthentication no\u003c/code> .\u003c/li>\u003cli>Systems using \u003ccode>openssh-server-pam\u003c/code> with\u003ccode>UsePAM yes\u003c/code> (with\u003ccode>UsePAM no\u003c/code> you are affected).\u003c/li>\u003cli>Locked accounts: those with \u003ccode>!\u003c/code> as the password field in\u003ccode>/etc/shadow\u003c/code> (a line starting\u003ccode>user:!:\u003c/code> ). They cannot log in with a password or a key.\u003c/li>\u003cli>Systems where no account has a \u003ccode>$\u003c/code> -style password hash.\u003c/li>\u003cli>\u003cp>Cloud images configured through cloud-init, which writes\u003c/p>\u003cp>\u003ccode>PasswordAuthentication no\u003c/code> .\u003c/p>\u003c/li>\u003c/ul>\n\u003ch2 id=\"how-can-i-fix-it\">How can I fix it?\u003c/h2>\n\u003ch3 id=\"1-update\">1. Update\u003c/h3>\n\u003cpre>\u003ccode>apk upgrade -U -a\u003c/code>\u003c/pre>\n\u003cp>Alpine 3.21.10, 3.22.8, 3.23.8 and 3.24.4 contain the fixed package (see the\n\u003ca href=\"/posts/alpine-3.21.10-3.22.8-3.23.8-3.24.4-released/\">release announcement\u003c/a>).\nThe fixed package versions are:\u003c/p>\n\u003cdiv class=\"table-wrap\">\u003ctable>\u003cthead>\u003ctr>\u003cth>Branch\u003c/th>\u003cth>Fixed \u003ccode>openssh\u003c/code> version\u003c/th>\u003c/tr>\u003c/thead>\u003ctbody>\u003ctr>\u003ctd>edge\u003c/td>\u003ctd>10.6_p2-r0\u003c/td>\u003c/tr>\u003ctr>\u003ctd>3.24\u003c/td>\u003ctd>10.3_p1-r2\u003c/td>\u003c/tr>\u003ctr>\u003ctd>3.23\u003c/td>\u003ctd>10.2_p1-r1\u003c/td>\u003c/tr>\u003ctr>\u003ctd>3.22\u003c/td>\u003ctd>10.0_p1-r11\u003c/td>\u003c/tr>\u003ctr>\u003ctd>3.21\u003c/td>\u003ctd>9.9_p2-r1\u003c/td>\u003c/tr>\u003ctr>\u003ctd>3.20\u003c/td>\u003ctd>9.7_p1-r6\u003c/td>\u003c/tr>\u003ctr>\u003ctd>3.19\u003c/td>\u003ctd>9.6_p1-r3\u003c/td>\u003c/tr>\u003ctr>\u003ctd>3.18\u003c/td>\u003ctd>9.3_p2-r4\u003c/td>\u003c/tr>\u003ctr>\u003ctd>3.17\u003c/td>\u003ctd>9.1_p1-r7\u003c/td>\u003c/tr>\u003ctr>\u003ctd>3.16\u003c/td>\u003ctd>9.0_p1-r6\u003c/td>\u003c/tr>\u003c/tbody>\u003c/table>\u003c/div>\n\u003cp>\u003cstrong>Restart \u003ccode>sshd\u003c/code> after upgrading\u003c/strong> (\u003ccode>rc-service sshd restart\u003c/code>). Upgrading the\npackage does not restart a running \u003ccode>sshd\u003c/code>, so you must do it after.\u003c/p>\n\u003ch3 id=\"2-if-you-cannot-update-disable-password-authentication\">2. If you cannot update: disable password authentication\u003c/h3>\n\u003cp>Before you start, make sure your SSH key login works, and keep your current session open until you have tested a new login.\u003c/p>\n\u003cp>Run these as root. The first two commands create a drop-in file. Alpine’s\ndefault \u003ccode>sshd_config\u003c/code> reads that directory from 3.19 onward; older releases\nignore it. The \u003ccode>sed\u003c/code> command changes \u003ccode>yes\u003c/code> to \u003ccode>no\u003c/code> on every\n\u003ccode>PasswordAuthentication\u003c/code> line in \u003ccode>/etc/ssh/sshd_config\u003c/code>, whatever the spacing,\nincluding lines inside a \u003ccode>Match\u003c/code> block. It also adds \u003ccode>PasswordAuthentication no\u003c/code> at the top of the file, for the case where there was no such line, and\nsaves the original as \u003ccode>/etc/ssh/sshd_config.bak\u003c/code>. The last two commands check\nthe configuration, restart the daemon, and show the result:\u003c/p>\n\u003cpre>\u003ccode>mkdir -p /etc/ssh/sshd_config.d\necho 'PasswordAuthentication no' > /etc/ssh/sshd_config.d/00-no-passwords.conf\nsed -i.bak -e '1i PasswordAuthentication no' \\\n -e 's/^\\(\\s*PasswordAuthentication[^y#]*\\)yes/\\1no/i' \\\n /etc/ssh/sshd_config\nsshd -t && rc-service sshd restart\nsshd -T | grep -i passwordauthentication\u003c/code>\u003c/pre>\n\u003cp>The last command should print \u003ccode>passwordauthentication no\u003c/code>. To undo, delete\n\u003ccode>/etc/ssh/sshd_config.d/00-no-passwords.conf\u003c/code> and copy\n\u003ccode>/etc/ssh/sshd_config.bak\u003c/code> back over \u003ccode>/etc/ssh/sshd_config\u003c/code>.\u003c/p>\n\u003ch2 id=\"cloud-images-tiny-cloud\">Cloud images (tiny-cloud)\u003c/h2>\n\u003cp>The official tiny-cloud images (the qcow2, VHD and AMI artifacts) from\n\u003cstrong>3.18.11 through 3.24.3\u003c/strong> ship an \u003ccode>alpine\u003c/code> user with a \u003ccode>*\u003c/code> password field and\npasswordless \u003ccode>doas\u003c/code>. They are safe on first boot. They become exploitable as\nsoon as any \u003ccode>$6$\u003c/code> hash exists on the machine, for example when an admin sets a\nconsole password, or user-data adds a user with \u003ccode>hashed_passwd\u003c/code>. An attacker\nthen gets a shell as \u003ccode>alpine\u003c/code> and can use \u003ccode>doas\u003c/code> to become root.\u003c/p>\n\u003cp>Images built from 3.21.10, 3.22.8, 3.23.8, 3.24.4 and later include the fixed\npackage. Images from earlier point releases do not, so on every running\ninstance, update \u003ccode>openssh\u003c/code> or disable password authentication.\u003c/p>\n\u003ch2 id=\"releases-that-are-no-longer-supported-3-21-and-older\">Releases that are no longer supported (3.21 and older)\u003c/h2>\n\u003cp>These releases have the same bug. 3.21 reached its end of support on 2026-11-01, but we have published fixed packages for each release all the way back to 3.16.\u003c/p>\n\u003ch2 id=\"how-do-i-know-if-i-was-attacked\">How do I know if I was attacked?\u003c/h2>\n\u003cp>Look in \u003ccode>/var/log/messages\u003c/code> for \u003ccode>sshd\u003c/code> lines reading \u003ccode>Accepted password for\u003c/code>\nan account that has no password (\u003ccode>alpine\u003c/code>, \u003ccode>root\u003c/code>, or any key-only user).\nReview \u003ccode>doas\u003c/code> use and recently created users, files and authorized keys on\nexposed machines. If you cannot rule out a login, treat the machine as\ncompromised.\u003c/p>\n\u003ch2 id=\"how-could-this-happen\">How could this happen?\u003c/h2>\n\u003cp>When sshd is built without PAM, it checks a password by hashing the attempt\nwith \u003ccode>crypt()\u003c/code> (the C library function that turns a password into its stored\nhash) and comparing the result to the stored password field. For an account\nwhose stored field is too short to contain a salt (the random prefix of a\nhash), sshd borrows the salt of another account.\u003c/p>\n\u003cp>musl’s \u003ccode>crypt()\u003c/code> returns the string \u003ccode>*\u003c/code> as an error indicator when the key is\nover 256 bytes long. \u003ccode>*\u003c/code> is also exactly what the stored field contains for\nevery account with no password, so the “hash” matches and the login succeeds.\u003c/p>\n\u003cp>OpenSSH 10.6p2 avoids the problem in sshd. The stable-branch packages above carry a patch for the same problem.\u003c/p>\n\u003ch2 id=\"credits\">Credits\u003c/h2>\n\u003cp>Reported by Özgün Kültekin of \u003ca href=\"https://wakefield.co\" rel=\"nofollow ugc noopener\">Wakefield\u003c/a>. Thanks to\nDamien Miller and Darren Tucker of the OpenSSH project for the fix and the\n10.6p2 release, to Timo Teräs for help analyzing the issue, and to Natanael\nCopa, who built and uploaded the updated packages.\u003c/p>","headings":[{"level":1,"text":"Security advisory: openssh-server password authentication bypass","id":"security-advisory-openssh-server-password-authentication-bypass"},{"level":2,"text":"What is the problem?","id":"what-is-the-problem"},{"level":2,"text":"Who is affected?","id":"who-is-affected"},{"level":3,"text":"Who is not affected?","id":"who-is-not-affected"},{"level":2,"text":"How can I fix it?","id":"how-can-i-fix-it"},{"level":3,"text":"1. Update","id":"1-update"},{"level":3,"text":"2. If you cannot update: disable password authentication","id":"2-if-you-cannot-update-disable-password-authentication"},{"level":2,"text":"Cloud images (tiny-cloud)","id":"cloud-images-tiny-cloud"},{"level":2,"text":"Releases that are no longer supported (3.21 and older)","id":"releases-that-are-no-longer-supported-3-21-and-older"},{"level":2,"text":"How do I know if I was attacked?","id":"how-do-i-know-if-i-was-attacked"},{"level":2,"text":"How could this happen?","id":"how-could-this-happen"},{"level":2,"text":"Credits","id":"credits"}]}}