Live data from Hacker News

Hidden backdoor API to root privileges in Apple OS X

truesecdev.wordpress.com

161–170 of 367 posts

Re: Hidden backdoor API to root privileges in Apple OS X

#162

Earlier quoted context omitted.

To be fair, calling a virtual method on a null receiver is undefined behavior (not necessarily a segfault!) in C++ too. The compiler is free to replicate Objective-C's behavior if it wants to. (Of course, no compilers actually do precisely that, but it is possible for compilers to delete virtual method calls entirely if it can prove the receiver had to be null...)

Why is that undefined? Seems like it should obviously cause a fault...

It's an optimization. Virtual methods that don't dereference this (by not accessing any non static member variables for example) don't have to check if this is null. For example,

  class Example {
  public:
    static bool do_it;
    virtual void do_it_if() {
       if (g_do_it) return;

       /* otherwise do something that dereferences this... */
    }
  };

  void test1() {
    Example::do_it = false;
    static_cast(NULL)->do_it_if();
  }

  void test2() {
    Example::do_it = true;
    static_cast(NULL)->do_it_if();
  }
In the above code, only test2 crashes (clang 6.0). If crashing was defined behavior you would need an extra check in the code generated for do_it_if.

EDIT:

Also, it's worth explaining why test1 works even though do_it_if is virtual. Since there aren't any methods that override do_it_if, the virtual method lookup can be elided and you don't have to dereference this to find the vtable. If do_it_if had been overridden and the runtime type was unknown, you would need to dereference this to lookup do_it_if in the vtable, which would segfault in both tests.

Re: Hidden backdoor API to root privileges in Apple OS X

#163

Earlier quoted context omitted.

Apple's model customer is one who upgrades often. If you want solid support for old products, stick with Microsoft, and accept that their products can be clunkier because of deliberate choices to maintain backwards-compatibility.

> Apple's model customer is one who upgrades often. I don't know any tech company that doesn't have that idea of a model customer :) To their credit, I can run the latest on a pretty old Mac Mini at home. It's not as fast as it used to be, but it is supported long after the form factor of the Mini has undergone big changes. I don't consider myself being squeezed to upgrade.

I booted up one of those G3 candy colored clamshell iBooks from the early 2000s recently. Not only did start flawlessly, it found and connected to the WiFi, and actually loaded Google on Internet Explorer for Mac.

Re: Hidden backdoor API to root privileges in Apple OS X

#164

Earlier quoted context omitted.

To be fair, OS X updates are free and usually run well even on 5+ years old hardware. OS X has kinda gone the way of Chrome, with most users on the newest version.

"Most users on the newest version"? Of the seven or eight Macs at my workplace, my personal Macbook is the only one running the latest OSX.

Ya the stats I've seen indicate that a considerable chunk are still on 10.6, for example. I forget where but I'm sure a Google search will yield it.

Re: Hidden backdoor API to root privileges in Apple OS X

#165

Earlier quoted context omitted.

Apple's model customer is one who upgrades often. If you want solid support for old products, stick with Microsoft, and accept that their products can be clunkier because of deliberate choices to maintain backwards-compatibility.

To be fair, OS X updates are free and usually run well even on 5+ years old hardware. OS X has kinda gone the way of Chrome, with most users on the newest version.

> To be fair, OS X updates are free and usually run well even on 5+ years old hardware

Unless your hardware has been made "incompatible" by Apple (not for any technical reason, but simply because they wish you'd buy new hardware).

Re: Hidden backdoor API to root privileges in Apple OS X

#166
post #160

Earlier quoted context omitted.

A large chunk of this is due to business use of Windows. Microsoft would not be able to get away with the shenanigans that Apple are pulling here.

Don't worry, my company uses plenty of Macs, and they're plenty upset. As does the U.S. government. I wouldn't count on this "oh, we're just not going to backport the update" sticking around. Unless they want to loose all of their government and commercial sales.

> As does the U.S. government.

The government is largely Windows PC's (mostly XP and Win7).

Re: Hidden backdoor API to root privileges in Apple OS X

#167
So who wants to sell a patch for the now unsupported users of OS X 10.9, 10.8, ...? It could be as simple as changing the permissions on System Preferences so that now you must enter your password before running them (so that they always run as root). Then patch out the backdoor.

Re: Hidden backdoor API to root privileges in Apple OS X

#168
post #105
post #90

Earlier quoted context omitted.

I'm with you on this; I can't leave Mavericks just yet. Every colleague I have that's moved on has had numerous issues with their machine. And now this crap. Ugh.

What kind of issues? I've literally noticed no differences besides UI.

FWIW, 10.10.0 for me was perfect. 10.10.1 broke my wifi. Anytime the computer woke up from sleep, I'd have to reset the wifi card so it could find my access point. After 10.10.2 came out, I got my second-ever full computer lock-up. I've had the same OS image since 10.5 (migrated and upgraded multiple time, obviously) and this was the second time my computer required a hard reboot. And this was while watching a video in the Steam client. I was in awe. A video forcing me to do a full reboot? Brought back memories of Windows ME.

While "upgrading" to 10.10.3, my computer failed to reboot itself. It just sat there, black screen, with a little spinner, for about 2 hours. Hard reboot, everything is back to normal. For now.

I fully expect 10.10.4 to actually destroy my hard drive at this point, as well as cause my monitor to spontaneously get 30-40 dead pixels.

Sucky part is, I feel I have no alternative.

Windows is out of the question after seeing what a factory OEM image comes with nowadays. I'm not giving them money and spending 2 days formatting/reinstalling/seeking out drivers on slow Taiwanese servers just to make a half-usable computer. And then, after all that, spend another 2 days installing various adware infested shitware to get a fricking PDF viewer. And don't get me started on getting a half-decent dev environment going. Ugh.

Linux is almost there. It's a crap shoot for me, unless it's running in a VM. I never know which kernel update will fix my trackpad/break my sound/wifi and which will fix the wifi, break suspend, fix sound, but break xrandr or some other archaic XWindows-related technology.

So, OS X it is, for the time being.

Re: Hidden backdoor API to root privileges in Apple OS X

#169
post #105
post #90

Earlier quoted context omitted.

I'm with you on this; I can't leave Mavericks just yet. Every colleague I have that's moved on has had numerous issues with their machine. And now this crap. Ugh.

What kind of issues? I've literally noticed no differences besides UI.

I have all kinds of problems with Bluetooth, specifically with pairing or connecting devices. Hibernation is all kinds of wonky, too. If it's been asleep for a few hours, it will hibernate when I plug it into AC power without resuming it first. (I really wish there was a way to tell it to hibernate if it's been suspended for some user-settable amount of time like I can with Windows, but that's not a problem specific to Mac OS X 10.10.)
Post reply on HN