Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 855395 (CVE-2022-34903) - <app-crypt/gnupg-{2.2.35-r1, 2.3.6-r1}: Signature spoofing via status line injection
Summary: <app-crypt/gnupg-{2.2.35-r1, 2.3.6-r1}: Signature spoofing via status line in...
Status: IN_PROGRESS
Alias: CVE-2022-34903
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL:
Whiteboard: A3 [glsa? cleanup]
Keywords:
Depends on: 856322
Blocks:
  Show dependency tree
 
Reported: 2022-06-30 19:08 UTC by Sam James
Modified: 2022-07-12 01:28 UTC (History)
2 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 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-30 19:08:39 UTC
Post on oss-security: https://marc.info/?l=oss-security&m=165657063921408&w=2

Partial quote:
"""
After discovering that gpgv does not support
--exit-on-status-write-error, I decided to check if it handles write
errors on the status file descriptor properly.  I ultimately found that
while such errors are *not* handled properly, exploiting this flaw in
practice would likely be very difficult and unreliable.  However, in the
course of this research (and entirely accidentally), I found that if a
signature has a notation with a value of 8192 spaces, gpg will crash
while writing the notation's value to the status FD.  This turned out to
be a far more severe flaw, with consequences including the ability to
make a signature that will appear to be ultimately valid and made by a
key with any fingerprint one wishes.
"""
Comment 1 Larry the Git Cow gentoo-dev 2022-06-30 20:01:14 UTC
The bug has been referenced in the following commit(s):

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

commit 988fa70ca5731f8d4a1862d559603cbf13d569be
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-30 20:01:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-30 20:01:08 +0000

    app-crypt/gnupg: backport signature status message fix
    
    Bug: https://bugs.gentoo.org/855395
    Signed-off-by: Sam James <sam@gentoo.org>

 .../gnupg-2.2.35-status-messages-garbled.patch     |  45 ++++++
 .../gnupg-2.3.6-status-messages-garbled.patch      |  45 ++++++
 app-crypt/gnupg/gnupg-2.2.35-r1.ebuild             | 160 ++++++++++++++++++++
 app-crypt/gnupg/gnupg-2.3.6-r1.ebuild              | 165 +++++++++++++++++++++
 4 files changed, 415 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2022-07-12 01:28:39 UTC
The bug has been referenced in the following commit(s):

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

commit 3070f3b4f2d5f3de77046e8594493fb041f86176
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-12 01:27:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-12 01:27:59 +0000

    app-crypt/gnupg: add 2.3.7
    
    Note that CVE-2022-34903 was already fixed in 2.4.6-r1 in Gentoo.
    
    Bug: https://bugs.gentoo.org/855395
    Signed-off-by: Sam James <sam@gentoo.org>

 app-crypt/gnupg/Manifest           |   2 +
 app-crypt/gnupg/gnupg-2.3.7.ebuild | 164 +++++++++++++++++++++++++++++++++++++
 2 files changed, 166 insertions(+)