High-severity bug in OpenSSL allows attackers to decrypt HTTPS traffic

Status
Not open for further replies.

Elgonn

Wise, Aged Ars Veteran
122
"The time it took OpenSSL maintainers to fix the flaw is impressive. Sanso said he reported the bug on January 12. That means it took just over two weeks for the maintainers to complete and distribute a fix."

This is not impressive. Perhaps surprisingly quicker than past responses. But that is still very slow.
 
Upvote
-11 (0 / -11)
[url=http:/civis/viewtopic.php?p=30545125#p30545125:13kc1bl6 said:
Elgonn[/url]":13kc1bl6]
"The time it took OpenSSL maintainers to fix the flaw is impressive. Sanso said he reported the bug on January 12. That means it took just over two weeks for the maintainers to complete and distribute a fix."

This is not impressive. Perhaps surprisingly quicker than past responses. But that is still very slow.

What is your baseline for comparison?
 
Upvote
6 (6 / 0)

Elgonn

Wise, Aged Ars Veteran
122
[url=http:/civis/viewtopic.php?p=30545141#p30545141:34ssxx6d said:
Modern Major General Thanatos[/url]":34ssxx6d]
[url=http:/civis/viewtopic.php?p=30545125#p30545125:34ssxx6d said:
Elgonn[/url]":34ssxx6d]
"The time it took OpenSSL maintainers to fix the flaw is impressive. Sanso said he reported the bug on January 12. That means it took just over two weeks for the maintainers to complete and distribute a fix."

This is not impressive. Perhaps surprisingly quicker than past responses. But that is still very slow.

What is your baseline for comparison?

Being a programmer? Noting that the entire fix is essentially removing a single if! The commit is larger but the fix was even identified by the person who found the bug in the first place.

Invoking hyperbole: 16 days to remove this line after being shown where the problem is?

- if (!(ctx->options & SSL_OP_SINGLE_DH_USE)) {

/Yes the above is hyperbole. But the changes are very minor and don't spiderweb throughout the codebase.
 
Upvote
-1 (4 / -5)

kroeckx

Seniorius Lurkius
3
The article is a little misleading. The problem is when there are small subgroups. One way to generate those is using dhparam's -dsaparam option.

You're only affected when the DH parameters you generated where using non-default options _and_ you use them with an application that reuses the key. The first part is very unlikely, the 2nd depends on the application and most seem to be unaffected.
 
Upvote
2 (2 / 0)

luiscubal

Seniorius Lurkius
19
[url=http:/civis/viewtopic.php?p=30544771#p30544771:1x8hzlig said:
tshort[/url]":1x8hzlig]The TLS protocol is complex. OpenSSL is complex because it supports almost everything in TLS (and SSLv3 and SSLv2...).

But what I've heard is that there's a very large amount of code, openssl often re-implements functionality that should be provided by os or library calls, as well as other stylistic shortcomings which make it hard to properly figure out what the code is *supposed* to do, let alone actually does.

What I've seen (since I work on OpenSSL for my employer) is the "re-implementation" is for security.

For instance, memcmp() can leak information based on how long it takes to determine equality. A cryptographic safe version will always take the same amount of time to do the compare for n bytes. Normal operating system/compiler versions of memcmp() exit early, once inequality is known, for performance reasons.

That is a legitimate case, but I remember reading that OpenSSL also reimplemented stuff like malloc/free in a way that actually made code less secure.
 
Upvote
4 (4 / 0)

foxyshadis

Ars Praefectus
5,089
Subscriptor
[url=http:/civis/viewtopic.php?p=30544223#p30544223:23dec8y0 said:
Modern Major General Thanatos[/url]":23dec8y0]
[url=http:/civis/viewtopic.php?p=30544103#p30544103:23dec8y0 said:
psd[/url]":23dec8y0]Can we now admit that open source does not ensure secure code? Let's just not make that argument anymore in light of empirical evidence.

Can we admit now that this question is a red herring?

The issue is with accountability. OSS means you can see for yourself what is happening. Closed source means you are subject to the whim of the devs or hackers when it comes to finding out what is happening under the hood.
It's not a "red herring" because for at least a decade it was promoted as the primary reason to use open over closed source (particularly Microsoft), and even today is occasionally brought up by someone who wants to willfully ignore all the open-source exploits in the last few years. Most people have moved on to other actual advantages, but the advantage of having the source to find bugs is a bit oversold too; plenty of people can and do find bugs in closed-source software, either by fuzzing inputs until something interesting happens, or understanding machine language as well as they do C/C++. (Which makes any program "open source" to them.)

The biggest advantage is that anyone who does find or learn of a bug can relatively easily fix and rebuild it... but a glance at any open source software's bug tracker will see many bugs that are years old and never fixed, by the public or the maintainers, let alone redistributed that way. Sometimes it's skill, sometimes it's just internal politics. I use tons of open source software every day, but it all depends on strong, capable leadership to be any better than closed source. I see far too many with a near-religious fervor that it's some kind of instant panacea. (Something OpenSSL lacked for many years.)
 
Upvote
7 (10 / -3)
Being a programmer? Noting that the entire fix is essentially removing a single if! The commit is larger but the fix was even identified by the person who found the bug in the first place.

Invoking hyperbole: 16 days to remove this line after being shown where the problem is?

- if (!(ctx->options & SSL_OP_SINGLE_DH_USE)) {

/Yes the above is hyperbole. But the changes are very minor and don't spiderweb throughout the codebase.

So, really the question is, was that the correct fix? In effect, they have enabled SSL_OP_SINGLE_DH_USE for all connections. This is a significant change in behavior, and impacts performance as new DHE keys are generated for every single connection (which is a good thing in terms of CVE-2015-4000/LOGJAM) using appropriate cipher suites. Previously a DHE key could be reused for a period of time; which improves performance, at the cost of some security (the bigger the DHE key, the greater performance gain, as it is stronger, and can be used longer).

So, while the fix may have been simple, there may have been a bunch of discussion about whether this was the right thing to do, versus something else.
 
Upvote
10 (10 / 0)

Carewolf

Ars Legatus Legionis
10,679
[url=http:/civis/viewtopic.php?p=30545381#p30545381:1ywyc13h said:
WaveRunner[/url]":1ywyc13h]
[url=http:/civis/viewtopic.php?p=30545265#p30545265:1ywyc13h said:
Elgonn[/url]":1ywyc13h]

- if (!(ctx->options & SSL_OP_SINGLE_DH_USE)) {

Look at that bitmask, extra cool points for optimization, should run so much faster! *shakes head*.

?? That is perfectly standard. The coding style is a bit ugly, but bitmasks are not odd.
 
Upvote
1 (5 / -4)

Elgonn

Wise, Aged Ars Veteran
122
[url=http:/civis/viewtopic.php?p=30545679#p30545679:uat7c797 said:
tshort[/url]":uat7c797]
So, really the question is, was that the correct fix? In effect, they have enabled SSL_OP_SINGLE_DH_USE for all connections. This is a significant change in behavior, and impacts performance as new DHE keys are generated for every single connection (which is a good thing in terms of CVE-2015-4000/LOGJAM) using appropriate cipher suites. Previously a DHE key could be reused for a period of time; which improves performance, at the cost of some security (the bigger the DHE key, the greater performance gain, as it is stronger, and can be used longer).

So, while the fix may have been simple, there may have been a bunch of discussion about whether this was the right thing to do, versus something else.

This kind of argument is why LibreSSL has changed and removed so much of the original codebase. They've switched to normal system calls and removed almost all of the optimization. It didn't get slower and yet got significantly cleaner.

Original Use Case:
USE KEY
IF OBSCURE SETTING && TIME && ETC SKIP NEXT LINE
REGENERATE KEY

Fixed Use Case
USE KEY
REGENERATE KEY

That's not worth a discussion. This is a security program! There can't be a defense for this behavior anymore. Regenerating a key might have been a significant cost decades ago (still shouldn't have done it).
 
Upvote
3 (5 / -2)

DannyB

Ars Tribunus Militum
1,700
[url=http:/civis/viewtopic.php?p=30544359#p30544359:2lyqhg60 said:
operagost[/url]":2lyqhg60]
[url=http:/civis/viewtopic.php?p=30544013#p30544013:2lyqhg60 said:
jpcg[/url]":2lyqhg60]
[url=http:/civis/viewtopic.php?p=30543959#p30543959:2lyqhg60 said:
Nowicki[/url]":2lyqhg60]I want to root for openssl, but damn this thing is like swiss cheese. Im beginning to look at it like adobe with all the exploits I heard about through 2015

The thing is: Encryption is hard.
But apparently, hacking it is easy.

Hacking it might be possible, but probably not easy.
 
Upvote
2 (2 / 0)

dizdizzie

Ars Scholae Palatinae
1,421
[url=http:/civis/viewtopic.php?p=30544881#p30544881:3uzcfedk said:
Modern Major General Thanatos[/url]":3uzcfedk]
[url=http:/civis/viewtopic.php?p=30544685#p30544685:3uzcfedk said:
Stubabe[/url]":3uzcfedk]
[url=http:/civis/viewtopic.php?p=30544647#p30544647:3uzcfedk said:
Modern Major General Thanatos[/url]":3uzcfedk]
[url=http:/civis/viewtopic.php?p=30544631#p30544631:3uzcfedk said:
Stubabe[/url]":3uzcfedk]
None of which is any different someone vetting a closed source application - which is my point. And while OpenSSL does get a lot of attention there are a lot of open source projects out there and most don't get reviewed like this. So if there are not disclosures was is bug free or just not looked at?

It is completely different. I don't have to jump through a million hoops to get a vendor to disclose source code with openssl to review it. I just need a text editor and an internet connection. Try that with Forefront.

And you really think you can?

Can, and have. Submitting your first bug report is an awesome experience. :p

Why didn't you see this then?
Because I don't rely on openssl to the point of needing to do this, and there are plenty of researchers like the one that resulted in this disclosure doing that job for me.

Most researchers don't go around validating products (OSS or not) for free - they get hired to do it. So we don't need you to look at Forefront.

By that definition, closed source would be unhackable, which is provably false. Getting paid doesn't somehow make you better at a job.

And errors like the one above don't need source code access if that was true close source would never be hacked....

I addressed that in my first post, and I'll restate it here again: Closed source means you are subject to the whim of the devs or hackers when it comes to finding out what is happening under the hood.
Or company might pay you to do the review.

In practice you need someone to actually review the code. TrueCrypt was auditioned like 10 years after release. Open source helps a lot, but you still need to check how well maintained is the software. Simply being open source isn't guarantee of anything. The software you use might even be abandoned or maintained in free time by single developer like OpenSSL was.
 
Upvote
10 (10 / 0)
[url=http:/civis/viewtopic.php?p=30545699#p30545699:1ye9ybqs said:
Carewolf[/url]":1ye9ybqs]
[url=http:/civis/viewtopic.php?p=30545381#p30545381:1ye9ybqs said:
WaveRunner[/url]":1ye9ybqs]
[url=http:/civis/viewtopic.php?p=30545265#p30545265:1ye9ybqs said:
Elgonn[/url]":1ye9ybqs]

- if (!(ctx->options & SSL_OP_SINGLE_DH_USE)) {

Look at that bitmask, extra cool points for optimization, should run so much faster! *shakes head*.

?? That is perfectly standard. The coding style is a bit ugly, but bitmasks are not odd.
It's a set membership test. If the code is C, there really isn't any other way to do a set membership test.

I mean, yeah you could use a byte vector for the set and iterate through the vector to test membership, which would be basically pointless complexity. You could hide it behind an interface:

if (option(ctx, SSL_OP_SINGLE_DH_USE))

to hide the brain damage, but then you can hide the bit mask too, in which case WaveRunner would have said its a fine example of good coding, even though the same operation is taking place.
 
Upvote
5 (5 / 0)
[url=http:/civis/viewtopic.php?p=30546705#p30546705:1r4bt57g said:
심돌산[/url]":1r4bt57g]

if (option(ctx, SSL_OP_SINGLE_DH_USE))

to hide the brain damage, but then you can hide the bit mask too, in which case WaveRunner would have said its a fine example of good coding, even though the same operation is taking place.

Yup I would have. Let the compiler do the work, not the reader.
 
Upvote
-8 (0 / -8)
[url=http:/civis/viewtopic.php?p=30544281#p30544281:1l9yzgqi said:
pseudonomous[/url]":1l9yzgqi]
[url=http:/civis/viewtopic.php?p=30544007#p30544007:1l9yzgqi said:
Ostracus[/url]":1l9yzgqi]
[url=http:/civis/viewtopic.php?p=30543959#p30543959:1l9yzgqi said:
Nowicki[/url]":1l9yzgqi]I want to root for openssl, but damn this thing is like swiss cheese. Im beginning to look at it like adobe with all the exploits I heard about through 2015


Wasn't the problem about money? Basically a lot of high-profile users, but little financial contributions.

They have not been well-funded, but there are a number of people out there (e.g. the LibreSSL developers) who think the bigger problem is that the OpenSSL code base is not the greatest in the world.

My understanding is that quite a few of the early OpenSSL developers came more from a cryptographic and/or mathematical background than a programming background. That is to say, they were cryptographers writing code, not professional programmers implementing cryptography. It's understandable that someone who's primary occupation is researching cryptography and the mathematical background, while knowing how to code, may not be as good at it as an OpenBSD kernel hacker. Likewise, a professional coder may be able to take a spec or algorithm and implement it in elegant code, while still not really understanding the mathematical background as to why it works.

Suffice to say, I think the bigger problem was that OpenSSL's popularity grew so large that such code began to be a problem, and there was never an internal project to start cleaning it up or rewriting / restructuring it in a better way. It just grew and grew until it became a mess too big to fix.
 
Upvote
5 (5 / 0)
[url=http:/civis/viewtopic.php?p=30545815#p30545815:7z2z594y said:
q5ajzvtd[/url]":7z2z594y]OpenSSL is one of the best counterexamples to the "Many Eyes Theory" of open-source software.

Why do you say that?

OpenSSL didn't have very many contributors/auditors at all for a long time due to the impenetrable nature of the codebase. Once they had screwed up badly enough one too many times, they finally got a lot of experienced external people auditing it. Once that started, they started finding plenty more bugs.

It's almost as if OpenSSL is confirming that "Many Eyes" line. You'll note the statement is about having lots of people looking at the code - which is orthogonal to whether it is open or not.
 
Upvote
7 (7 / 0)
[url=http:/civis/viewtopic.php?p=30547845#p30547845:1slqvlka said:
styron[/url]":1slqvlka]
[url=http:/civis/viewtopic.php?p=30545815#p30545815:1slqvlka said:
q5ajzvtd[/url]":1slqvlka]OpenSSL is one of the best counterexamples to the "Many Eyes Theory" of open-source software.

Why do you say that?

OpenSSL didn't have very many contributors/auditors at all for a long time due to the impenetrable nature of the codebase. Once they had screwed up badly enough one too many times, they finally got a lot of experienced external people auditing it. Once that started, they started finding plenty more bugs.

It's almost as if OpenSSL is confirming that "Many Eyes" line. You'll note the statement is about having lots of people looking at the code - which is orthogonal to whether it is open or not.

Depends though... many eyes also imported the source into their own projects since OpenSSL is a whole library of crypto tools. Are we not going to count those people failing to raise red flags along the way?
 
Upvote
-3 (2 / -5)

psd

Well-known member
10,265
[url=http:/civis/viewtopic.php?p=30544223#p30544223:2nfzu1bn said:
Modern Major General Thanatos[/url]":2nfzu1bn]
[url=http:/civis/viewtopic.php?p=30544103#p30544103:2nfzu1bn said:
psd[/url]":2nfzu1bn]Can we now admit that open source does not ensure secure code? Let's just not make that argument anymore in light of empirical evidence.

Can we admit now that this question is a red herring?

The issue is with accountability. OSS means you can see for yourself what is happening. Closed source means you are subject to the whim of the devs or hackers when it comes to finding out what is happening under the hood.


Do you seriously want to talk about accountability?! Do you? OSS is one of the most unaccountable efforts. What will be the consequence for this serious security and other coding failings? Is anybody going to get fired? Is the project going to get shuttered? Is anybody going to made embarrassed at an hours long code review sessions? No, such thing, I'm afraid.

Rather than accountability, what you really mean is the issue of OSS caveat emptor, latin for read the source code yourself, sucker!

And one is not subject to the whim of devs or hackers when it comes to finding out what is happening under the hood. Its called black-box testing...
 
Upvote
-8 (1 / -9)

psd

Well-known member
10,265
[url=http:/civis/viewtopic.php?p=30544365#p30544365:tc7hoj7z said:
doornail[/url]":tc7hoj7z]
[url=http:/civis/viewtopic.php?p=30544103#p30544103:tc7hoj7z said:
psd[/url]":tc7hoj7z]Can we now admit that open source does not ensure secure code? Let's just not make that argument anymore in light of empirical evidence.

An old proverb says that coders of any skill level can create cyphers that they themselves cannot decrypt. Should you trust your sweet money-bits to coders of foggy skill levels?

Plainly no. Which leads us to ask how is it that you cannot grasp the immense value of peer review?

Yeah, sure; to the extent there is actual peer review.
 
Upvote
-5 (1 / -6)
D

Deleted member 192806

Guest
[url=http:/civis/viewtopic.php?p=30548121#p30548121:nci6f30j said:
psd[/url]":nci6f30j]
[url=http:/civis/viewtopic.php?p=30544223#p30544223:nci6f30j said:
Modern Major General Thanatos[/url]":nci6f30j]
[url=http:/civis/viewtopic.php?p=30544103#p30544103:nci6f30j said:
psd[/url]":nci6f30j]Can we now admit that open source does not ensure secure code? Let's just not make that argument anymore in light of empirical evidence.

Can we admit now that this question is a red herring?

The issue is with accountability. OSS means you can see for yourself what is happening. Closed source means you are subject to the whim of the devs or hackers when it comes to finding out what is happening under the hood.


Do you seriously want to talk about accountability?! Do you? OSS is one of the most unaccountable efforts. What will be the consequence for this serious security and other coding failings? Is anybody going to get fired? Is the project going to get shuttered? Is anybody going to made embarrassed at an hours long code review sessions? No, such thing, I'm afraid.

Rather than accountability, what you really mean is the issue of OSS caveat emptor, latin for read the source code yourself, sucker!

And one is not subject to the whim of devs or hackers when it comes to finding out what is happening under the hood. Its called black-box testing...


You left out, loss of reputation. Both the team, as well as open-source in general.
 
Upvote
-3 (0 / -3)

psd

Well-known member
10,265
[url=http:/civis/viewtopic.php?p=30547845#p30547845:1zi80bbq said:
styron[/url]":1zi80bbq]
[url=http:/civis/viewtopic.php?p=30545815#p30545815:1zi80bbq said:
q5ajzvtd[/url]":1zi80bbq]OpenSSL is one of the best counterexamples to the "Many Eyes Theory" of open-source software.

Why do you say that?

OpenSSL didn't have very many contributors/auditors at all for a long time due to the impenetrable nature of the codebase. Once they had screwed up badly enough one too many times, they finally got a lot of experienced external people auditing it. Once that started, they started finding plenty more bugs.

It's almost as if OpenSSL is confirming that "Many Eyes" line. You'll note the statement is about having lots of people looking at the code - which is orthogonal to whether it is open or not.

No, what OpenSSL confirmed is "Many Eyes" can't be bothered to look unless there is many money involved.
 
Upvote
-2 (5 / -7)

AxMi-24

Ars Legatus Legionis
10,416
[url=http://arstechnica.co.uk/civis/viewtopic.php?p=30544895#p30544895:11s1zf3s said:
Res1233[/url]":11s1zf3s]If you thought OpenSSL was swiss cheese, it could be worse... For example:
[url=http:/civis/viewtopic.php?p=30544835#p30544835:11s1zf3s said:
WaveRunner[/url]":11s1zf3s]I use Windows... ***knock on wood***
It's anyone's guess how many vulnerabilities Windows still has. I think OpenSSL isn't doing all that bad, honestly. It could definitely improve though, and it would seem LibreSSL and BoringSSL are doing so.

Well it does help that MS has decided that the best way to combat security bugs is to make spying on the user a "feature". That way there is nothing left to steal and thus it becomes irrelevant if there are any additional "features" in the code.
 
Upvote
-5 (1 / -6)
[url=http:/civis/viewtopic.php?p=30548245#p30548245:1tpknhq1 said:
psd[/url]":1tpknhq1]
[url=http:/civis/viewtopic.php?p=30547845#p30547845:1tpknhq1 said:
styron[/url]":1tpknhq1]
[url=http:/civis/viewtopic.php?p=30545815#p30545815:1tpknhq1 said:
q5ajzvtd[/url]":1tpknhq1]OpenSSL is one of the best counterexamples to the "Many Eyes Theory" of open-source software.

Why do you say that?

OpenSSL didn't have very many contributors/auditors at all for a long time due to the impenetrable nature of the codebase. Once they had screwed up badly enough one too many times, they finally got a lot of experienced external people auditing it. Once that started, they started finding plenty more bugs.

It's almost as if OpenSSL is confirming that "Many Eyes" line. You'll note the statement is about having lots of people looking at the code - which is orthogonal to whether it is open or not.

No, what OpenSSL confirmed is "Many Eyes" can't be bothered to look unless there is many money involved.

Maybe if we stop misquoting it as "Many Eyes" things will get clearer. ESR's simplified version was "Given enough eyeballs..." which is a pointless tautology when simplified like that.

I'm not defending the validity of the statement (I personally think ESR is an egotistical blowhard), just that it has to be one of the most misquoted and/or misunderstood quotes around and frequently taken out of context. And that the only people who ever seem to quote it this century are those holding it up as a strawman.

It was not made in reference to security. It was not made in reference to open source vs closed source. It was not claiming open source has "more eyeballs" and is therefore more secure or anything like that.

It was lesson 8 of 19 in the "Cathedral and the Bazaar" where ESR is using the lessons he learnt from watching Linus Torvalds management style (and others) to lead the development of fetchmail. He was promoting a style (the bazaar) of running an open source project to attract and motivate as many other co-developers and beta testers as possible.

(Edit: BTW the FSF and Emacs were what he usually had in mind as "the Cathedral" rather than closed source software)

The full lesson was "Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone."

The OpenSSL project was definitely not run as "a bazaar". For many many years it was just a tiny handful people toiling away on a massively complex out of control legacy codebase by themselves and never removing any technical debt. External developers (eg OpenBSD devs) gave up in frustration trying to work with them to improve things. Someone identified the bug that lead to Heartbleed years earlier and was ignored. etc

My objection is not about whether ESR is correct or not - just that the OpenSSL project is almost the polar opposite of what ESR was trying to promote with that quote.

For those who are interested, the other (out of context too hehe) lessons are listed below:
1. Every good work of software starts by scratching a developer's personal itch.

2. Good programmers know what to write. Great ones know what to rewrite (and reuse).

3. "Plan to throw one away; you will, anyhow." (Fred Brooks, The Mythical Man-Month, Chapter 11)

4. If you have the right attitude, interesting problems will find you.

5. When you lose interest in a program, your last duty to it is to hand it off to a competent successor.

6. Treating your users as co-developers is your least-hassle route to rapid code improvement and effective debugging.

7. Release early. Release often. And listen to your customers.

8. Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone.

9. Smart data structures and dumb code works a lot better than the other way around.

10. If you treat your beta-testers as if they're your most valuable resource, they will respond by becoming your most valuable resource.

11. The next best thing to having good ideas is recognizing good ideas from your users. Sometimes the latter is better.

12. Often, the most striking and innovative solutions come from realizing that your concept of the problem was wrong.

13. "Perfection (in design) is achieved not when there is nothing more to add, but rather when there is nothing more to take away." (Antoine de Saint-Exupéry)

14. Any tool should be useful in the expected way, but a truly great tool lends itself to uses you never expected.

15. When writing gateway software of any kind, take pains to disturb the data stream as little as possible—and never throw away information unless the recipient forces you to!

16. When your language is nowhere near Turing-complete, syntactic sugar can be your friend.

17. A security system is only as secure as its secret. Beware of pseudo-secrets.

18. To solve an interesting problem, start by finding a problem that is interesting to you.

19: Provided the development coordinator has a communications medium at least as good as the Internet, and knows how to lead without coercion, many heads are inevitably better than one.
 
Upvote
8 (8 / 0)

Carewolf

Ars Legatus Legionis
10,679
[url=http:/civis/viewtopic.php?p=30545815#p30545815:3aeo0td4 said:
q5ajzvtd[/url]":3aeo0td4]OpenSSL is one of the best counterexamples to the "Many Eyes Theory" of open-source software.

Doesn't seem that way. A lot of bugs hid when there were few eyes on it. Now that there are many eyes on it all the bugs look shallow.
 
Upvote
6 (6 / 0)

0010110SYN

Wise, Aged Ars Veteran
184
I think it would be helpful if we could see a short video of someone conducting hacks like these, as a part of presenting the material.

Sometimes when I see articles on the topic of security vulnerabilities, I wonder about how hypothetical they might be.

Perhaps the concepts of vulnerability and severity would communicate better with a laboratory experiment.
 
Upvote
1 (1 / 0)

RobAt13

Wise, Aged Ars Veteran
147
[url=http:/civis/viewtopic.php?p=30545351#p30545351:1giyfuwy said:
luiscubal[/url]":1giyfuwy]
[url=http:/civis/viewtopic.php?p=30544771#p30544771:1giyfuwy said:
tshort[/url]":1giyfuwy]The TLS protocol is complex. OpenSSL is complex because it supports almost everything in TLS (and SSLv3 and SSLv2...).

But what I've heard is that there's a very large amount of code, openssl often re-implements functionality that should be provided by os or library calls, as well as other stylistic shortcomings which make it hard to properly figure out what the code is *supposed* to do, let alone actually does.

What I've seen (since I work on OpenSSL for my employer) is the "re-implementation" is for security.

For instance, memcmp() can leak information based on how long it takes to determine equality. A cryptographic safe version will always take the same amount of time to do the compare for n bytes. Normal operating system/compiler versions of memcmp() exit early, once inequality is known, for performance reasons.

That is a legitimate case, but I remember reading that OpenSSL also reimplemented stuff like malloc/free in a way that actually made code less secure.
It's true that OpenSSL was building and using their own implementations of system library routines, where they were not necessary, and which CIRCUMVENTED attempts at HARDENING malloc/free included in OpenBSD. This was a basis of much of the OpenBSD post-heartbleed criticism of OpenSLL. A partial consequence of supporting obsolete platforms, NOT using the normal FLOSS way of testing OS features for compatability, and avoiding over-riding system libraries. The relative difficulty of contributing to OpenSSL & the small contribution pool, mean this key piece of Internet software was less open and less resourced than it really required. OpenSSL was simply less well engineered for portability because it was specialist crypto software and was more ivory tower cathedral rather than the Bazzaar.

Those advocating closed source are kidding themselves, very much software include BSD/MIT licensed software without acknowledgement and a lack of disclosure or desire to maintain old low profile products is likely to leave you vulnerable. It simply costs too much time and money to develop code from scratch, developers love copy & paste.
 
Upvote
2 (2 / 0)

mike acker

Smack-Fu Master, in training
84
Bruce Schnieer notes "Complexity is the enemy of security" He's right, as usual.
and HTTPS / SSL is a perfect example: the session key HAS to be generated by the CLIENT

when the session starts you have only half of a PGP secure link: client has the public key for the server and the the sever holds the corresponding private key

what this means is: the client can authenticate a message from the server -- but the server cannot authenticate the client except for the use of a user ID and password .

for this reason the session must start with the server sending an signed copy of its letterhead to the client . the client can authenticate this -- using the X.509 certificate it thinks* belongs to the server it is attempting to connect

if the letterhead authenticates then the CLIENT can generate a session key, encrypt it for the SERVER and send it. it cannot be done in reverse because the server does not have a public key for the client. end of story.

simplicity is the answer.
--
* x.509 certificates are printed and broadcast like losing lotto tickets. we must develop a process wherein the CLIENT has a PGP key and is able to SIGN for TRUSTED x.509 certificates. this will require the development and deployment of a KEK device: you cannot use smart phones for this: you must use a single purpose device to that updates can be STRICTLY controlled .
 
Upvote
0 (0 / 0)

RobAt13

Wise, Aged Ars Veteran
147
[url=http:/civis/viewtopic.php?p=30545627#p30545627:25l4y9zq said:
foxyshadis[/url]":25l4y9zq]
[url=http:/civis/viewtopic.php?p=30544223#p30544223:25l4y9zq said:
Modern Major General Thanatos[/url]":25l4y9zq]
[url=http:/civis/viewtopic.php?p=30544103#p30544103:25l4y9zq said:
psd[/url]":25l4y9zq]Can we now admit that open source does not ensure secure code? Let's just not make that argument anymore in light of empirical evidence.

Can we admit now that this question is a red herring?

The issue is with accountability. OSS means you can see for yourself what is happening. Closed source means you are subject to the whim of the devs or hackers when it comes to finding out what is happening under the hood.
It's not a "red herring" because for at least a decade it was promoted as the primary reason to use open over closed source (particularly Microsoft), and even today is occasionally brought up by someone who wants to willfully ignore all the open-source exploits in the last few years. Most people have moved on to other actual advantages, but the advantage of having the source to find bugs is a bit oversold too; plenty of people can and do find bugs in closed-source software, either by fuzzing inputs until something interesting happens, or understanding machine language as well as they do C/C++. (Which makes any program "open source" to them.)

The biggest advantage is that anyone who does find or learn of a bug can relatively easily fix and rebuild it
NO!! The large advantage is that these issues cannot be hidden. Closed source MS for instance used Mosaic code as base for IE, but were not distributing it so no open review, a large marketing & advertising budget did NOTHING to improve code quality, it just gives people who like saying "you get what you pay for" the warm fuzzies, despite all contrary evidence.

Security consciousness was just one of many FLOSS advantages, and whilst I will say MS is far more security conscious than they used to be, it's still NOT hard to find comment from ex-developers about the poor quality, prioritisation of features over reduction of technical debt & quality improvements. In particular suggesting developer wished code improvement work has effectively be implemented as part of developing new features; all too plausible given the way software managers think.

Most hardware products are developed using FLOSS tools, in house, because commercial tools tend to have limited lifetimes and viability.
 
Upvote
0 (1 / -1)

foxyshadis

Ars Praefectus
5,089
Subscriptor
[url=http:/civis/viewtopic.php?p=30548705#p30548705:3u9fxto0 said:
Carewolf[/url]":3u9fxto0]
[url=http:/civis/viewtopic.php?p=30545815#p30545815:3u9fxto0 said:
q5ajzvtd[/url]":3u9fxto0]OpenSSL is one of the best counterexamples to the "Many Eyes Theory" of open-source software.

Doesn't seem that way. A lot of bugs hid when there were few eyes on it. Now that there are many eyes on it all the bugs look shallow.
This bug has lain dormant in every fork of OpenSSL for nearly two years since Heartbleed, despite intense scrutiny during that entire period, during which time -- for all anyone knows -- a nation-state attacker may have known all about it. That doesn't seem very shallow to me. Sure, it was fixed eventually, but the confidence is ebbing to a new low, not rising. The only positive is that far fewer bugs are being found and fixed after all this time, and maybe in a year or two it will actually be as secure as it was supposed to be all along.
 
Upvote
0 (1 / -1)

foxyshadis

Ars Praefectus
5,089
Subscriptor
[url=http:/civis/viewtopic.php?p=30549037#p30549037:a4odg9x3 said:
RobAt13[/url]":a4odg9x3]
[url=http:/civis/viewtopic.php?p=30545627#p30545627:a4odg9x3 said:
foxyshadis[/url]":a4odg9x3]
[url=http:/civis/viewtopic.php?p=30544223#p30544223:a4odg9x3 said:
Modern Major General Thanatos[/url]":a4odg9x3]
[url=http:/civis/viewtopic.php?p=30544103#p30544103:a4odg9x3 said:
psd[/url]":a4odg9x3]Can we now admit that open source does not ensure secure code? Let's just not make that argument anymore in light of empirical evidence.

Can we admit now that this question is a red herring?

The issue is with accountability. OSS means you can see for yourself what is happening. Closed source means you are subject to the whim of the devs or hackers when it comes to finding out what is happening under the hood.
It's not a "red herring" because for at least a decade it was promoted as the primary reason to use open over closed source (particularly Microsoft), and even today is occasionally brought up by someone who wants to willfully ignore all the open-source exploits in the last few years. Most people have moved on to other actual advantages, but the advantage of having the source to find bugs is a bit oversold too; plenty of people can and do find bugs in closed-source software, either by fuzzing inputs until something interesting happens, or understanding machine language as well as they do C/C++. (Which makes any program "open source" to them.)

The biggest advantage is that anyone who does find or learn of a bug can relatively easily fix and rebuild it
NO!! The large advantage is that these issues cannot be hidden. Closed source MS for instance used Mosaic code as base for IE, but were not distributing it so no open review, a large marketing & advertising budget did NOTHING to improve code quality, it just gives people who like saying "you get what you pay for" the warm fuzzies, despite all contrary evidence.

Security consciousness was just one of many FLOSS advantages, and whilst I will say MS is far more security conscious than they used to be, it's still NOT hard to find comment from ex-developers about the poor quality, prioritisation of features over reduction of technical debt & quality improvements. In particular suggesting developer wished code improvement work has effectively be implemented as part of developing new features; all too plausible given the way software managers think.

Most hardware products are developed using FLOSS tools, in house, because commercial tools tend to have limited lifetimes and viability.
Microsoft actually does share their source code, just not with you and me. Some business partners, universities, and security researchers have copies. (That's how the Win2K source ended up online, Mainsoft was either hacked or an employee stole it.) And like I said, to an assembly coder, nothing is completely closed source; there's always someone who can verify and review it regardless.
 
Upvote
2 (2 / 0)
[url=http:/civis/viewtopic.php?p=30549007#p30549007:1c6b6cjx said:
mike acker[/url]":1c6b6cjx]Bruce Schnieer notes "Complexity is the enemy of security" He's right, as usual.
and HTTPS / SSL is a perfect example: the session key HAS to be generated by the CLIENT

Actually, that's wrong. There is no way a server would trust a key that is generated by the client to be secure.

With vanilla RSA, the session key is generated from the public client and server random values, plus a pre-master-secret generated by the client encrypted with the server's public key. By including it's own entropy (server random) and the client entropy (client random + pre-master-secret), the server knows that the key has not been pre-determined to be bad.

When (EC)DH(E) ciphers are used, Diffie-Hellman key agreement is used, based on parameters supplied by the server, and client and server private and public values to reach a mutually agreed-upon key.
 
Upvote
2 (2 / 0)
[url=http:/civis/viewtopic.php?p=30549177#p30549177:1duna46t said:
foxyshadis[/url]":1duna46t]
Microsoft actually does share their source code, just not with you and me. Some business partners, universities, and security researchers have copies. (That's how the Win2K source ended up online, Mainsoft was either hacked or an employee stole it.) And like I said, to an assembly coder, nothing is completely closed source; there's always someone who can verify and review it regardless.

That is a secret, no one was suppose to know about that.

Heck the Chinese won't even let MS own or run the Azure facility, do people honestly think the Chinese government are just going to install Windows on all these machines without some oversight?
 
Upvote
0 (1 / -1)

darkxale

Ars Scholae Palatinae
855
[url=http:/civis/viewtopic.php?p=30545627#p30545627:amxox9on said:
foxyshadis[/url]":amxox9on]Most people have moved on to other actual advantages, but the advantage of having the source to find bugs is a bit oversold too; plenty of people can and do find bugs in closed-source software, either by fuzzing inputs until something interesting happens,
Which ironically is how all the major open-source SSL exploits in 2014 were detected. Heck, the Apple GoToFail bug heavily implied -nobody- was checking the code at all, since it was trivially detectable by a basic read through (unusually, even by beginners), core functionality testing, or by compiler warnings (or even IDEs).

Make no mistake - open source is ideally to prefer, but you still need verify you actually have someone thoroughly examining and properly understanding the code - as quite clearly the amount of white-hats (at least with sufficient competence) that do this on their own initiative is very close to zero. Unfortunately, its quite plausible that Black Hats are/were benefitting more - as they're far more motivated to do the work. Theres very real (big) money involved here.
 
Upvote
5 (5 / 0)

cerberusTI

Ars Tribunus Angusticlavius
7,228
Subscriptor++
[url=http:/civis/viewtopic.php?p=30549177#p30549177:1pbx5a67 said:
foxyshadis[/url]":1pbx5a67]
[url=http:/civis/viewtopic.php?p=30549037#p30549037:1pbx5a67 said:
RobAt13[/url]":1pbx5a67]
[url=http:/civis/viewtopic.php?p=30545627#p30545627:1pbx5a67 said:
foxyshadis[/url]":1pbx5a67]
[url=http:/civis/viewtopic.php?p=30544223#p30544223:1pbx5a67 said:
Modern Major General Thanatos[/url]":1pbx5a67]
[url=http:/civis/viewtopic.php?p=30544103#p30544103:1pbx5a67 said:
psd[/url]":1pbx5a67]Can we now admit that open source does not ensure secure code? Let's just not make that argument anymore in light of empirical evidence.

Can we admit now that this question is a red herring?

The issue is with accountability. OSS means you can see for yourself what is happening. Closed source means you are subject to the whim of the devs or hackers when it comes to finding out what is happening under the hood.
It's not a "red herring" because for at least a decade it was promoted as the primary reason to use open over closed source (particularly Microsoft), and even today is occasionally brought up by someone who wants to willfully ignore all the open-source exploits in the last few years. Most people have moved on to other actual advantages, but the advantage of having the source to find bugs is a bit oversold too; plenty of people can and do find bugs in closed-source software, either by fuzzing inputs until something interesting happens, or understanding machine language as well as they do C/C++. (Which makes any program "open source" to them.)

The biggest advantage is that anyone who does find or learn of a bug can relatively easily fix and rebuild it
NO!! The large advantage is that these issues cannot be hidden. Closed source MS for instance used Mosaic code as base for IE, but were not distributing it so no open review, a large marketing & advertising budget did NOTHING to improve code quality, it just gives people who like saying "you get what you pay for" the warm fuzzies, despite all contrary evidence.

Security consciousness was just one of many FLOSS advantages, and whilst I will say MS is far more security conscious than they used to be, it's still NOT hard to find comment from ex-developers about the poor quality, prioritisation of features over reduction of technical debt & quality improvements. In particular suggesting developer wished code improvement work has effectively be implemented as part of developing new features; all too plausible given the way software managers think.

Most hardware products are developed using FLOSS tools, in house, because commercial tools tend to have limited lifetimes and viability.
Microsoft actually does share their source code, just not with you and me. Some business partners, universities, and security researchers have copies. (That's how the Win2K source ended up online, Mainsoft was either hacked or an employee stole it.) And like I said, to an assembly coder, nothing is completely closed source; there's always someone who can verify and review it regardless.

As someone who does write some assembly, what your optimizing compiler generates is not human readable without a huge amount of effort.

While I may occasionally disassemble something to look at it, it is in no way even close to easy to read compared to hand written assembly or code in a high level language.

Aside from the complete lack of meaningful variable names and comments, the structure of the code is entirely different when a compiler generates it.
 
Upvote
0 (0 / 0)

cerberusTI

Ars Tribunus Angusticlavius
7,228
Subscriptor++
[url=http:/civis/viewtopic.php?p=30544281#p30544281:1ls8kftv said:
pseudonomous[/url]":1ls8kftv]
[url=http:/civis/viewtopic.php?p=30544007#p30544007:1ls8kftv said:
Ostracus[/url]":1ls8kftv]
[url=http:/civis/viewtopic.php?p=30543959#p30543959:1ls8kftv said:
Nowicki[/url]":1ls8kftv]I want to root for openssl, but damn this thing is like swiss cheese. Im beginning to look at it like adobe with all the exploits I heard about through 2015


Wasn't the problem about money? Basically a lot of high-profile users, but little financial contributions.

They have not been well-funded, but there are a number of people out there (e.g. the LibreSSL developers) who think the bigger problem is that the OpenSSL code base is not the greatest in the world. I'm not an experienced C programmer myself, nor have I examined the code, so I'm not really qualified to judge. But what I've heard is that there's a very large amount of code, openssl often re-implements functionality that should be provided by os or library calls, as well as other stylistic shortcomings which make it hard to properly figure out what the code is *supposed* to do, let alone actually does. The (allegedly un-necessary) complexity of the code makes it hard for external developers to either audit or contribute to the project because there's such a steep initial learning curve to understanding the existing code base. This is why bugs like the heartbleed bug occur ... and take *years* to get noticed.

But, in this particular case, it sounds like someone actually implemented an insecure algorithm, which is different kind of mistake that you can chalk up to "cryptography is hard".

It may be necessary on some platforms.

Some of the programs I have written contain custom copies of what you would think were very standard functions. The reason is almost universally that there is a version for a platform which does not include a copy of that function, with most of the exceptions being cases where the built in version is at least in one case too slow to be useful.

To make those even worse, they frequently get implemented at the last minute when it will not compile on a new system, with a customer actively waiting.
 
Upvote
0 (0 / 0)
[url=http:/civis/viewtopic.php?p=30559389#p30559389:1wc9ufbu said:
Avi Sawyer[/url]":1wc9ufbu]On Ubuntu server trusty, latest version still shows

OpenSSL 1.0.1f 6 Jan 2014
built on: Fri Dec 4 13:55:16 UTC 2015

so it has not been recompiled to the latest version that is not vulnerable to this bug. Hopefully the maintainers do so soon

Trusty wasn't affected

http://people.canonical.com/~ubuntu-sec ... -0701.html

15.10 (Wily) was the first Ubuntu release to ship OpenSSL 1.0.2.
 
Upvote
0 (0 / 0)
Status
Not open for further replies.