Bug 29419 - libssh new security issue CVE-2021-3634
Summary: libssh new security issue CVE-2021-3634
Status: ASSIGNED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL:
Whiteboard: MGA8-64-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2021-08-27 17:30 CEST by David Walser
Modified: 2021-09-10 13:44 CEST (History)
7 users (show)

See Also:
Source RPM: libssh-0.9.5-1.mga8.src.rpm
CVE: CVE-2021-3634
Status comment:


Attachments

Description David Walser 2021-08-27 17:30:55 CEST
Upstream has issued an advisory on August 26:
https://www.libssh.org/security/advisories/CVE-2021-3634.txt

The issue is fixed upstream in 0.9.6:
https://www.libssh.org/2021/08/26/libssh-0-9-6-security-release/

Mageia 8 is also affected.
David Walser 2021-08-27 17:31:11 CEST

Status comment: (none) => Fixed upstream in 0.9.6
Whiteboard: (none) => MGA8TOO
CC: (none) => geiger.david68210

Comment 1 David Walser 2021-08-27 17:40:13 CEST
Ubuntu has issued an advisory for this on August 26:
https://ubuntu.com/security/notices/USN-5053-1

Severity: normal => major

Comment 2 Lewis Smith 2021-08-27 20:22:50 CEST
Assigning to DavidG who has dealt with this in the past; CC'ing Joseph who did the most recent update, and may be willing to deal with this.

CC: geiger.david68210 => joequant
Assignee: bugsquad => geiger.david68210

Comment 3 David Walser 2021-09-01 17:56:10 CEST
Debian has issued an advisory for this on August 31:
https://www.debian.org/security/2021/dsa-4965
Comment 4 Marja Van Waes 2021-09-06 16:38:50 CEST
Reassigning to all packagers collectively, because Daviddavid hasn't been around so far this summer.

libssh-0.9.6 built fine in cauldron locally and lib64ssh4-0.9.6 installed fine, too, but I have no understanding of the package and nothing on my system needs lib64ssh4, so I can't test it and therefore won't commit it, sorry.

Assignee: geiger.david68210 => pkg-bugs
CC: (none) => geiger.david68210, marja11

Comment 5 Nicolas Salguero 2021-09-06 16:54:23 CEST
Suggested advisory:
========================

The updated packages fix a security vulnerability:

A flaw has been found in libssh in versions prior to 0.9.6. 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. (CVE-2021-3634)

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3634
https://www.libssh.org/security/advisories/CVE-2021-3634.txt
https://www.libssh.org/2021/08/26/libssh-0-9-6-security-release/
https://ubuntu.com/security/notices/USN-5053-1
https://www.debian.org/security/2021/dsa-4965
========================

Updated packages in core/updates_testing:
========================
lib(64)ssh4-0.9.6-1.mga8
lib(64)ssh-devel-0.9.6-1.mga8

from SRPM:
libssh-0.9.6-1.mga8.src.rpm

Whiteboard: MGA8TOO => (none)
Status: NEW => ASSIGNED
Status comment: Fixed upstream in 0.9.6 => (none)
Assignee: pkg-bugs => qa-bugs
Version: Cauldron => 8
CVE: (none) => CVE-2021-3634
CC: (none) => nicolas.salguero

Comment 6 Brian Rockwell 2021-09-06 22:57:32 CEST
MGA8-64 

$ uname -a
Linux localhost 5.10.62-desktop-1.mga8 #1 SMP Fri Sep 3 14:47:45 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux


installed lib64ssh4

- used keygen to generate a new private/public key
- published public key
- able to connect to remote server with new key

seems to work if this is a valid test.

CC: (none) => brtians1
Whiteboard: (none) => MGA8-64-OK

Comment 7 David Walser 2021-09-06 23:26:54 CEST
Openssh itself doesn't use this library, so you'd have to use something that does for it to be a valid test.
Comment 8 Brian Rockwell 2021-09-07 03:45:08 CEST
taking off the okay then until I can confirm the library.

Whiteboard: MGA8-64-OK => (none)

Comment 9 Brian Rockwell 2021-09-07 15:45:23 CEST
installed remmina

strace -o lib64ssh4.txt remmina

attempted connection to remote linux server

in log I see

openat(AT_FDCWD, "/lib64/libssh.so.4", O_RDONLY|O_CLOEXEC) = 3

seems to be responding and working.
Brian Rockwell 2021-09-09 23:24:18 CEST

Whiteboard: (none) => MGA8-64-OK

Comment 10 Thomas Andrews 2021-09-10 13:44:44 CEST
Validating. Advisory in Comment 5.

CC: (none) => andrewsfarm, sysadmin-bugs
Keywords: (none) => validated_update


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