...
 
Commits (3)
gnupg2 (2.1.18-8~deb9u2) stretch-security; urgency=high
* Non-maintainer upload by the Security Team.
* gpg: Sanitize diagnostic with the original file name (CVE-2018-12020)
-- Salvatore Bonaccorso <carnil@debian.org> Fri, 08 Jun 2018 20:12:24 +0200
gnupg2 (2.1.18-8~deb9u1) stretch; urgency=medium
* Bugfix update for debian stretch point release.
-- Daniel Kahn Gillmor <dkg@fifthhorseman.net> Mon, 18 Sep 2017 16:41:12 -0400
gnupg2 (2.1.18-8) unstable; urgency=medium
* updated scdaemon fix from gniibe (Closes: #862032)
......
......@@ -41,7 +41,7 @@ Build-Depends-Indep:
libnpth-mingw-w64-dev,
libz-mingw-w64-dev,
mingw-w64,
Vcs-Git: https://anonscm.debian.org/git/pkg-gnupg/gnupg2.git
Vcs-Git: https://anonscm.debian.org/git/pkg-gnupg/gnupg2.git -b stretch
Vcs-Browser: https://anonscm.debian.org/git/pkg-gnupg/gnupg2.git
Homepage: https://www.gnupg.org/
......
[DEFAULT]
pristine-tar = True
upstream-vcs-tag = gnupg-%(version)s
debian-branch = stretch
[buildpackage]
compression = bzip2
[import-orig]
filter = [
......
From: Werner Koch <wk@gnupg.org>
Date: Fri, 8 Jun 2018 10:45:21 +0200
Subject: gpg: Sanitize diagnostic with the original file name.
Origin: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=210e402acd3e284b32db1901e43bf1470e659e49
Bug: https://dev.gnupg.org/T4012
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2018-12020
* g10/mainproc.c (proc_plaintext): Sanitize verbose output.
--
This fixes a forgotten sanitation of user supplied data in a verbose
mode diagnostic. The mention CVE is about using this to inject
status-fd lines into the stderr output. Other harm good as well be
done. Note that GPGME based applications are not affected because
GPGME does not fold status output into stderr.
CVE-id: CVE-2018-12020
GnuPG-bug-id: 4012
(cherry picked from commit 13f135c7a252cc46cff96e75968d92b6dc8dce1b)
---
g10/mainproc.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 116b72a6b..72b0dd828 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -758,7 +758,14 @@ proc_plaintext( CTX c, PACKET *pkt )
if (pt->namelen == 8 && !memcmp( pt->name, "_CONSOLE", 8))
log_info (_("Note: sender requested \"for-your-eyes-only\"\n"));
else if (opt.verbose)
- log_info (_("original file name='%.*s'\n"), pt->namelen, pt->name);
+ {
+ /* We don't use print_utf8_buffer because that would require a
+ * string change which we don't want in 2.2. It is also not
+ * clear whether the filename is always utf-8 encoded. */
+ char *tmp = make_printable_string (pt->name, pt->namelen, 0);
+ log_info (_("original file name='%.*s'\n"), (int)strlen (tmp), tmp);
+ xfree (tmp);
+ }
free_md_filter_context (&c->mfx);
if (gcry_md_open (&c->mfx.md, 0, 0))
--
2.17.1
......@@ -76,3 +76,4 @@ gpg-agent-idling/0004-agent-Avoid-scheduled-checks-on-socket-when-inotify-.patch
skip-missing-signing-keys/0076-g10-Skip-signing-keys-where-no-secret-key-is-availab.patch
skel-file-removal/0077-g10-remove-skeleton-options-files.patch
avoid-spurious-warnings/0078-gpg-Avoid-spurious-warnings-about-trust-packets.patch
0079-gpg-Sanitize-diagnostic-with-the-original-file-name.patch