Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920292 - <net-misc/openssh-9.6_p1: terrapin vulnerability
Summary: <net-misc/openssh-9.6_p1: terrapin vulnerability
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL: https://terrapin-attack.com/
Whiteboard: A3 [glsa+]
Keywords:
Depends on: 920725
Blocks: CVE-2023-48795
  Show dependency tree
 
Reported: 2023-12-18 23:45 UTC by Christopher Fore
Modified: 2024-01-07 05:52 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Fore 2023-12-18 23:45:26 UTC
CVE-2023-48795 (https://terrapin-attack.com/):

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remote attackers to bypass integrity checks such that some packets are omitted (from the extension negotiation message), and a client and server may consequently end up with a connection for which some security features have been downgraded or disabled, aka a Terrapin attack. This occurs because the SSH Binary Packet Protocol (BPP), implemented by these extensions, mishandles the handshake phase and mishandles use of sequence numbers. For example, there is an effective attack against ChaCha20-Poly1305 (and CBC with Encrypt-then-MAC). The bypass occurs in chacha20-poly1305@openssh.com and (if CBC is used) the -etm@openssh.com MAC algorithms. This also affects Maverick Synergy Java SSH API before 3.1.0-SNAPSHOT, Dropbear through 2022.83, Ssh before 5.1.1 in Erlang/OTP, and PuTTY before 0.80; and there could be effects on Bitvise SSH through 9.31, AsyncSSH through 2.14.1, libssh through 0.10.5, and golang.org/x/crypto through 2023-12-17.
Comment 1 Larry the Git Cow gentoo-dev 2023-12-19 05:42:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1307b9e32ea830c31939a8083de2b052e6fa3bc

commit d1307b9e32ea830c31939a8083de2b052e6fa3bc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-19 05:40:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-19 05:40:50 +0000

    net-misc/openssh: add 9.6_p1
    
    Bug: https://bugs.gentoo.org/920292
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/openssh/Manifest              |   2 +
 net-misc/openssh/openssh-9.6_p1.ebuild | 378 +++++++++++++++++++++++++++++++++
 2 files changed, 380 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2023-12-20 07:14:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b22d07f89b16ac3400e45077702ac4c4492e5a4

commit 0b22d07f89b16ac3400e45077702ac4c4492e5a4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-20 07:12:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-20 07:14:16 +0000

    net-misc/openssh: disable problematic -fzero-call-used-regs=*
    
     --with-hardening adds the following in addition to flags we
     already set in our toolchain:
     * -ftrapv (which is broken with GCC anyway),
     * -ftrivial-auto-var-init=zero (which is nice, but not the end of
        the world to not have)
     * -fzero-call-used-regs=used (history of miscompilations with
        Clang (bug #872548), ICEs on m68k (bug #920350, gcc PR113086,
        gcc PR104820, gcc PR104817, gcc PR110934)).
    
     Furthermore, OSSH_CHECK_CFLAG_COMPILE does not use AC_CACHE_CHECK,
     so we cannot just disable -fzero-call-used-regs=used.
    
     Therefore, just pass --without-hardening, given it doesn't negate
     our already hardened toolchain defaults, and avoids adding flags
     which are known-broken in both Clang and GCC and haven't been
     proven reliable.
    
    Bug: https://bugs.gentoo.org/872548
    Bug: https://bugs.gentoo.org/920350
    Bug: https://bugs.gentoo.org/920292
    Bug: https://gcc.gnu.org/PR113086
    Bug: https://gcc.gnu.org/PR104820
    Bug: https://gcc.gnu.org/PR104817
    Bug: https://gcc.gnu.org/PR110934
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/openssh/openssh-9.6_p1-r1.ebuild | 396 ++++++++++++++++++++++++++++++
 1 file changed, 396 insertions(+)
Comment 3 Larry the Git Cow gentoo-dev 2023-12-28 02:22:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/data/glsa.git/commit/?id=3dfe782899716a3480c9481c69bca8c231c663a7

commit 3dfe782899716a3480c9481c69bca8c231c663a7
Author:     GLSAMaker <glsamaker@gentoo.org>
AuthorDate: 2023-12-28 02:21:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-28 02:22:09 +0000

    [ GLSA 202312-17 ] OpenSSH: Multiple Vulnerabilities
    
    Bug: https://bugs.gentoo.org/920292
    Bug: https://bugs.gentoo.org/920722
    Signed-off-by: GLSAMaker <glsamaker@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 glsa-202312-17.xml | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)