Major Apple security flaw could allow hackers to pwn iOS devices, computers

I work for a CA. All our security breaches have appeared on the front page of the national press so Apple is getting off lightly in comparison. But even though our record is vastly better than any of the vendors it is fashionable to blather about the CA security model being a failure etc. etc.

The interface between the cryptography and the real world is the place where the security issues are hardest. But we have controlled those problems to the point they have almost vanished while it seems nobody can write correct code.

Actually the versions of Windows since XP are all pretty solid. Apple solved their security problems with the jump to OSX and implementing mandatory access controls on the critical system functions. When Microsoft tried to do that on Windows, lazy sysadmins tried to avoid the upgrade.and clung to Windows XP despite the known security issues.

Most of the machines running XP today were bought after it was replaced by Vista. And most of them are in businesses.

Not just Apple. Why did we rely on Apple to do all the checks?

When I talked to Apple about it I thought it was just an issue with Apple Mail because thats the only app that I was looking at and it was an error I expected to find. I never thought to check Safari because it never crossed my mind that it might be a general error. And I wasnā€™t at all surprised when I could dump out the SSL traffic with a proxy because it wasnā€™t the first mail client I had looked at.

The error would have been caught by Visual Studio though. Their compiler detects unreachable code and gives a warning. But GCC stopped doing that recently, allegedly because the optimizer causes different results on different platforms but I canā€™t see why the platform dependent optimizer would be involved.

So, itā€™s patched already on iOS but not so far on MacOS

The issue isnā€™t just C or which language - the issue is that there is evidently no testing of the library code. Iā€™d expect a testing suite run against the SSL code, e.g. present a valid certificate, check it works - present an invalid certificate and check it fails, etc. Maybe itā€™s easier to make that kind of error when you write in C, but the real issue is having apparently no mechanism to detect critical errors.

Absolutely. And itā€™s not just Apple at fault here.

Why was nobody else doing this testing for such a critical component? When I worked in process control I had to check out the PID controllers before they went on plant. We didnā€™t trust the manufacturers claims.

What it certainly wasnā€™t is a deliberately induced bug. Apple made the code open source. Which is a good practice. But still, nobody was checking it seems.

So taking a look at the original file: http://opensource.apple.com/source/Security/Security-55471/libsecurity_ssl/lib/sslKeyExchange.c?txt

  • Whatā€™s up with that coding style? Unless your language supports significant whitespace, this is exactly why you always use braces.
  • No code review? Someone else checking the diff would have caught that pretty easily.
  • No unit tests for crypto? Scary.

Actually the versions of Windows since XP are all pretty solid

Perhaps for you if you are hardening it with good security practices, but certainly not for many average users. I think a lot of Windows users are getting a false sense of security because the mass media doesnā€™t report on major security issues on Windows like they used to. People are numb to it at this point and the media doesnā€™t get enough profitable traffic from the coverage.

On the other hand, when a major Apple security flaw is discovered thatā€™s barely propagating worth a shit and exploited against only a small percentage of Mac users, the mainstream news will tend to cover it fairly extensively because itā€™s novel.

Thereā€™s also a lot of false equivalency at play. For example, the media will run stories on RATs and ignore the fact that itā€™s much more difficult to enslave Mac users than Windows users, etc. and disproportionately focus on instances where Macs are compromised.

Personally, I appreciate it overall since the disproportionate media coverage helps to make Macs safer by bringing attention to flaws.

I agree with you that Mac OS X made Apple much more secure. Before OS X, there were viruses and trojans propagating fairly well in OS 9, etc.

I am not going to ascribe this to the laziness of a single person, nor an institutional failure. This is right in line with secret TELCO rooms and dragnet collection of ā€˜metadataā€™.

Do you think it could really, possibly be accidental?

Duplicating a line of code accidentally in an IDE is pretty easy as there are keyboard shortcuts that do this, but checking it in without realizing it, not having the build fail, and having no one else code review is a process failure.

I generally would never apply malice to an action when pure incompetence will do.

The NSA thanks you for your understanding.

1 Like

nobody was checking it seems

I wouldnā€™t say that, heh. Thereā€™s plenty of exploits that get discovered in Windows, Mac and Linux that go unreported for various reasons (and are only known/shared by a select few).

Itā€™s sometimes for nefarious, criminal reasons, but also as a tool for hacktivists as well. The government via quasi-governmental entities gets into the publicsā€™ computers via ā€œundocumentedā€ exploits and hacktivists do the same in kind to the government.

If you lurk among the darker tunnels and especially if you can hack into criminal hackersā€™ communications (along with those quasi-governmental entities, etc.), thereā€™s plenty of zero day exploits to pluck. Not to mention all the patched flaws that apathetic users havenā€™t bothered to apply to their systems that are dire holes, but donā€™t get nearly enough media attention.

Thereā€™s even advantages to using older operating systems if one knows its weaknesses and mitigates them. For example, thereā€™s a reason l only use 10.9.x for testing and even though I use a Mac for regular Internet usage, I was unaffected by this current ā€œunknownā€ bug. :wink:

