7 ms·
OpenSSL Security Advisory – EDIPARTYNAME null pointer de-reference
- Throwaway1771 6y agoGenuinely: why is anyone still using OpenSSL vs LibreSSL?
- inetknght 6y agoBecause OpenSSL is everywhere and everything requires it and all instructions say `do apt-get install libopenssl-dev` or something. Or the setup script does exactly that. And changing that introduces a lot of risk.
- hannob 6y agoLibreSSL has long outlived its purpose. It was started in a situation where OpenSSL had bad security practices, a chaotic coding style and plenty of obsolete garbage. None of that is true any more. If you look at the vuln posted here it's a sign how mature OpenSSL became: They rate it HIGH, but it's a rather insignificant vuln that will barely matter in practice.
- nwmcsween 6y agoThe openssl api is still a painful, compare it with libtls which is much nicer. if I were to use something today I would probably use https://github.com/michaelforney/libtls-bearssl https://github.com/michaelforney/libtls-bearssl which is a wrapper around bearssl that exposes a libtls api.
- agwa 6y agoYou should only use BearSSL when you control the server and the certificate that it uses, since BearSSL's certificate validation implementation is intentionally limited so that it can be more efficient on embedded devices at the cost of being unable to correctly handle all publicly-trusted certificates. See https://medium.com/@sleevi_/path-building-vs-path-verifying-implementation-showdown-39a9272b2820 https://medium.com/@sleevi_/path-building-vs-path-verifying-...
- AndyMcConachie 6y agoDependencies. For example, the Python TLS library of record is based on OpenSSL. OpenSSL is old and supports lots of platforms. Some people need to use OpenSSL because of the platform they're running on. I do hope the situation gets better, and over time we have seen competing TLS libraries replace OpenSSL in more and more places. It's not an easy problem to solve.
- traceroute66 6y agoGenuinely ? Seriously ? You don't have to look far in the man page to see the distinct lack of feature parity. Its been a while since I looked, but IIRC, there's some pretty major stuff missing like PKCS11 which means you can't do the CLI smartcard stuff you can do with OpenSSL.
- da_big_ghey 6y agoOpenSSL is FIPS-certified. It supports everything and its mother. LibreSSL also breaks ABI pretty regularly. Finally, OpenSSL is the standard: no one ever got fired for buying IBM, or for using OpenSSL.
- toast0 6y agoIs FIPS certification a good thing? Does anyone actually run in FIPS mode? I mean, I wouldn't be surprised if it lets you check a box on PCI checklist; but only people who are forced to use that checklist.
- hannob 6y agoFIPS and similar certifications (Common Criteria) have a pretty bad reputation. Plenty of pretty severe crypto vulns that should've been caught by certifications were missed, and more importantly that didn't lead to any critical reflection on the side of the certification bodies. But it's common that if you work with governments that FIPS certification is a requriement.
- kjetijor 6y ago3DES is still an approved security function for FIPS 140-2 :) So yea - great stuff!
- X-Istence 6y agoYes, there are plenty of regulated environments (whether government or commercial) that require FIPS because it means the specified ciphers are all approved and the libraries are to have passed certification. It's a pain in the ass at times because it means things like Ed25519 and ECDSA not over NIST certified curves is not allowed...
- ziml77 6y agoBetter question is why use OpenSSL over the platform's native TLS library? It's incredibly annoying dealing with OpenSSL when MITMing the connection or just working internal services that I don't want to see the insecure connection warnings on.
- Natsu 6y agoYou should make and trust an internal CA to issue certs for those, at least. You just have to add your root to whatever CAfile equivalent the program uses.
- ziml77 6y agoConfiguring the internal CA is exactly the issue here. Programs that use OpenSSL don't respect the Windows cert store. I have a couple environment variables set to point to a PEM file with the cert, but that only helps in a few cases. Sometimes the easiest thing is going the risky route of using a flag to disable to cert check.
- toast0 6y agoUsing a library you control (even if it's fairly bad) instead of the platform TLS library is super useful. Some platforms don't have a TLS library, but TLS is sometimes required. Some platforms have an outdated library and no reasonable update method. Some platforms have nasty bugs in their libraries. Some platforms have very inconsistent libraries depending on version. You might want to send extensions the platform library doesn't support (SNI used to be pretty hard to use), or to manage the acceptable CA roots (which I understand you dislike). You might want more control over ciphers, so as not to offer ciphers that are outdated. Having one buggy library you ship with your code is better than dealing with a different buggy platform library for each platform.
- jesboat 6y agoOn many platforms, OpenSSL is the standard TLS library.
- asveikau 6y agoThere was an OpenBSD erratum about this today, so I think libressl was affected. I do seem to recall a few OpenSSL advisories in the last few years for which libressl was not vulnerable though.
- 1over137 6y agoThis I guess? https://marc.info/?l=openbsd-announce&m=160744667011118&w=2 https://marc.info/?l=openbsd-announce&m=160744667011118&w=2
- mahkoh 6y agoUsing rustls[1] instead of openssl has worked well for me so far. [1] https://github.com/ctz/rustls https://github.com/ctz/rustls
- LeonM 6y agoLooking at the actual commit for this issue: https://github.com/openssl/openssl/commit/f960d81215ebf3f65e03d4d5d857fb9b666d6920 https://github.com/openssl/openssl/commit/f960d81215ebf3f65e... I highly doubt that rust would have prevented this. Rust is not a silver bullet that solves all bugs.
- bfrog 6y agoA segfault? Yes, rust would've probably prevent it.
- TiltMeSenpai 6y agoWhen determining whether a certificate has been revoked, is an Error<T> really more desirable than a segfault? Would you even expect a "is certificate revoked" function to return an Error<T>?
- Natsu 6y ago> Would you even expect a "is certificate revoked" function to return an Error<T>? Depends on how it's doing the check. If it has to fetch the CRL from the CRLdp or do OCSP with the OSCP AIA, like CAPI does, then it definitely has to have an error for when certificate revocation status is not available. Honestly, even if I provide the cert & CRL, it should probably be able to throw an error if either one has invalid ASN.1 encoding or such.
- scolby33 6y agoIn Rust, the signature of the function would be along the lines of `-> Result<whatever, Error>` and you'd have no choice but to handle the Error case of the Result or to panic. Either way, not a segfault.
- cjbprime 6y agoWith the massive increase in fuzzing, especially around core projects like OpenSSL, I'm surprised that there was still a crash reachable from an x509 cert in the x509 parser. Anyone have any insight on why it wasn't found sooner?
- hannob 6y agoit doesn't look like you can find it by fuzzing x509 cert parsing alone, only in certain combinations like by checking a cert against a CRL list. If you created a combined X.509 + CRL parser fuzzer you might have found it. Probably nobody has done that.
- zschuessler 6y agoDoes anyone know how easy it is to execute this attack? I realize it's high severity, but can't accurately say if I should drop everything I'm doing and upgrade all servers, or wait until this evening.. Seems like the most likely attack vector is having a server check a malicious certificate, which happens automatically in some cases. But not always. And it's unclear what prompts the automatic check in the first place - perhaps the server executing a remote HTTPS request a malicious user specifies? Thanks in advance!
- hannob 6y agoIt's a crash only. So it's not gonna compromise your machine, worst case is something not running any more. The conditions are also rather special, it seems the most likely scenario is that you have any software that verifies certificates and automatically checks CRLs and there's a way for an attacker to provide you a bad certificate and a CRL. That's not something that I'd expect to be very common.
- colejohnson66 6y agoAs someone who doesn’t dig much into security fixes, when does a simple crash become exploitable? Because my understanding is that a crash is an indication that something could be exploitable, so how de we know this one isn’t?
- 0x53 6y agoIn this case it appears to be a Null pointer de-reference. That type of bug is almost never exploitable since it almost always just leads to the program immediately terminating. An exploitable bug is one that has some way for the attacker to pivot and use it to do something else. For instance, a buffer overflow might allow an attacker to write some data in memory that could change the execution flow of a program.
- goalieca 6y agoThis kind of bug is only exploitable in the sense that you can deny service.
- rshnotsecure 6y agoOpenSSL has very strange connections with American intelligence and Huawei. They also have an odd British nuclear weapons joke I've noticed. Possible NSA front? [1] - https://blog.12security.com/openssl-expands-partnership-with-huawei/ https://blog.12security.com/openssl-expands-partnership-with... [2] - https://awe.com https://awe.com
- discreditable 6y agoCould the nuke joke just be his site is awe.com and the Atomic Weapons Establishment's site is awe.co.uk?
- mdtancsa 6y agoI am guessing smtp would be the most obvious choice here? checking certs issued by someone else against a CRL you dont necessarily control ?
- gameswithgo 6y agolanguages without null pointers - Zig, Rust, C# 9, F#
- hjek 6y agoand Prolog.
- gameswithgo 6y agonever had a problem picking up a new language. haskell? weird but ok. f#, fine, Rust, fine. lisp? I get it. prolog? no idea what was going on.
- wiredfool 6y agoI'm trying to picture SSL written in Prolog.
- macintux 6y agoYou could always run the original Erlang VM on top of Prolog...your SSL connections would probably take 5 minutes to establish, granted.
- hjek 6y agoI found the Power of Prolog videos[0] easier for me to grasp than, say, The Reasoned Schemer. Prolog is somewhat Lispy in its extensive use of lists. [0]: https://www.metalevel.at/prolog/videos/ https://www.metalevel.at/prolog/videos/
- Arnavion 6y agoRe: C# and especially F#, unfortunately the runtime they run on supports nullable references front-and-center, so even if your code doesn't use nullable references, the standard library and your dependencies will. Of course you can write translation code at the boundaries between your code and the other code to convert `OtherCode.MightBeNullType` to `OtherCode.MightBeNullType option`, but that still doesn't help for `OtherCode.MightBeNullType`'s fields unless you redefine all the types and write conversion functions for all of them.
- skissane 6y agoDoes anyone ever actually use EDIPARTYNAME? Or is it just legacy cruft in X.509 that we pay for through security vulnerabilities like this? It is in obscure, rarely or never used features that vulnerabilities tend to lurk, since bugs in the more commonly used features get discovered and fixed much faster. If hardly anyone is using EDIPARTYNAME, maybe support for it should just be dropped? Reject as invalid every certificate containing it? Release a new streamlined version of X.509 with the legacy cruft removed or deprecated?
- cheschire 6y agoUS Dept of Defense uses it, probably. All their smart card users are issued an EDI number. Probably for inter service data exchange. https://itlaw.wikia.org/wiki/Electronic_Data_Interchange_Personal_Identifier https://itlaw.wikia.org/wiki/Electronic_Data_Interchange_Per...