Bug 1978810 (CVE-2021-3634) - CVE-2021-3634 libssh: possible heap-based buffer overflow when rekeying
Summary: CVE-2021-3634 libssh: possible heap-based buffer overflow when rekeying
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-3634
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1994600 1994607 1998139 1994605 1998135 1998136 1998137 1998140
Blocks: 1976967 1978811
TreeView+ depends on / blocked
 
Reported: 2021-07-02 19:54 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-09-29 06:59 UTC (History)
34 users (show)

Fixed In Version: libssh 0.9.6
Doc Type: If docs needed, set a value
Doc Text:
A flaw has been found in libssh. The SSH protocol keeps track of two shared secrets during the lifetime of the session. One of them is called secret_hash and the other session_id. Initially, both of them are the same, but after key re-exchange, previous session_id is kept and used as an input to new secret_hash. Historically, both of these buffers had shared length variable, which worked as long as these buffers were same. But the key re-exchange operation can also change the key exchange method, which can be based on hash of different size, eventually creating "secret_hash" of different size than the session_id has. This becomes an issue when the session_id memory is zeroed or when it is used again during second key re-exchange.
Clone Of:
Environment:
Last Closed: 2021-08-26 13:34:15 UTC


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2021-07-02 19:54:56 UTC
The SSH protocol keeps track of two shared secrets during the lifetime of the session. One of them is called `secret_hash` and the other `session_id`. Initially, both of them are the same, but after key re-exchange, previous `session_id` is kept and used as an input to new `secret_hash`. Historically, both of these buffers had shared length variable, which worked as long as these buffers were same. But the key re-exchange operation can also change the key exchange method, which can be based on hash of different size, eventually creating `secret_hash` of different size than the `session_id` has. This becomes an issue when the `session_id` memory is zeroized or when it is used again during second key re-exchange.

Comment 4 devthomp 2021-08-26 13:22:07 UTC
Created libssh tracking bugs for this issue:

Affects: epel-7 [bug 1998139]
Affects: fedora-all [bug 1998135]


Created libssh2 tracking bugs for this issue:

Affects: epel-8 [bug 1998140]
Affects: fedora-all [bug 1998136]


Created mingw-libssh2 tracking bugs for this issue:

Affects: fedora-all [bug 1998137]

Comment 6 devthomp 2021-08-26 13:34:15 UTC
Embargo lifted, patch attached, analysis has been completed resolving..


Note You need to log in before you can comment on or make changes to this bug.