I generally would never apply malice to an action when pure incompetence will do.

The NSA thanks you for your understanding

Agreed. Apple is known for a lot of things, but ā€œpure incompetenceā€ isnā€™t one of them. That said, I wouldnā€™t be surprised if this was just ineptitude on the part of a few sleep-deprived employees who are increasingly stretched thin by a mega-corp with its fingers in too many pies.

Exactly my point. This does not strike me as ā€˜oopsā€™. This feels more like a ā€˜Snowdenā€™.

Of course it could be a coincidence, though there have been an awful lot of them in the industry lately.

1 Like

This feels more like a ā€˜Snowdenā€™.

In what way? To me that would require an insider to come forward and show plans that this was an intentional flaw. Thatā€™s basically what Snowden bravely exposed with the NSA, but I donā€™t see that here (yet).

Donā€™t get me wrong, I think you may be correct that someone, somewhere looked the other way for the NSA.

I mean, I donā€™t know how many times people have told me that the Apple iSight cameraā€™s green light is ā€œhardwiredā€ and canā€™t be defeated. People kept saying this as fact, but I kept questioning the statements because no one was providing hard evidence.

Welp, later I found out that I can disable the green light on the Apple iSight camera by attacking its chip. Therefore, I can spy on someone via their Apple Macā€™s video cam without the green light coming on. Something many ā€œexpertsā€ told me and everyone else was impossible.

So, conventional wisdom can certainly be very, very wrongā€¦ Thatā€™s for sure. :video_camera: :neutral_face:

That is one way of looking at it, sure. I have personal suspicions that some of the larger exploits which allowed for easier spying at several other companies were not at all accidental, So, when the news is something like this, which appears to be a massive oversight and entirely atypical behavior from a company that prides itself on being the opposite, my hackles raise a but. I am sure the PR people are surprised by it; I do wonder if the entire team which designed the protocol is surprised.

As overcomplicated as it sounds, it just seems to me to be a more obvious explanation than Apple making such a massive mistake accidentally, especially in light of Snowden. It is certainly plausible, and more plausible with every revelation. In the same way you like to go back and quote times when you were right, maybe some day I will get to do that on this issue?

1 Like

In the same way you like to go back and quote times when you were right

I updated my post above to quote a time I was right. :slight_smile:

1 Like

The stray goto is too primitive to be an NSA job. The NSA hack is on Appleā€™s version of llvm, and it is designed to re-insert the extra goto into the binary when Apple patch the source codeā€¦

1 Like

It is too obvious to be NSA. The NSA does not go round doing stuff that is certain to be caught.

Nobody was checking at Apple.

As for there being bugs nobody tells about. My personal policy is not full disclosure. I tell the vendor and if they donā€™t fix it then I go up their chain which in my case reaches high enough to get something fixed. But I donā€™t do bug hunting as a habit, I just tell folk about the bugs I happen to find.

2 Likes

It is too obvious to be NSA

I agree, itā€™s likely an Apple screw upā€¦ but, then again, it sure was helpful while it lasted and thereā€™s plenty of plausible deniability for the NSA as well.

I mean, surely thereā€™s no NSA, CIA or quasi-governmental moles that work at tech companies. Thatā€™d be preposterous. :wink:

The NSA does not go round doing stuff that is certain to be caught.

Thatā€™s highly debatable, especially when you consider plausible deniability. :smiley:

Nobody was checking at Apple

A bit strange, that is. But, it appears to be true.

But I donā€™t do bug hunting as a habit, I just tell folk about the bugs I happen to find.

Sure, thatā€™s the life of a white hat. The grey hat hacktivists, black hat criminals and overzealous governmental/quasi-governmental entities are another story.

1 Like

Interesting article on it:

Apple Gotofail bug: Simple mistake or NSA conspiracy?
http://www.latimes.com/business/technology/la-fi-tn-apple-gotofail-mistake-conspiracy-nsa-20140223,0,4843435.story

Tidbits:

ā€¦ This sort of subtle bug deep in the code is a nightmare," wrote Googleā€™s security expert Adam Langley on his blog. "I believe that itā€™s just a mistake, and I feel very bad for whomever might have slipped in an editor and created it.

ā€¦ But others wondered whether the code was a deliberate attempt to create a backdoor for government spy agencies. They pointed to the fact that some researchers have discovered that the bug first appeared in a version of iOS 6 at about the same time that slides released by Edward Snowden indicate that the National Security Agency claimed it had established a backdoor into some products by Apple. ā€œItā€™s purely circumstantial,ā€ wrote noted Apple follower John Gruber who writes the Daring Fireball blog. ā€œBut the shoe fits.ā€

ā€¦ the security concern is a rare one for Apple. For years, the Mac operating system gained a reputation for having superior security to Microsoftā€™s Windows operating systemā€¦ Indeed, several critics said the concerns over the Gotofail bug were overblown. And they noted that cybersecurity experts have routinely detected far more security holes in Googleā€™s Android operating system.

2 Likes