Security News > 2021 > January > Severe bug in Libgcrypt – used by GPG and others – is a whole heap of trouble, prompts patch scramble

Severe bug in Libgcrypt – used by GPG and others – is a whole heap of trouble, prompts patch scramble
2021-01-29 20:21

The identified bug is a heap buffer overflow and it's considered rather serious because it's easily exploitable.

"Just decrypting some data can overflow a heap buffer with attacker controlled data, no verification or signature is validated before the vulnerability occurs," explains Werner Koch, principal developer of GnuPGP in the security advisory.

Filippo Valsorda, a cryptography and software engineer on Google's Go programming language team, dissected the bug in a Twitter thread and lays the blame in part on the lack of memory safety in Libgcrypt's C code.

You can overflow buffer with input data, as described above, to alter the function pointer func, which is called shortly after, to redirect control of the program to attacker-defined instructions.

Valsorda points out that the vulnerability was introduced in an effort to mitigate timing side channel attacks, and is critical of the way the buffered data length is managed.

Among the Twitterati following the bug discussion, developer Chris Cowan quipped, "You'd think encryption software maintainers would be more enthusiastic about using encryption." .


News URL

https://go.theregister.com/feed/www.theregister.com/2021/01/29/severe_libgcrypt_bug/