Bug 2189736 (CVE-2023-2283)

Summary: CVE-2023-2283 libssh: authorization bypass in pki_verify_data_signature
Product: [Other] Security Response Reporter: Sandipan Roy <saroy>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acrosby, adudiak, akarol, ansasaki, aoconnor, bdettelb, caswilli, dffrench, dhalasz, dkuc, dmetzger, fjansen, gmccullo, gtanzill, gzaronik, hbraun, hkataria, ikanias, jary, jburrell, jhardy, jjelen, jkoehler, jmitchel, jsherril, jtanner, jwong, kaycoth, kdudka, kshier, micjohns, mpitt, ngough, npocs, nweather, oezr, psegedy, rgodfrey, roliveri, rravi, security-response-team, simaishi, smallamp, stcannon, sthirugn, tcarlin, tfister, tkasparek, tmeszaro, tohughes, tsasak, vkrizan, vmugicag, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in libssh, where the authentication check of the connecting client can be bypassed in the`pki_verify_data_signature` function in memory allocation problems. This issue may happen if there is insufficient memory or the memory usage is limited. The problem is caused by the return value `rc,` which is initialized to SSH_ERROR and later rewritten to save the return value of the function call `pki_key_check_hash_compatible.` The value of the variable is not changed between this point and the cryptographic verification. Therefore any error between them calls `goto error` returning SSH_OK.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-27 19:45:50 UTC 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: 2189740, 2189741, 2189742, 2196100, 2196101, 2196102, 2196103, 2196104    
Bug Blocks: 2189609    

Description Sandipan Roy 2023-04-26 04:06:32 UTC
The authentication check of the connecting client can be bypassed in the function `pki_verify_data_signature` in circumstances of memory allocation problems. This may happen f.e. if not enough memory or the memory usage is limited.

The problem is caused by the return value `rc`, which is initialized to SSH_ERROR and later rewritten to save the return value of the function call `pki_key_check_hash_compatible`. The value of the variable is not changed between this point and the cryptographic verification, therefore any error between them calls `goto error` returning SSH_OK.

Comment 3 Sandipan Roy 2023-05-08 04:53:22 UTC
Created libssh tracking bugs for this issue:

Affects: epel-7 [bug 2196100]
Affects: fedora-all [bug 2196102]


Created libssh2 tracking bugs for this issue:

Affects: epel-8 [bug 2196101]
Affects: fedora-all [bug 2196103]


Created mingw-libssh2 tracking bugs for this issue:

Affects: fedora-all [bug 2196104]

Comment 5 errata-xmlrpc 2023-06-27 14:57:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:3839 https://access.redhat.com/errata/RHSA-2023:3839

Comment 6 Product Security DevOps Team 2023-06-27 19:45:45 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2023-2283

Comment 7 Ginadavis 2023-08-16 02:11:29 UTC Comment hidden (spam)
Comment 8 errata-xmlrpc 2023-11-07 08:22:20 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:6643 https://access.redhat.com/errata/RHSA-2023:6643

Comment 10 errata-xmlrpc 2024-01-29 08:20:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2024:0538 https://access.redhat.com/errata/RHSA-2024:0538