News for hackers. Stuff that matters.
Re:New TLS Padding Oracles by stingraycharles on Tuesday February 26, 2019 @01:22PM (#19256904)
Are these actually novel vulnerabilities, or just unpatched CBC vulnerabilities? As far as I am aware CBC has been discouraged for a long time precisely because of the padding oracle attacks.
Re:New TLS Padding Oracles by tptacek on Tuesday February 26, 2019 @01:53PM (#19257178)
They're novel instances of a bug class, the same way a new use-after-free in Chrome is a novel bug. This is what makes crypto vuln research so great: the published work deals mostly in bug classes, which can be leveraged against systems ad infinitum.
Re:New TLS Padding Oracles by lol768 on Tuesday February 26, 2019 @01:33PM (#19257001)
>As far as I am aware CBC has been discouraged for a long time precisely because of the padding oracle attacks

My understanding of these padding oracle attacks was that they were the result of an implementation vulnerability that leaked information through error messages about the padding being the cause. Not that the problem was an inherent flaw in CBC itself.

If the server simply used generic error messages when the padding was invalid, there would be no 'oracle' AIUI.

Edit: https://crypto.stanford.edu/~dabo/papers/ssl-timing.pdf

Re:New TLS Padding Oracles by bcaa7f3a8bbc on Tuesday February 26, 2019 @01:35PM (#19257025)
> Not that there was an inherent flaw in CBC itself.

But if history shows it's difficult to implement something without creating vulnerabilities, and there are alternatives which are less prone to mistakes, it should be retired and discouraged to be implemented.

Also, CBC itself is not an actual problem, but CBC in TLS is authenticate-then-encrypt, which is how the vast majority of problems are created.

Re:New TLS Padding Oracles by lol768 on Tuesday February 26, 2019 @01:44PM (#19257116)
>But if history shows it's difficult to implement something without creating vulnerabilities, and there are alternatives which are less prone to mistakes, it should be retired and discouraged to be implemented.

>Also, CBC itself is not an actual problem, but CBC in TLS is authenticate-then-encrypt, which is how the vast majority of problems are created.

Oh definitely, GCM (or another AEAD cipher) is a much better choice - I wouldn't argue in favour of CBC in production TLS cipher suites. I just wanted to comment on the technical details of where padding oracle vulnerabilities actually arise.

Re:New TLS Padding Oracles by blattimwind on Tuesday February 26, 2019 @02:23PM (#19257470)
> Oh definitely, GCM (or another AEAD cipher) is a much better choice

GCM is only a better choice if you have hardware support for it. I'd recommend Chacha20-Poly1305 for anything that might have to cope without hardware support.

Re:New TLS Padding Oracles by olliej on Tuesday February 26, 2019 @01:47PM (#19257135)
CBC has a fundamental weakness in that you can toggle one bit at a time and get a predictable change. Encrypt-then-authenticate would obviously resolve that, but that's trivially broken by breaking SHA1/2 ;)

Of course a problem with encrypt then authenticate is that you can verify the identity of the sender without decrypting the content, which is of course why A then E happened in the first place - the threat model turned out to be incorrect. For messaging platforms I would still lean towards authenticate then encrypt as I think the attack model is different.

Re:New TLS Padding Oracles by tptacek on Tuesday February 26, 2019 @01:58PM (#19257231)
No, this isn't a fundamental weakness of CBC. In fact, CTR is even more susceptible to this problem (a CBC bitflip totally corrupts the block to which it's applied, and creates a predictable change in the subsequent block; a CTR bitflip simply flips the matching decrypted plaintext bit; in that sense CTR is totally and perfectly malleable).

Also: nobody uses SHA1 anymore, SHA1 and SHA2 aren't MACs (you're thinking of HMAC), and even MD5 is still unbroken in HMAC.

Re:New TLS Padding Oracles by olliej on Tuesday February 26, 2019 @01:49PM (#19257153)
One issue (the openssl one I think) wasn't a different error message, but rather the different delay in time to closing the connection. The end result is obviously the same, but it's important to remember that it's not just a matter of returning the same error code, but rather having identical termination characteristics.
Re:New TLS Padding Oracles by olliej on Tuesday February 26, 2019 @01:30PM (#19256975)
That was my exact thought - CBC mode is not secure against a vast array of attacks, and I’m not sure if I want to read an entire paper to determine if there’s anything new/novel in attacking a known weak cipher mode
Re:New TLS Padding Oracles by tptacek on Tuesday February 26, 2019 @01:55PM (#19257197)
No, this isn't true. CBC mode is generally fine. The problem is improperly authenticated CBC. But improperly authenticated CTR is also insecure, and CTR is an essential building block of a whole bunch of modern AEAD schemes, including GCM.

CBC mode is also susceptible to attacks based on predictable IVs. But again, CTR is susceptible to a sort of isomorphic class of bugs related to repeated nonces --- as, of course, is GCM, which you mention before; GCM not only inherits CTR's brittleness with respect to nonces but also fails in spectacular new ways with them.

Arguably, if you're going to have to build your own cryptosystem from primitives (don't do this), you have the best chance of success with random-IV CBC mode and HMAC-SHA2 in an EtM configuration. You're less likely to blow that up than GCM.

The research here is in detecting instances of the well-understood CBC padding oracle flaw. A new measurement technique that surfaced a whole bunch of new instances of heap overflows in server software would be an important contribution, in the same way this is.

Re:New TLS Padding Oracles by weinzierl on Tuesday February 26, 2019 @02:57PM (#19257785)
> You're less likely to blow that up than GCM.

Do you have a pointer where I can read about traps of GCM?

Re:New TLS Padding Oracles by tptacek on Tuesday February 26, 2019 @03:15PM (#19257940)
I don't know the best summary, but the broad strokes are that nonce reuse both destroys confidentiality and allows recovery of authentication keys --- this is an extraordinarily common problem and one attackers can sometimes induce --- as does truncating the GCM MAC, and, if you don't have hardware support for GCM (ie, x64 CLMUL), the table-based version is timable.
Re:New TLS Padding Oracles by olliej on Tuesday February 26, 2019 @01:42PM (#19257088)
Ok, so I did the work of reading/skimming :D

Essentially these are implementation specific bugs resulting in oracles, rather than being attacks on CBC itself - basically openssl and some embedded (?) TLS stacks produce different results (delayed hang up and/or different error codes) for padding vs. MAC failures in CBC mode.

I assume that the joy of CBC mode just makes those oracles easier to directly exploit. The exploits are still harder to use than GCM with a reused nonce (reusing a nonce in GCM mode essentially breaks it. GCM is hard).