12 ms·
OpenBSD disables Heartbeat in libssl, questions IETF
- necubi 13y agoI was confused what RFC 520 ("A Proposed File Access Protocol Specification") had to do with any of this. It looks like Theo meant to refer to RFC 6520: https://tools.ietf.org/html/rfc6520 https://tools.ietf.org/html/rfc6520.
- coverband 13y agoThanks, I was going crazy trying to figure out the connection!
- Workaphobia 13y agoWhat does that have to do with this vulnerability? The problem was a missing bounds check in the implementation. It's not as though they suspect heartbeats are inherently insecure, right?
- tptacek 13y agoThere are smart people working in the TLS WG, but there are also people there that shouldn't be governing the development of the Internet's most important encrypted transport. More importantly, the working group appears to be geared towards saying "yes" to new features, when exactly the opposite posture is needed. The Heartbeat feature is just the most obvious example, because its reference implementation was so slapdash. The weirder thing here is that it would even be controversial or newsworthy to disable TCP TLS heartbeats, a feature nobody needs or really ever asked for. Why was it enabled by default in the first place? What sense did that decision ever make?
- rubiquity 13y ago> The weirder thing here is that it would even be controversial or newsworthy to disable TCP TLS heartbeats, a feature nobody needs or really ever asked for. Why was it enabled by default in the first place? What sense did that decision ever make? You're essentially asking the same exact question Theo de Raadt is asking, hence his extreme suspicion of IETF.
- tptacek 13y agoI know, I'm agreeing with him.
- x0x0 13y agoso -- would it be reasonable to create a minimal implementation of ssl focused on web browsers and web servers? How much work is it to create such a minimal implementation that is reasonably performant, written by competent devs, well tested, fuzzed, etc? Just because random shit gets thrown into the protocol that doesn't mean it needs to be implemented in my copy of chrome or nginx...
- mwcampbell 13y agoOpenSSL itself is highly configurable, so I think it would be better to pare it down to a minimal build that is both secure and compatible with all widely deployed TLS implementations.
- x0x0 13y agoime, it's much harder to write, understand, test, and debug #include soup
- midas007 13y agoNot really. There are only a handful of features that are necessary. Furthermore, JEOS-like minimal systems should only enable features that are absolutely necessary. Minimalism means a smaller attack surface.
- midas007 13y agoI do this already on OSX, and even submitted a patch to allow Ruby to run without OpenSSL engine support. [0] How I compile OpenSSL. [1] [0] https://bugs.ruby-lang.org/issues/9714 https://bugs.ruby-lang.org/issues/9714 [1] ( export CONFIGURE_OPTS='no-hw no-rdrand no-sctp no-md4 no-mdc2 no-rc4 no-fips no-engine' \ brew install https://gist.github.com/steakknife/8228264/raw/openssl.rb )
- mwcampbell 13y agoThat looks like a good start, but can we drop even more? DES? Camellia? IDEA? MD5?
- ecma 13y agoWould you please link to this supposedly slapdash reference implementation? Taking RFC6520 at face value, it seems fairly reasonable and not out of line with other existing heartbeat protocols. I've not read as much as I would like on the IETF's involvement in this but as I read the situation, Theo has just hurled vitriol at them for specifying a completely reasonable feature that the openSSL team implemented incredibly poorly.
- pygy_ 13y agoThe reference implementation is the code that ended up in OpenSSL. It was actully included in OpenSSL before the RFC was published. Both the RFC and the code were written by the same person (who denies planting the bug intentionally).
- ecma 13y agoWas that code ever actually sanctioned by the IETF and included in their resources though? SSL had SSLREF but I've never seen (and didn't find anything just now) a similar thing for TLS.
- tptacek 13y agoIt's not a completely reasonable feature. It's a feature that had a sensible use case in DTLS (datagram TLS, TLS not run over TCP). It's unclear as to whether the use case was best addressed at the TLS layer, whether it could have been specified as something run alongside TLS, or whether it was something that applications that cared about path MTU could have handled for themselves. The TLS WG actively discussed whether Heartbeat had reasonable use cases in TCP TLS. Some people agreed, some disagreed. Nobody threatened a temper tantrum if the feature was added to TCP TLS. Therefore: the extension was specified for both TCP TLS --- which does not need extra path MTU discovery, and which already has a (somewhat crappy) keepalive feature --- and DTLS. The larger problem is in treating TLS like a grab-bag of features for corner-case applications.
- ecma 13y agoOkay, I definitely agree regarding crufty specs. The decision to include heartbeats could easily have left left it as a variant feature rather than core spec. I still don't agree with the OpenSSL implementation being reference spec if you were refering to that as pygy_ pointed out. Unless the IETF released that code as an institution, I would consider it the same as any other 3rd party implementation - ie. not necessarily correct. How am I to know that the RFCs author wrote it unless I go digging? Why should I trust anything they wrote which may or may not have gone through any rigorous checking? This isn't so much directed at you, tptacek (since your pedigree is well known), as it is the others bashing the IETF for implementation flaws - bash them for what they actually did and perhaps instead of getting angsty at the powers that be, try getting involved in projects like this if you believe they are so important.
- nly 13y agoPresumably people want TLS heartbeats for TCP because, by default, on Linux, TCP keep alive doesn't kick in until the connection has been idle for 2 hours. Why write a call to setsocketopt() when we can just reinvent new features?
- tptacek 13y agoIt's worse than that. Keepalives are only really useful for (a) long-lived connections that (b) are expensive (usually: requiring manual intervention or renumbering) to reestablish. Those parameters describe no connection made by browsers. In other words: application-layer keepalives are only valuable to applications that already have the freedom to define their own truly application-layer keepalive anyways.
- general_failure 13y agoAren't websockets ping/pong messages similar?
- tptacek 13y agoWebsockets messages are happening two layers up from TLS.
- eternalban 13y agoAnd that still leaves the question of why spec a payload (much less 64k "for flexibility") in a TCP heartbeat exchange.
- tptacek 13y agoBecause it's the same heartbeat message used for DTLS, where the heartbeat and padding allows for variable-length probes with request and response having varying size.
- eternalban 13y ago
- midas007 13y agoTLS is the zombie emperor of design-by-committee feature creep.
- drewcrawford 13y agoI have read all the TLS WG discussions I can find on this RFC. The picture that emerges for me is that of an inherent, institutional failure in the nature of working groups. As far as I can tell, there was only one person that raised the "we don't need this" objection (Nikos Mavrogiannopoulos, GnuTLS principal author). He asked for a defense of the feature on three occasions [0] [1], and received a response twice, both responses from the same person. There was no further discussion, so either his objection was addressed or he felt further discussion would be unproductive. I would be interested to know which. GnuTLS does ship with heartbeat disabled, so it's possible Nikos continued to express skepticism about the feature. However this document was eyeballed by many security experts, who I will not name and shame here, who proofread or made comments or edits to the document, without objecting to the general premise. It seems to me that, inherent in the nature of a working group, the specific parties who are in favor of the feature will always be better represented than the interests of a wider audience that faces the nonspecific harm that the feature might be implemented poorly and introduce a security vulnerability. Sort of a reverse-NIMBY situation if you like. The software community cannot mobilize to combat every new TLS proposal on the grounds of nonspecific harm, but everybody with a pet feature can mobilize to make sure it is standardized. [0] http://ietf.10.n7.nabble.com/tsv-dir-review-of-draft-ietf-tls-dtls-heartbeat-01-td247549.html http://ietf.10.n7.nabble.com/tsv-dir-review-of-draft-ietf-tl... [1] http://ietf.10.n7.nabble.com/Working-group-last-call-for-draft-ietf-tls-dtls-heartbeat-02-td243038.html http://ietf.10.n7.nabble.com/Working-group-last-call-for-dra...
- tptacek 13y agoBear in mind, the feature itself isn't insecure. The experts who OK'd the feature failed to police an unstated and controversial norm for the group (that it should default to "no" answers). It's hard to fault people for that. I agree: the problem is the IETF process.
- minopret 13y agoIs it that debate (even as devil's advocate) is structurally limited when participants self-select for willingness to act? That dynamic reminds me of the bias labeled "sympathetic point of view" as described in the essay "Why Wikipedia is not so great": "Articles tend to be whatever-centric. People point out whatever is exceptional about their home province, tiny town or bizarre hobby, without noting frankly that their home province is completely unremarkable, their tiny town is not really all that special or that their bizarre hobby is, in fact, bizarre. In other words, articles tend to a sympathetic point of view on all obscure topics or places." That is surely not how we want decisions made about TLS.
- ctz 13y agoThis patch is setting OPENSSL_NO_HEARTBEAT, but openssl actually only disables heartbeats when you set OPENSSL_NO_HEARTBEATS (note trailing S). Someone should make a thing which does sentiment analysis on commit messages, and flags vitriolic or angry commits as possibly containing more typos than usual.
- 0x0 13y agoThat's almost too funny. Edit: Does that last "ok" line mean that two other committers reviewed and OK'ed this patch as well? Three openbsd committers approved a one-line change that didn't fix a single thing? (And people wonder how the OpenSSL bug could live on for two years =) )
- emaste 13y agoThe typo was fixed a little while later: http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/ssl/Makefile.diff?r1=1.29;r2=1.30;f=h http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/ssl/Mak...
- opendais 13y agoIt is but we should have a dose of humility in mocking them since many, many people [including everyone on this site that is a dev] make stupid mistakes from time to time. Such is the nature of the profession. None of us commit perfect code the first time, every time.
- 0x0 13y agoExactly. I'll just leave this here. http://article.gmane.org/gmane.os.openbsd.misc/211963 http://article.gmane.org/gmane.os.openbsd.misc/211963
- IgorPartola 13y agoWha-what? That's pretty crazy. At the very least, if OpenSSL goes through this trouble, why doesn't it just implement its own malloc and friends that are both fast and secure? In fact, shouldn't it include something like scurb_and_free() so that sensitive bits would actually be erased when not needed. That seems like a much better solution than the approach described in this link.
- higherpurpose 13y agoI stopped trusting IETF since this: http://arstechnica.com/security/2014/01/nsa-employee-will-continue-to-co-chair-influential-crypto-standards-group/ http://arstechnica.com/security/2014/01/nsa-employee-will-co... When after all the Snowden and RSA revelations they're not willing to get rid of the putrid influence of NSA inside of IETF, well then...not much trust left there.
- mcosta 13y agoIs the IETF the implementors of OpenSSL? If not, this is pure crazy. The heartbeat feature seems useful to me. I mean, keep alive at TCP level leaks information. Even when this information is that there is no transmission. Transmitting a heartbeat tells the other side is alive and is not distinguishable from normal traffic to a passive attacker.
- anaphor 13y agothe IETF stands for Internet Engineering Task Force. They are the people who design protocols that run the internet. Note however that you don't necessarily have to listen to them, it's more like a defacto standard. Also they have nothing to do with implementing them necessarily.
- sp332 13y agoHeartbeats are used for UDP and other connectionless protocols. TCP doesn't need heartbeats to tell if the connection went down.
- 0x0 13y agoI think it can be useful when the TCP connection is going through NAT which may drop the rule and stop passing packets after idling, no?
- mschuster91 13y agoYep, crappy routers tend to do this :/
- jethro_tell 13y agoMaybe OT, but are the OpenSSL project and OpenBSD project related in any way? For some reason I was thinking it was like the OpenSSH project.
- protomyth 13y agoThey are not related except in the fact that OpenSSH uses OpenSSL code.
- anaphor 13y agoNo, they're not. OpenSSL just shares the same naming convention with OpenBSD and OpenSSH (which IS developed by the same people that do OpenBSD).
- rubiquity 13y agoNo, they aren't related at all. OpenSSH is everyone's poster child for a good, open implementation of a security protocol.
- SixSigma 13y agoFor some values of "everyone" Rob Pike Responds - Slashdot 18 Oct 2004 ... ... but when ssh is the foundation of your security architecture, you know things aren't working as they should http://slashdot.org/story/50858 http://slashdot.org/story/50858
- scott_karana 13y agoI don't think he was impugning SSH's security record at all: just the perceived abuse of the protocol. The entire quote, in context: 10) Biggest problem with Unix - by akaina Recently on the Google Labs Aptitude Test there was a question: "What's broken with Unix? How would you fix it?" What would you have put? Pike: Ken Thompson and I started Plan 9 as an answer to that question. The major things we saw wrong with Unix when we started talking about what would become Plan 9, back around 1985, all stemmed from the appearance of a network. As a stand-alone system, Unix was pretty good. But when you networked Unix machines together, you got a network of stand-alone systems instead of a seamless, integrated networked system. Instead of one big file system, one user community, one secure setup uniting your network of machines, you had a hodgepodge of workarounds to Unix's fundamental design decision that each machine is self-sufficient. Nothing's really changed today. The workarounds have become smoother and some of the things we can do with networks of Unix machines are pretty impressive, but when ssh is the foundation of your security architecture, you know things aren't working as they should.
- robobro 13y agoSharp guy.
- bcoates 13y agoThis strikes me as 100% backwards, isn't the entire point of the IETF RFC process to memorialize existing practice, not be a design studio for new protocols? Wasn't it followed here (RFC6520 existing to document the OpenSSL implementation of heartbeat)? If the IETF is the only thing standing between us and any jackass introducing vulnerabilities into everyone's network stack we're in bigger trouble than I thought.
- ahomescu1 13y agoRFC stands for "Request For Comments", which I always thought meant new stuff up for peer review. Wikipedia also describes them as: An RFC is authored by engineers and computer scientists in the form of a memorandum describing methods, behaviours, research, or innovations applicable to the working of the Internet and Internet-connected systems. It is submitted either for peer review or simply to convey new concepts, information, or (occasionally) engineering humour. The IETF adopts some of the proposals published as RFCs as Internet standards.
- TheMagicHorsey 13y agoWhy does a heartbeat acknowledgement need a variable sized payload embedded in the reply? Can someone explain this in a way that is accessible to a programmer without much security experience. Thanks!
- pwg 13y ago1) You send a heartbeat at time t0; 2) You wait until time t1; 3) You send another heartbeat at time t2; 4) You receive a heartbeat reply at time t3; Was your t3 receipt the result of your t0 heartbeat, or your t2 heartbeat? That is the purpose of the payload, to distinguish which reply matches with which transmission. Now, why variable sized with a max of 64k vs. say an 8-byte integer? The variable sized with max of 64k was most likely intended to support the second purpose in the RFC, path MTU discovery. To discover the path MTU, you need to be able to send a "too big packet", as well as adjust the packet size until you find the proper MTU value. [edit, formatting]
- TheMagicHorsey 13y agoI understand needing a unique identifier to distinguish between heartbeats ... but why conflate the heartbeat with Path MTU, which is an orthogonal process. Is it really that much less efficient to do Path MTU with a different message/system/module? Why absorb this function into the OpenSSL pacakge? I feel I am still missing something about the way this system works. Perhaps I just need to educate myself more on security and networking.
- antocv 13y agoYou're correct, it is a case of Not Invented Here syndrome. To discover MTU you could ping, or send packets on port 80 or any other myriad of ways, but no, its not exactly within ssl so...
- pwg 13y ago> I understand needing a unique identifier to distinguish between heartbeats ... but why conflate the heartbeat with Path MTU, which is an orthogonal process. The only people who can accurately answer that are the author of the RFC/code, and the TLS committee members who discussed the changes. From a security standpoint, it is more dangerous to commingle the two, because a bug in one side (path MTU) will also effect the other half (heartbeat). And that is exactly what happened. > Why absorb this function into the OpenSSL pacakge? Unknown. Path MTU discovery is supposed to be handled at a low layer in the OSI network stack abstraction (closer to the physical hardware) such that higher level layers/apps should not need to care. Putting it into TLS the protocol is a blatant layering violation.
- codewiz 13y agoOh, and they're using CVS because it's so secure!
- colinbartlett 13y agoCVS is still in use by anyone?
- taylorbuley 13y agoFeigned surprise! I read about this today!
- colinbartlett 13y agoCertainly wasn't feigned, though I understand your reference. Absolutely no offense meant. I'm genuinely surprised. Just as I would also be surprised if Windows 3.1 or magnetic tapes or punch cards were still in use. I thought these technologies were supplanted long ago.
- kjs3 13y agoCVS is in use many places, especially in decades old source trees where migration would result in the loss of to much metadata or to much build automation is dependent on CVS. I personally know of several instances of this. Windows 3.1? I run into it occasionally in places like manufacturing where upgrade cycles are decades long (was recently at a client who's most critical machine was built in 1905). FWIW, DOS can still be found everywhere. Magnetic tape? Really? LTO-6 is up to 2.5TB uncompressed and LTO-7 is imminent. Punch cards? See: Scantron. Just because there's a cool new replacement for something, doesn't mean you should jump on it, or that the old tech is now worthless.
- meshko 13y agoIs there any argument in defense of the TLS heartbeat extension? It seems completely inappropriate thing to stick into TLS (wrong level of abstraction), and the idea of sending any kind of payload as part of heartbeat seems completely redundant (what does this achieve over just basic fields "this is heartbeen #17" -- "this is response to heartbeat #17"?
- meetavc 13y agoHow can we get developers to keep it simple, and stop introducing new "features"? [This applies to OPENSSL as well as most software out there that has a new "release" all the time]
- hf 13y agoThe commit message contains a rather succinct, albeit drastic description-cum-definition of Heartbleed: > [A] 64K Covert Channel in a critical protocol.