[SRU] SSH pubkey authetication fails when GSSAPI enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Debian) |
Fix Released
|
Unknown
|
|||
openssh (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Jammy |
Fix Released
|
Medium
|
Lukas Märdian | ||
Noble |
Fix Released
|
High
|
Lukas Märdian | ||
Oracular |
Fix Released
|
High
|
Lukas Märdian | ||
Plucky |
Fix Released
|
High
|
Unassigned |
Bug Description
[ Impact ]
* Login with publickey fails when openssh server is configured to use GSSAPI authentication, too. Error: "sign_and_
* To trigger it, one needs to (a) perform a successful GSSAPI key exchange, (b) attempt public key authentication.
* In addition, the client and the server must both have the hostbound authentication protocol extension enabled for the problem to manifest itself (On by default).
* This is not a very common combination, but it can happen if one has Kerberos credentials for the correct realm but the wrong user, and a private key for the right user.
* This SRU fixes this by adding an additional "ssh->kex-
[ Test Plan ]
The reproducer was codified in autopkgtests, thanks to Colin Watson!
* Make sure to have the latest debian/
* Execute the "ssh-gssapi" dep8 test:
$ autopkgtest -U openssh --apt-pocket=
* Confirm the log contains 3 login attempts, with the final one using the "publickey" authentication method ("Accepted publickey for testuser..."):
"""
## Checking ssh logs to confirm publickey auth was used
Dec 14 22:44:16 sshd-gssapi.
## PASS test_gssapi_
"""
[ Test Plan 2 ]
* In addition to the codified test for this specific issue, we want to confirm normal password and publickey login are still working as expected.
* Enable "PasswordAuthen
* Login using password, confirm success
* Copy public key over to system-under-test
* Enable "PubkeyAuthenti
* Login using private key, confirm success
[ Where problems could occur ]
* This SRU tweaks the authentication logic of OpenSSH, therefore it's a high-impact change. If something goes wrong, it could lock people out of their remote machines.
* The change has been deployed to Debian testing and Ubuntu Plucky since October 2024, without major issues raised.
* I've added "[ Test Plan 2 ]" to confirm normal publickey & password login is still working as expected
[ Other Info ]
* Fixed as of 1:9.9p1-2 (e.g. in Plucky)
* Rejected upstream, due to being a bug in the Debian delta:
https:/
* Fixed in Debian by Colin Watson:
https:/
=== original bug report ===
Since the upgrade from Ubuntu 20.04 to 22.04 the SSH login via a SSH pubkey to our servers fails, while password and kerberos are still working.
$ssh user@server
sign_and_
This seem related to the bugreport at openssh: https:/
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: openssh-server 1:8.9p1-3ubuntu0.1
ProcVersionSign
Uname: Linux 5.15.0-76-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckR
CloudArchitecture: x86_64
CloudID: none
CloudName: none
CloudPlatform: none
CloudSubPlatform: config
Date: Thu Jul 20 17:25:01 2023
InstallationDate: Installed on 2020-08-24 (1060 days ago)
InstallationMedia: Ubuntu-Server 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
SourcePackage: openssh
UpgradeStatus: Upgraded to jammy on 2023-07-20 (0 days ago)
Related branches
- git-ubuntu bot: Approve
- Nick Rosbrook (community): Approve
- Christian Ehrhardt: Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 163 lines (+49/-18)3 files modifieddebian/changelog (+12/-0)
debian/patches/gssapi.patch (+11/-0)
debian/tests/ssh-gssapi (+26/-18)
- git-ubuntu bot: Approve
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 163 lines (+49/-18)3 files modifieddebian/changelog (+12/-0)
debian/patches/gssapi.patch (+11/-0)
debian/tests/ssh-gssapi (+26/-18)
- git-ubuntu bot: Approve
- Christian Ehrhardt (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 172 lines (+51/-18) (has conflicts)3 files modifieddebian/changelog (+14/-0)
debian/patches/gssapi.patch (+11/-0)
debian/tests/ssh-gssapi (+26/-18)
- git-ubuntu bot: Approve
- Christian Ehrhardt (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 163 lines (+49/-18)3 files modifieddebian/changelog (+12/-0)
debian/patches/gssapi.patch (+11/-0)
debian/tests/ssh-gssapi (+26/-18)
CVE References
Changed in openssh (Debian): | |
status: | Unknown → Fix Committed |
tags: | added: server-todo |
Changed in openssh (Debian): | |
status: | Fix Committed → Fix Released |
summary: |
- SSH pubkey authetication fails when GSSAPI enabled + [SRU] SSH pubkey authetication fails when GSSAPI enabled |
description: | updated |
Changed in openssh (Ubuntu Oracular): | |
assignee: | nobody → Lukas Märdian (slyon) |
Changed in openssh (Ubuntu Noble): | |
assignee: | nobody → Lukas Märdian (slyon) |
Changed in openssh (Ubuntu Jammy): | |
assignee: | nobody → Lukas Märdian (slyon) |
Changed in openssh (Ubuntu Oracular): | |
status: | New → In Progress |
Changed in openssh (Ubuntu Oracular): | |
importance: | Undecided → High |
Changed in openssh (Ubuntu Noble): | |
importance: | Undecided → High |
Changed in openssh (Ubuntu Jammy): | |
importance: | Undecided → Medium |
Changed in openssh (Ubuntu Jammy): | |
status: | Triaged → In Progress |
I can confirm this behavior here.
I've found I can work around it by unsetting KRB5CCNAME in the client environment.