GnuPG's GPGME Affected By Critical Security Bug In Turn Affecting Mail Clients, Flatpak

Werner Koch announced a late Friday afternoon "critical security bug" affecting GnuPG's GPGME library - GnuPG Made Easy. Unfortunately this in turn affects GPGME users like most email clients, most XMPP clients, Flatpak, Samba, and other software. This critical security bug made public today affects all existing releases of GnuPG Made Easy. A crafted very long user ID can trigger a double-free that in turn can be used to extract data from applications by sending for example signed data. It's also possible but not confirmed that this bug could be leveraged for mounting a remote code execution (RCE) attack. Wener Koch is recommending GPGME users immediately update their GPGME to today's version. "By using an OpenPGP key containing a crafted very long user id it is possible to trigger a double free. This double free can be used exfiltrate data from applications by sending for example signed data. Exploiting this bug to mount an Remote Code Execution attack (RCE) can't be ruled out. Thus an immediate update is highly suggested. ... The root cause for this bug are two GPGME internal functions to read the status lines and key listings from gpg. Initially a buffer of 1024 bytes is allocated which is reallocated if more space is required. When reallocating the pointer to the new buffer is used by the function but it is only assigned back to the context object at the end of the function. Thus if the function returns early due to an read error or other events the context is not updated and keeps the stale pointer to the freed memory. Eventually the context is released and the memory freed a second time. Due to other allocations in between the common double free checks of memory allocators may not be triggered." All applications using existing GPGME versions whether as a shared library, DLL, or statically linked version are affected. More details via the mailing list announcement. GPGME 2.3.1 is the first fixed version.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.