LWN: Comments on "Critical security problem in Libgcrypt 1.9.0" https://lwn.net/Articles/844531/ This is a special feed containing comments posted to the individual LWN article titled "Critical security problem in Libgcrypt 1.9.0". en-us Sat, 08 Nov 2025 20:06:26 +0000 Sat, 08 Nov 2025 20:06:26 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/845011/ https://lwn.net/Articles/845011/ nix <blockquote> I don't find the Beale story very convincing. Three ciphertexts, one of which uses a trivial (and incompetently executed) book cipher with the US Declaration of Independence as key, and the other two are "unknown". Could that be because they use a remarkable never subsequently identified cipher? Sure it could. But a far more likely explanation is that they're effectively gibberish, and the Beale ciphers are a prank that outlasted its expected value. </blockquote> Given that the first cipher, when decrypted using the same modified-Declaration-of-Independence key as the (pre-decrypted) B2, has fairly long near-alphabetic runs in it which are very unlikely to occur by chance, I would have to agree with Gillogly: this is a not especially good hoax, and B1 and B3 have no decryption (or, rather, B1 has long been decrypted: its decryption is the near-gibberish shown by Gillogly, alphabetic runs and all). Thu, 04 Feb 2021 01:12:05 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844966/ https://lwn.net/Articles/844966/ mathstuf <div class="FormattedComment"> IIRC, the LGPL still requests replaceability of the LGPL code in the end (e.g., I can take your usage of the LGPL code, recompile my modifications myself, then inject them into the end product). Now, one can do this because the crates *are* generally all FOSS and executable crates usually (well, certainly should) commit their `Cargo.lock` file into the repository. Using this information, I can get a binary with my modifications, but it isn&#x27;t as trivial as &quot;replace this .so and restart the program&quot;. I suspect this is sufficient, but any non-FOSS binary is going to have trouble consuming LGPL (or stronger) licensed code that ends up statically linked (as Rust basically always does as of today).<br> </div> Wed, 03 Feb 2021 17:59:28 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844923/ https://lwn.net/Articles/844923/ ballombe <div class="FormattedComment"> <font class="QuotedText">&gt; This means the list of possible use cases for your library is now reduced to GPL open source projects.</font><br> <p> Thanks for your clarification, but how is this different from any other language ?<br> If you write a GPL library in any language, in general it can only be used in GPL software <br> <p> What about the LGPL ?<br> </div> Wed, 03 Feb 2021 14:29:48 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844916/ https://lwn.net/Articles/844916/ Jonno <div class="FormattedComment"> <font class="QuotedText">&gt; [...] do you *distribute* a ready-built app, including all the crates, or does the user assemble the app on their system downloading the crates separately from master app?</font><br> <p> Both. Developers usually download and build each crate separately (usually by running e.g. &quot;cargo install ripgrep&quot;). End users usually download pre-built binaries (usually by running e.g. &quot;apt install ripgrep&quot;), which usually (but not always) has statically linked in most dependent crates.<br> </div> Wed, 03 Feb 2021 11:18:29 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844911/ https://lwn.net/Articles/844911/ Wol <div class="FormattedComment"> Not knowing Rust, but do you *distribute* a ready-built app, including all the crates, or does the user assemble the app on their system downloading the crates separately from master app?<br> <p> Because if it&#x27;s the latter, the GPL has no teeth ...<br> <p> Cheers,<br> Wol<br> </div> Wed, 03 Feb 2021 09:42:09 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844894/ https://lwn.net/Articles/844894/ rvolgers <div class="FormattedComment"> There&#x27;s plenty we can disagree on, but let me at least make clear what I was saying.<br> <p> By &quot;Rust ecosystem&quot; I didn&#x27;t mean &quot;everybody who writes Rust&quot;, I mean the library (&quot;crates&quot;) ecosystem, which represents functionality you can use in your own library or app by adding a single line to your project configuration. This is a major strength of Rust.<br> <p> Just about all major crates I can think of are permissively licensed, many of them under the same license as Rust itself (dual licensed Apache 2 and MIT, which is about as permissive as it gets). Because of this they can mix and match freely, using lots of types and abstractions defined in external crates without imposing significant license obligations.<br> <p> Now let&#x27;s say I want to write a crate for package management which can verify PGP signatures, or a crate for mail processing which optionally supports encrypted mails, or a certificate manager which also supports PGP keys. If I use the Sequoia crates then any app built using my crate will include GPL code, meaning the maker of the app must provide the source code for the app (including all other referenced crates) under the GPL as well.<br> <p> This means the list of possible use cases for your library is now reduced to GPL open source projects. That&#x27;s fine if that&#x27;s what you want, but it&#x27;s very different from the normal / expected arrangement you get when you reference a crate.<br> </div> Wed, 03 Feb 2021 02:40:33 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844795/ https://lwn.net/Articles/844795/ Lionel_Debroux <div class="FormattedComment"> Thanks :)<br> Now, I remember seeing a mention of cryptofuzz, but anyway, I didn&#x27;t know libgcrypt was fuzzed through it.<br> Nearly 100 issues mentioned by cryptofuzz&#x27;s README represent a pretty nice roster.<br> </div> Mon, 01 Feb 2021 20:48:29 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844792/ https://lwn.net/Articles/844792/ tialaramex <div class="FormattedComment"> <font class="QuotedText">&gt; Step 2. Use a private cipher.</font><br> <p> It is _extremely_ likely that if somebody actually does want to decrypt your messages this means they succeed. Of course if they didn&#x27;t want to decrypt your messages then absolutely anything would be fine.<br> <p> It&#x27;s much harder to create a secure cipher than to break something people mistakenly believed was unbreakable. Hand rolled systems are also more likely to induce operational errors that ruin your security (e.g. people sending two versions of the same message encrypted with the same key but slightly different content, GnuPG would make this extremely difficult to do, but hand rolled systems cause this all the time)<br> <p> I don&#x27;t find the Beale story very convincing. Three ciphertexts, one of which uses a trivial (and incompetently executed) book cipher with the US Declaration of Independence as key, and the other two are &quot;unknown&quot;. Could that be because they use a remarkable never subsequently identified cipher? Sure it could. But a far more likely explanation is that they&#x27;re effectively gibberish, and the Beale ciphers are a prank that outlasted its expected value.<br> </div> Mon, 01 Feb 2021 20:08:16 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844785/ https://lwn.net/Articles/844785/ jukivili <div class="FormattedComment"> libgcrypt, as well as many other crypto libraries, are being fuzzed in OSS-fuzz through cryptofuzz project, <a href="https://github.com/guidovranken/cryptofuzz">https://github.com/guidovranken/cryptofuzz</a><br> </div> Mon, 01 Feb 2021 18:29:53 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844780/ https://lwn.net/Articles/844780/ ballombe <div class="FormattedComment"> It is difficult not to read the post I replied to as implying that the GPL cannot be used within the rust ecosytem, which seems strange.<br> </div> Mon, 01 Feb 2021 18:19:58 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844772/ https://lwn.net/Articles/844772/ dd9jn <div class="FormattedComment"> There are folks who proxy fuzzing reports. The Google fuzzing thingy is not directly usable for any self-respecting privacy hacker because it requires a Google account just for viewing the reports.<br> </div> Mon, 01 Feb 2021 16:34:08 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844767/ https://lwn.net/Articles/844767/ dd9jn <div class="FormattedComment"> Most of the NEWS items are about bug fixes for 1.9.0. These build problems are actually expected to happen after ~3 years of development with only few people interested in testing the Git version. <br> <p> The performance improvements for z390 were finished only after the 1.9.0 release so I merged them into 1.9.1 because branching at this time does not yet make sense. <br> <p> From experience we know that a Beta or RC release does not yield any better result than our public Git. So, unfortunately, the first releases of a new branch are somewhat rough. And no, we can&#x27;t test all kind of system configurations people are using. After all it is free software and everyone can fix little bugs. There are hints and patches on the problems in the release bug (<a href="https://dev.gnupg.org/T4294">https://dev.gnupg.org/T4294</a>). <br> <p> A new release was anyway planned for Friday; the security bug reported by Tavis merely moved the release to Friday morning. And yes, the broken --disable-asm was an oversight but that is also a special configuration which we don&#x27;t need on our major platforms: Linux on amd64, Windows32 and Windows 64.<br> <p> </div> Mon, 01 Feb 2021 16:30:13 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844694/ https://lwn.net/Articles/844694/ laarmen <div class="FormattedComment"> I interpreted more as a statement of fact. You can find statistics at this address :<br> <p> <a href="https://gist.github.com/passcod/2e1983ce415b32bdf3a0">https://gist.github.com/passcod/2e1983ce415b32bdf3a0</a><br> <p> with an 2020 result in the comments. While GPL 3 is in the top 5 licenses, it isn&#x27;t nearly as used as the MIT license (which I presume is the same as the Expat license). As a lurker in the Rust community, I&#x27;ve never felt like there was any more FUD directed towards the GPL in that community than in any other.<br> </div> Mon, 01 Feb 2021 13:18:49 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844690/ https://lwn.net/Articles/844690/ ballombe <div class="FormattedComment"> Are you implying that the rust ecosystem is somehow scaring people away from the GPL ?<br> </div> Mon, 01 Feb 2021 10:10:01 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844651/ https://lwn.net/Articles/844651/ epa <div class="FormattedComment"> Right, it did seem a bit weird to see such a long list of new features in a security advisory, but I assumed there must be some good reason for it...<br> </div> Sun, 31 Jan 2021 19:27:24 +0000 Speed of interpreter vs compiler https://lwn.net/Articles/844648/ https://lwn.net/Articles/844648/ epa <div class="FormattedComment"> I was thinking in particular of the executable semantics described in <a href="http://fsl.cs.illinois.edu/pubs/ellison-rosu-2012-popl.pdf">http://fsl.cs.illinois.edu/pubs/ellison-rosu-2012-popl.pdf</a> which runs at best 200 times slower than native code and at worst millions of times slower. Of course there is plenty of scope for optimization. Valgrind catches memory errors but it doesn’t nail down absolutely every case of undefined behaviour in C. Then again, that standard of rigour is not needed to eliminate a large number of security bugs in practice.<br> <p> There is a spectrum from fully specified, interpreted machines like the one above (completely safe but very slow) to small modifications of native code like stack canaries and randomized function locations (minimal speed impact in most cases, but only some exploits are stopped). For the sake of my argument I wanted to say that even at a conservative estimate of interpreted code being thousands of times slower, it’s still a worthwhile tradeoff given abundant hardware but scarce programmer time to rewrite everything. <br> <p> </div> Sun, 31 Jan 2021 19:25:11 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844643/ https://lwn.net/Articles/844643/ eharris <div class="FormattedComment"> @tialaramex <br> Quote: &quot;If you did want secure email ... almost immediately you&#x27;ll realise that you can&#x27;t encrypt the metadata that makes email actually work...&quot;<br> *<br> There&#x27;s &quot;secure&quot;.....and then there&#x27;s &quot;private&quot;. You can have both with much less trouble. Step 1: use throwaway email addresses. Step 2. Use a private cipher.<br> *<br> Although both steps requires a community to do some organising, and step 2 requires some effort, the results are also very likely to be immune to &quot;backdoors&quot;. For a century old example take a look at this: <a rel="nofollow" href="https://en.wikipedia.org/wiki/Beale_ciphers">https://en.wikipedia.org/wiki/Beale_ciphers</a><br> </div> Sun, 31 Jan 2021 19:19:36 +0000 Speed of interpreter vs compiler https://lwn.net/Articles/844644/ https://lwn.net/Articles/844644/ jreiser <i>Interpreted code is thousands of times slower</i> <p>Nonsense. The rule-of-thumb speed ratio between compiled and interpreted code is only 10:1. <a href="https://www.valgrind.org">Valgrind</a> has a typical slowdown of only 20x to 40x in contrast to its compiled input. Sun, 31 Jan 2021 18:29:37 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844633/ https://lwn.net/Articles/844633/ epa <div class="FormattedComment"> I believe most of the exploits would be blocked by running the existing C code with stricter run-time checking, for example in one of the C interpreters that exist. In these environments any kind of memory trampling immediately terminates the program. Interpreted code is thousands of times slower, of course, but that can be a fair trade-off (with speed critical parts still compiled, and code review can concentrate on those parts). <br> <p> Rust or another safe language is great, of course, but it is very expensive in programmer time to rewrite things in a new language. Just as obsolete hardware lives on in emulation, we can create a slower and safer environment for legacy C code in places where a single memory handling bug can become a security hole. <br> </div> Sun, 31 Jan 2021 09:58:03 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844625/ https://lwn.net/Articles/844625/ rvolgers <div class="FormattedComment"> There is sequoia-pgp, which is extremely impressive and aims to be a production quality implementation: https://sequoia-pgp.org/<br> <p> However, because sequoia-pgp uses the GPL, which is rather uncommon in the Rust ecosystem, it is mostly useful for other GPL apps and for its command line tools (which, I&#x27;m not sure whether those are release quality yet).<br> <p> For use within the Rust ecosystem there is rPGP (<a href="https://github.com/rpgp/rpgp">https://github.com/rpgp/rpgp</a>), which is missing some functionality and lacks quite a lot of polish.<br> </div> Sun, 31 Jan 2021 02:44:05 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844598/ https://lwn.net/Articles/844598/ tialaramex <div class="FormattedComment"> If the thing you want to do is encrypt stuff, there is a Rust implementation of age, rage<br> <p> <a href="https://github.com/str4d/rage">https://github.com/str4d/rage</a><br> <p> If the thing you want to do is sign things, there is a Rust implementation of signify, signify-rs<br> <p> <a href="https://github.com/badboy/signify-rs">https://github.com/badboy/signify-rs</a><br> <p> A *lot* of applications that rely on GnuPG today would ideally use age or signify (thus rage or signify-rs) instead and could be migrated.<br> <p> These tools intentionally don&#x27;t try to shoe horn an alternative to S/MIME into their feature set, so if your interest in GnuPG is as an alternative to S/MIME then they don&#x27;t have you covered, but you&#x27;re probably in a world of pain for choosing that even if there are no &quot;buffer overflows, double frees, and out-of-bounds writes&quot;.<br> <p> If you did want secure email, trying to build it yourself from age and signify would at least open your eyes to all the horrible problems and painful compromises on your path. For example, almost immediately you&#x27;ll realise that you can&#x27;t encrypt the metadata that makes email actually work, and that if you try to sign it, intermediary transports will change that metadata and invalidate the signature. Does OpenPGP offer a fiendishly clever yet reliable workaround you&#x27;d never have imagined? Er, no.<br> </div> Sat, 30 Jan 2021 15:08:02 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844588/ https://lwn.net/Articles/844588/ Lionel_Debroux <div class="FormattedComment"> I don&#x27;t know how well libgcrypt lends itself to fuzzing, but at least, I can&#x27;t currently see an occurrence of &quot;gcrypt&quot; at <a href="https://github.com/google/oss-fuzz/tree/master/projects">https://github.com/google/oss-fuzz/tree/master/projects</a> , and libgcrypt would probably qualify for &quot;To be accepted to OSS-Fuzz, an open-source project must have a significant user base and/or be critical to the global IT infrastructure.&quot;<br> </div> Sat, 30 Jan 2021 09:50:08 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844586/ https://lwn.net/Articles/844586/ mjg59 <div class="FormattedComment"> Impact in this case is fortunately low due to the small period of time between the code being released and the bug being found, but the fact that it&#x27;s something that could probably have been picked up with a better test suite and CI that builds with ASAN in the months between the commit landing and the issue being identified is still something to be worried about. Dev practices from the 90s just aren&#x27;t acceptable any more. Security critical code really needs to be doing more.<br> </div> Sat, 30 Jan 2021 09:08:42 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844584/ https://lwn.net/Articles/844584/ karkhaz <p><i>&gt; There is yet no released GnuPG version hich requires Libgcrypt 1.9</i></p> <p><i>&gt; If you are using the 1.8 LTS branch you are not affected. While you are checking anyway please make sure that you have at least 1.8.5.</i></p> <p> However, <a href="https://archlinux.org/packages/core/x86_64/gnupg/">gnupg on Arch Linux</a> did use libgcrypt 1.9.0. The <a href="https://archlinux.org/packages/core/x86_64/libgcrypt/">current Arch Linux libgcrypt package</a> since yesterday is 1.9.1-1, so (strong Greg Kroah-Hartman voice) all users are strongly advised to upgrade. Looking at the <a href="https://github.com/archlinux/svntogit-packages/commits/packages/libgcrypt/trunk/PKGBUILD">history of the libgcrypt PKGBUILD</a>, Arch has been using libgcrypt 1.9.0 since 19 January, and 1.8.7 from 25 October till then. </p> Sat, 30 Jan 2021 07:48:25 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844556/ https://lwn.net/Articles/844556/ flussence <div class="FormattedComment"> Ignoring the ongoing mud-slinging at security researchers the project owner is doing in the background today, it turns out 1.9.1&#x27;s build is broken in certain configurations because they conflate security and feature updates: <a href="https://dev.gnupg.org/T5277">https://dev.gnupg.org/T5277</a><br> </div> Fri, 29 Jan 2021 20:14:23 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844554/ https://lwn.net/Articles/844554/ andy_shev <div class="FormattedComment"> Go ahead, do it!<br> </div> Fri, 29 Jan 2021 19:27:54 +0000 Critical security problem in Libgcrypt 1.9.0 https://lwn.net/Articles/844536/ https://lwn.net/Articles/844536/ tchernobog <div class="FormattedComment"> Considering the amount of recent CVEs (well, recent and old) about buffer overflows, double frees, and out-of-bounds writes, I wonder if some security-critical utilities shouldn&#x27;t rather be written in a language which makes it harder to do these mistakes, such as Rust.<br> </div> Fri, 29 Jan 2021 17:00:14 +0000