Use after free bug in OpenSSL
ftp.openbsd.org
ftp.openbsd.org
This is supposed to be how open-source works; it's unfortunate that it had to take a huge vulnerability to cause this motivation.
The fact of the matter is the OpenSSL people simply did not care about writing good code, and the open source community as a whole was happy to assign their most critical security features to a library widely known to be confusing and terrible and not even remotely properly analyzed or tested.
Like most people, I see Heartbleed as a process failure; unlike most people, I think the process failure goes far beyond TLS or OpenSSL or C.
Sure, but open source developers have no obligation whatsoever to anyone. Considering they're not being paid in any way for their code, they can write whatever code they want and under whatever process they like. The problem IMHO is that OpenSSL was used for highly sensitive commercial uses (like Gmail, Amazon and others); I think responsibility should fall on companies who used the library without checking it first (Disclaimer: I'm not in anyway associated with OpenSSL or any crypto library, this is just how I see things).
Agreed. The OpenSSL license (as do many others), has this very clear (if somewhat hard-to-read) disclaimer in it:
"IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
I don't like the 'amateur defense' of open source. No, people are not legally liable for code; no, no open-source dev has any obligation to write good code; but OpenSSL is still garbage. As long as you're writing code and using other peoples' code, you might as well care about craftsmanship. If you don't care about craftsmanship, maybe this is the wrong approach to a critical security library.
What? Come on. Get a grip on reality. The code is some of the most efficient and widely used. I think it's also the only code that implements the entire spec.
It's like those commenting "that skyscraper is garbage" by someone who doesn't even know what you'd need to build a skyscraper, let alone actually tried to build one.
It's nothing like that at all. A piece of code's popularity is no evidence of its quality. Otherwise we'd never have advanced beyond BASIC.
Implementing an entire spec is nothing to be proud of. Specs are often over-engineered. This is almost certainly the case for TLS. It's 103 pages long: http://tools.ietf.org/html/rfc5246
We should be questioning the foundations we've been relying on until now when a single vulnerability was able to compromise most of the internet, possibly since 2011.
Efficient, yes. Throughput in general is not a problem.
Widely used, well... yes to that too. Although in this regard I would attributed a good chunk of it to inertia. When (common) use of cryptography started to take off around the time of the browser wars, there weren't too many options around. Web servers needed a way to serve protected content, and there was OpenSSL.
Not just available, but already supported by language bindings and relatively easy to set up thanks to mod_ssl.
First mover advantage + network effects + the fact that getting crypto right is really hard. If you wanted to unseat OpenSSL, you would need to overcome the fact that despite all the bad rap and the butt-ugly, and the leaky API, it was still getting the most exposure and field testing. Unlike some newcomer library, OpenSSL has the advantage that it is firmly embedded in the software ecosystem, and it has benefited from more than a decade of bugfixes. (I still remember when the timing attack for extracting RSA keys was discovered. The bug was pretty much everywhere, and not just in OpenSSL.)
The widespread use of the library boils down to a simple and womewhat depressing fact: OpenSSL is used everywhere because OpenSSL is used everywhere.
Replacing it with something better will be a long uphill battle. Any newcomer would need an aggressive test suite which covered EVERY known implementation bug. And a sane API. And a project with the political savvy to succesfully lobby for its use through all avenues.
I think OpenSSL is better than I could do or most people could do, but again, it's still at the mercy of C AND a wide range of TLS and other features that seem to multiply like rabbits.
I think we really need a much, much simpler TLS standard going forward.
But I am a half decent C programmer and I saw the code that included the heartbleed bug. This bug wasn't caused by a subtle issue. It wasn't even a logical error that a competent person could easily make in a confused moment. This was pure negligence, and negligence is rarely isolated in one part of a codebase.
I certainly wouldn't want to see corporate devs at my bank implement some custom "secure" http communications protocol.
What we need is two or three well funded TLS/SSL implementations competing with each other, kind of like we have a handful of competing web browser implementations or C++ compiler implementations or operating systems, all done by experts in their field.
I don't know PolarSSL. If it's a reasonably complete implementation then maybe it deserves more attention.
The problem with Telegram wasn't about code, it was about algorithms and design. They designed their own crypto, which is a really bad thing. If they had written their own implementations of well-known, tested and proven crypto primitives/algorithms, everything would have been fine (well, mostly; you can still implement a good algorithm badly, but that's not what happened).
They might already make a lot of contributions that I don't know about.
If the hobbyist knows that the code may be used in a critical environment then the hobbyist should withdraw the code or make it very clear its suitability for some task has not been tested. It is rather like asking someone for directions and the person misleads you on the basis that you are not paying him for directions.
Ethics always apply whether you are being paid or not.
It's already made very clear in the license that the code hasn't been tested, and comes with no guarantees. How much clearer than that can it be?
Also, you can't really withdraw code from the Internet. Even if you take down the original repository, there may be dozens of forks.
There are very few "professional software engineers" in the USA. Only a few schools, such as UIUC, have such a program.
Software engineer and software architect are meaningless terms. They are self applied yet imply some sort of parity with engineering or architecture. Insert your favorite "if x were built in the same way as software" joke here.
I think it's worth noting that uses can be highly sensitive without being commercial (or governmental). Not that this takes away from your point, which I agree with in broad strokes - responsibility lies first with those deploying; they are the only ones that have access to the full picture.
What do I need to do to get people into position to clean up TLS?
Look at how many draft feature proposals there are.
https://tools.ietf.org/wg/tls/
Where are the proposals for deprecations for killing off features?
There will need to be many rounds of small incremental improvements. Who could propose these steps? Who can lead the process, how could contributions be vetted? This is a huge challenge, but unless people start thinking about it and proposals are made, it just won't happen and nothing will change. Just thinking about setting up such a projects boggles the mind, which would like nothing better than to go back to bikeshedding.
I get that part of this is a community problem, etc, but a lack of the above on a security product is amazing
According to the planning doc linked earlier this week, it might take some time to get openssl into chrome. The Plan is for it to occur over 4 "milestones". I'm not sure how long each milestone will take, but suffice it to say, it's not "now".
And it was the other way around. Only Chromium Android used OpenSSL. Everywhere else it used NSS (linux, mac desktop, windows)
Quote from https://docs.google.com/document/d/1ML11ZyyMpnAr6clIAwWrXD53...
"Currently, Chromium supports two different SSL/cryptographic backends. On Windows, OS X, iOS, Linux, and Chromium OS, Chromium uses NSS. On Android, Chromium uses OpenSSL. "
Please check your sources carefully and don't write unfactual information. Especially in the realm of crypto it's important to get the details right.
It would be even better if you edited your post so future readers don't have to read my post at all in order to get the correct information.
'k, certainly forking is better than letting poor quality persist, and it may be better than reimplementing from scratch. I just don't like resorting to it when unnecessary.
"Also, if their standard for quality is what it is, it might be hard for another project to start changing things."
Possibly, though their "standard for quality" is probably at least a little malleable (particularly right now).
I'd rather see a fork, honestly, to see more competent and disciplined standards and leadership, though that's a personal opinion. If the current project leaders stepped down and handed it off to people actually able to handle such an important software project, that'd be great, but I can't imagine it based on their past behavior.
edit: precesion: libssl has seen a set of large commits, in the past 48 hours, and other libcrypto related changes.
This was discovered in the course of someone's attempt to figure out why OpenSSL randomly drops connections when its using a sane/OS supplied allocator.
Heartbleed is reading too far, this is not that.
Another!
Wikipedia has a pretty good list of possible implementations:
http://en.wikipedia.org/wiki/Comparison_of_TLS_Implementatio...
cd /usr/src; patch -p0 </path/008_openssl.patch
?