Bug 2255268 (CVE-2023-51384)

Summary: CVE-2023-51384 openssh: destination constraints only apply to first PKCS#11 key
Product: [Other] Security Response Reporter: Robb Gatica <rgatica>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bdettelb, caswilli, dfreiber, drow, fjansen, hkataria, jburrell, jmitchel, jsamir, jsherril, jtanner, kaycoth, kshier, orabin, psegedy, sthirugn, tsasak, vkrizan, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: openssh 9.6 Doc Type: ---
Doc Text:
A flaw was found in OpenSSH. When specifying destination constraints while adding PKCS#11-hosted private keys, the constraints only apply to the first key even in cases where the token returns multiple keys.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2255273    
Bug Blocks: 2255265    

Description Robb Gatica 2023-12-19 19:01:52 UTC
In ssh-agent in OpenSSH before 9.6, when adding PKCS#11-hosted private keys while specifying destination constraints, if the PKCS#11 token returned multiple keys then only the first key had the constraints applied. Use of regular private keys, FIDO tokens and unconstrained keys are unaffected.

References:
https://github.com/openssh/openssh-portable/commit/881d9c6af9da4257c69c327c4e2f1508b2fa754b
https://www.openssh.com/txt/release-9.6
https://www.openwall.com/lists/oss-security/2023/12/18/2

Comment 1 Robb Gatica 2023-12-19 19:35:39 UTC
Created openssh tracking bugs for this issue:

Affects: fedora-all [bug 2255273]