LWN: Comments on "Heartbleed bug exposes OpenSSL installations" https://lwn.net/Articles/593809/ This is a special feed containing comments posted to the individual LWN article titled "Heartbleed bug exposes OpenSSL installations". en-us Sat, 08 Nov 2025 10:59:59 +0000 Sat, 08 Nov 2025 10:59:59 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net "all bugs are shallow" https://lwn.net/Articles/595472/ https://lwn.net/Articles/595472/ Wol <div class="FormattedComment"> The other thing about it, as I understand the saying, is that ONCE THE BUG IS FOUND it is quickly dealt with. Bugs are "shallow" in that finding the cause is usually a very swift process.<br> <p> What the saying does not say (or imply) imho, is that the hidden bugs are easily found.<br> <p> Cheers,<br> Wol<br> </div> Fri, 18 Apr 2014 20:28:41 +0000 Heartbleed bug exposes OpenSSL installations https://lwn.net/Articles/594579/ https://lwn.net/Articles/594579/ a9db0 <div class="FormattedComment"> Another really good, simple explanation:<br> <p> <a href="http://xkcd.com/1354/">http://xkcd.com/1354/</a><br> </div> Sun, 13 Apr 2014 00:39:40 +0000 Codenomicon created the logo, and found the bug https://lwn.net/Articles/594481/ https://lwn.net/Articles/594481/ hamjudo <a href="http://Heartbleed.com">heartbleed.com</a> tells us <i>This bug was independently discovered by a team of security engineers (Riku, Antti and Matti) at Codenomicon and Neel Mehta of Google Security, who first reported it to the OpenSSL team.</i> We should not be surprised that the people who found the bug new about it before they notified anyone else.<p> I am only assuming that they created the logo after they found the bug. It is possible, buy highly unlikely, that they made a cool logo, then went looking for a bug to match. Fri, 11 Apr 2014 17:58:02 +0000 OpenBSD hardening vs. OpenSSL https://lwn.net/Articles/594448/ https://lwn.net/Articles/594448/ marcH <div class="FormattedComment"> Google " valgrind openssl " for some more fun.<br> <p> </div> Fri, 11 Apr 2014 12:49:10 +0000 Heartbleed bug exposes OpenSSL installations https://lwn.net/Articles/594447/ https://lwn.net/Articles/594447/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; It seems to me the real root cause of the bug here is having two length fields for the data in the heartbeat packet. </font><br> <p> Indeed.<br> <p> Even if having two length fields in the PACKET can be explained because of some unknown and twisted logic, it cannot make any kind of sense to have the SOFTWARE use sometimes one field and sometimes the other.<br> <p> <font class="QuotedText">&gt; Any time you needlessly duplicate information, you practically guarantee the appearance of a bug involving the two bits of data getting out of sync. It is a common "anti-pattern".</font><br> <p> DRY principle.<br> <p> </div> Fri, 11 Apr 2014 12:48:01 +0000 Heartbleed bug exposes OpenSSL installations https://lwn.net/Articles/594432/ https://lwn.net/Articles/594432/ mbanck <div class="FormattedComment"> "Reminder: the logo designer knew before the Debian, Ubuntu, and RedHat teams." -- <a href="https://twitter.com/jamesgolick/status/453605646114783232">https://twitter.com/jamesgolick/status/453605646114783232</a><br> </div> Fri, 11 Apr 2014 11:44:01 +0000 Heartbleed bug exposes OpenSSL installations https://lwn.net/Articles/594420/ https://lwn.net/Articles/594420/ khim It's not necessarily anti-pattern. It can be a pattern, too (that's why official forms often include duplication), but if you don't compare these duplicated fields and don't reject inconsistent input that yes, in <b>that</b> case it's an anti-pattern. Fri, 11 Apr 2014 09:03:50 +0000 Heartbleed bug exposes OpenSSL installations https://lwn.net/Articles/594405/ https://lwn.net/Articles/594405/ eru It seems to me the real root cause of the bug here is having two length fields for the data in the heartbeat packet. Any time you needlessly duplicate information, you practically guarantee the appearance of a bug involving the two bits of data getting out of sync. It is a common "anti-pattern". Fri, 11 Apr 2014 05:01:37 +0000 Heartbleed bug exposes OpenSSL installations https://lwn.net/Articles/594386/ https://lwn.net/Articles/594386/ ianw <div class="FormattedComment"> "To perform PMTU discovery, HeartbeatRequest messages containing padding can be used as probe packets, as described in [RFC4821]."<br> </div> Thu, 10 Apr 2014 23:40:13 +0000 Heartbleed bug exposes OpenSSL installations https://lwn.net/Articles/594379/ https://lwn.net/Articles/594379/ fandingo <div class="FormattedComment"> I'm really struggling to see why RFC 6520 has such a large payload size (64KiB). Is there any good reason for it? I'm struggling to see why it should be more than ~8B. Obviously, this particular bug would still occur, but at least it would decrease the amount of information leaked (or at least rate). <br> </div> Thu, 10 Apr 2014 22:25:18 +0000 "all bugs are shallow" https://lwn.net/Articles/594323/ https://lwn.net/Articles/594323/ iam.TJ <p>In a perfect world project's would operate Continuous Reviews<sup>&trade;</sup> - think 'Continuous Integration' but testing the ability of reviewers and commiters to identify and reject deliberately bad code - off-by-one, null-pointer return values, use-after-free, over-runs, input sanitisation, and many other common 'fail' templates.</p> Thu, 10 Apr 2014 20:07:16 +0000 OpenBSD hardening vs. OpenSSL https://lwn.net/Articles/594312/ https://lwn.net/Articles/594312/ apoelstra <div class="FormattedComment"> Those links are shocking, especially the second one. But it's hard to follow Ted's analysis — he claims there is a reuse-after-free which has well-defined behaviour since SSL's custom malloc keeps a freelist intact.<br> <p> In the latest SSL git HEAD, the offending free occurs around s3_pkt.c:1333, as opposed to s3_both.c:1059 as claimed in the article. The quoted code is followed immediately by return(n), so it is hard to tell where the "freed" memory is referenced again. This occurs in the function ssl3_read_bytes, which according to grep is only called through macro obfuscation, so to a casual observer the trail runs cold here.<br> <p> According to the article, the offending read occurs at "the next call to ssl3_read_n()", a function which is only called by ssl3_read_bytes() around line 1259 — before the offending free! So it seems to me that if Ted's analysis is correct, there must be a repeated call to ssl3_read_bytes() somewhere, and because of the macro obfuscation I can't tell where. :(<br> <p> Many eyes make all bugs shallow, indeed.<br> </div> Thu, 10 Apr 2014 17:40:53 +0000 OpenBSD hardening vs. OpenSSL https://lwn.net/Articles/594288/ https://lwn.net/Articles/594288/ yokem_55 <div class="FormattedComment"> I'm surprised Theo's missive on this wasn't included in the security Quotes of the week. Ted Unangst also has a couple of good posts on OpenSSL's custom memory allocator that was masking heartbeat bug -<br> <a href="http://www.tedunangst.com/flak/post/heartbleed-vs-mallocconf">http://www.tedunangst.com/flak/post/heartbleed-vs-mallocconf</a><br> <a href="http://www.tedunangst.com/flak/post/analysis-of-openssl-freelist-reuse">http://www.tedunangst.com/flak/post/analysis-of-openssl-f...</a><br> </div> Thu, 10 Apr 2014 15:26:41 +0000 "all bugs are shallow" https://lwn.net/Articles/594251/ https://lwn.net/Articles/594251/ dag- <div class="FormattedComment"> A valid point and there is definitely some responsibility with the various Enterprise distributions and vendors of Linux devices that ship this sensitive code. I am sure the awareness and responsibilities will be discussed within those organisations after the fallout to partake in their due diligence.<br> <p> But coming back to the original statement from the subject "given enough eyeballs, all bugs are shallow". That statement still holds true. Even though during incidents like this one the validity is being questioned (often by opponents with self-interests).<br> <p> The statement doesn't say "in open source all bugs are shallow", instead it indicates that there is a certain quantity of "eyeballs" needed. And the fact is that with Open Source, that quantity can be quite large indeed, but it does not guarantee that a sufficient number is reached ;-) Unlike proprietary software where users have no way of doing a security audit which is an exclusive of the vendor, at least in Open Source it is possible. (But apparently not done sufficiently well)<br> <p> So one of the great strengths (read: freedoms) of Open Source was not used to its own benefit and that is unfortunate. How can we (industry, users) improve the process to avoid this ?<br> </div> Thu, 10 Apr 2014 13:25:13 +0000 OpenBSD hardening vs. OpenSSL https://lwn.net/Articles/594192/ https://lwn.net/Articles/594192/ ptman <div class="FormattedComment"> <a href="http://thread.gmane.org/gmane.os.openbsd.misc/211952/focus=211963">http://thread.gmane.org/gmane.os.openbsd.misc/211952/focu...</a><br> </div> Thu, 10 Apr 2014 06:51:52 +0000 "all bugs are shallow" https://lwn.net/Articles/594185/ https://lwn.net/Articles/594185/ iam.TJ <div class="FormattedComment"> I'd like to side-step the arguments over C-language allowing buffer overrun here to focus on how this code was reviewed, since the "anyone can read the source code" argument is often raised and here it has spectacularly failed.<br> <p> In this case Robin Seggelmann co-authored RFC6520 [1] (with Michael Tuexen and Michael Williams) "Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) Heartbeat Extension".<br> <p> He also submitted the OpenSSL patches to add TLS Heartbeat to the openssl-dev mailing list [2] at 2011-12-15 20:04:58 and received only one review response (from Dr Stephen Henson).<br> <p> After several code tidies the patches were committed [3] by Dr Stephen Henson at 2011-12-31 22:59:57.<br> <p> Dr Stephen Henson, a core developer of OpenSSL since 1999 [4], was the "eyes" - the reviewer and committer. As such he, more than anyone, should be aware of the gotchyas of writing bullet-proof security code, and especially aware of input sanitisation and where it would be required.<br> <p> I used the original mailing-list patch submission as the basis for a memory-safe review and found the bug was glaringly obvious - the variable "payload" is read from the network using n2s() - network-to-signed macro - and is then immediately used as a component of 'size' in OPENSSL_malloc() and again in the following memcpy() from the received packet to the outgoing packet.<br> <p> There is no obfuscation via macros or indirection.<br> <p> If this class of bug can get through the 'review process' so easily it is a worrying statement about the code-quality of a critical security library, especially given how many sensitive and valuable services rely upon it.<br> <p> I suggest it serves as a reminder to us all to give a little more time collectively to reviewing proposed patches in our favourite projects and posting responses *before* the patches are committed and subsequently forgotten until they bite.<br> <p> <p> [1] <a href="https://tools.ietf.org/html/rfc6520">https://tools.ietf.org/html/rfc6520</a><br> [2] <a href="http://marc.info/?t=132397969800002&amp;r=1&amp;w=2">http://marc.info/?t=132397969800002&amp;r=1&amp;w=2</a><br> [3] <a href="http://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=4817504d069b4c5082161b02a22116ad75f822b1">http://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=4...</a><br> [4] <a href="http://www.drh-consultancy.demon.co.uk/openssl-contrib.html">http://www.drh-consultancy.demon.co.uk/openssl-contrib.html</a><br> </div> Thu, 10 Apr 2014 05:54:39 +0000