Hello Werner, Am Freitag 20 November 2026 19:01:51 schrieb Werner Koch via Gnupg-announce: > We are pleased to announce the availability of a new GPGME release: > version 2.3.1. This version fixes a *critical security bug* found in > all prior versions. We also release a new Gpg4win versions and and > GnuPG Desktop and GnuPG VS-Desktop versions which all make use of GPGME.
> If for some reasons GPGME can't be updated, you may patch your GPGME > version using the attached patch which likley applies cleanly even to > very old versions. seems the patch did not make the announcement mail. (And also I had a bad signature on this email, but this sometimes happens when Mailman folds some long attachment header lines.) The git mirror at https://github.com/gpg/gpgme/commits/master/ does not seem to have the patch yet. Via https://static.dev.gnupg.org/T8557.html I find: https://files.gnupg.net/file/download/axt3h64updbajz6vqo7s/PHID-FILE-5q4pafgp6rh63pjxfiie/0001-core-Fix-double-free-of-the-status-and-colon-buffers.patch and I'll attach the commit I'll find in the gpgme.git repo, which looks similar. (But I did not check that those patches apply or build. This is for the experienced developer.) Best, Bernhard -- https://intevation.de/~bernhard +49 541 33 508 3-3 Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998 Geschäftsführer: Frank Koormann, Bernhard Reiter
commit 14499348b966cd7b3d72afee15a5cd51cdd0a727 Author: Werner Koch <[email protected]> Date: Sat Nov 14 13:43:00 2026 +0100 Fix a double free in the status line read code. * src/engine-gpg.c (read_status): Immediately assign the realloced buffer to the context and not just at the end. (read_colon_line): Ditto. -- This fixes a 24 years old bug introduced with Fixes-commit: f12433c1e476f52c92496a885c1ffcd10fa2a322 GnuPG-bug-id: T8557 Reported-by: Johan Carlsson (https://hackerone.com/joaxcar?type=user) diff --git a/src/engine-gpg.c b/src/engine-gpg.c index eea97bc7..66e567b0 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -1494,7 +1494,9 @@ read_status (engine_gpg_t gpg) buffer = realloc (buffer, bufsize); if (!buffer) return gpg_error_from_syserror (); - } + gpg->status.bufsize = bufsize; + gpg->status.buffer = buffer; + } nread = _gpgme_io_read (gpg->status.fd[0], buffer + readpos, bufsize-readpos); @@ -1606,8 +1608,6 @@ read_status (engine_gpg_t gpg) } /* Update the gpg object. */ - gpg->status.bufsize = bufsize; - gpg->status.buffer = buffer; gpg->status.readpos = readpos; return 0; } @@ -1647,6 +1647,8 @@ read_colon_line (engine_gpg_t gpg) buffer = realloc (buffer, bufsize); if (!buffer) return gpg_error_from_syserror (); + gpg->colon.bufsize = bufsize; + gpg->colon.buffer = buffer; } nread = _gpgme_io_read (gpg->colon.fd[0], buffer+readpos, bufsize-readpos); @@ -1726,8 +1728,6 @@ read_colon_line (engine_gpg_t gpg) } /* Update the gpg object. */ - gpg->colon.bufsize = bufsize; - gpg->colon.buffer = buffer; gpg->colon.readpos = readpos; return 0; }
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Gnupg-devel mailing list [email protected] https://lists.gnupg.org/mailman/listinfo/gnupg-devel
