Live data from Hacker News

How Secure Boot Works on M1 Series Macs

eclecticlight.co

101–110 of 117 posts

Re: How Secure Boot Works on M1 Series Macs

#101

Earlier quoted context omitted.

It does not, not fresh and without boot time actions to take. Certainly not the laptops. The Mac Mini used to have a larger delay dependent on the monitor attached, due to monitor detection times; about 7 seconds to the XNU kernel being launched, or 13 without a monitor (I guess it waits for monitor detection to time out), but now that Apple removed boot-time display support on those I imagine it no longer matters. T…

Just to follow up, it's about 16 seconds on a MacBook Air. 7 seconds of that are iBoot, and 9 are macOS. If you turn off the startup chime sound (which is a checkbox in system settings), that cuts out 2 seconds of iBoot time and makes it 14 seconds total. For comparison, a ThinkPad X230 running Arch takes 7 seconds to GRUB (which I skipped through as fast as possible), FDE unlock prompt at the 12 sec mark, and after…

> If you turn off the startup chime sound (which is a checkbox in system settings), that cuts out 2 seconds of iBoot time and makes it 14 seconds total.

Lol, wait, so the startup chime blocks the rest of the boot process?! I would have expected the system to be working on booting while the chime was playing.

Now I'm not sure whether I should keep the chime turned on. I like the chime, but I'm not sure I want to pay two extra seconds for it. :)

Re: How Secure Boot Works on M1 Series Macs

#102

Earlier quoted context omitted.

People seem to forget that the iPhone is 15 years old, and Macs are still an open platform. It hasn't happened yet, but somehow it's always "going to happen"...

I 100% agree with you and have argued the same point! I expect to get an Apple Silicon Mac at some point and to put Asahi Linux on it. :) I just don't think that the counterargument is completely spurious. Craig Federighi taking the stand in court and saying that Mac security is at a place they "don’t find acceptable" doesn't exactly make me feel all warm and fuzzy about Apple's future plans. And so if someone says t…

Well, there's always the part where trying to lock down existing devices would run afoul of various consumer protection and warranty laws. Sony already got sued and lost for locking down the PS3, and this would be a much higher profile case, especially once Asahi Linux gets to the point where we have a significant user base...

Apple could certainly choose to lock down future Mac iterations (though I don't think they will), but I think fears that they might retroactively lock down existing Macs are just unfounded and ignore the realities of the situation.

Of course people are free to buy or not buy machines for whatever reason; that's why I want everyone to be informed about the details. My beef is with those who disagree with this stance, and think people shouldn't buy these machines period because Apple is evil and those who buy their devices sheep, and anyone who thinks otherwise is mistaken, and there is no room for having different priorities when choosing hardware because Freedom™ is the only priority that matters. For whatever definition of Freedom™ they feel like using that day.

Re: How Secure Boot Works on M1 Series Macs

#103

Earlier quoted context omitted.

The screw hasn't been a thing for years, you prove ownership by sitting there for like 15 minutes pressing the power button when told :D But it's a lot more than just "go ahead". For stock users: enabling dev mode wipes storage and reinstalls CrOS, so trying to "attack" via dev mode a) won't give the attacker any data and b) will be extremely noticeable because the data is gone (and there will also be dev warning scr…

Thanks for pointing this out. My Chromebook is from the era when they still had a screw... :-) Can you recover a modern Chromebook that has had all of its Flash memories tampered with or wiped externally, with just a USB cable? With a debug cable? That seems to be one of the major things that sets apart iDevices from others. At least this design doc still says local attacks involving e.g. replacing writable storage a…

Yes, with a cable that connects to SBU pins: https://chromium.googlesource.com/chromiumos/third_party/hdc...

(if you have unlocked CCD and didn't lock yourself out of it — you could e.g. forget the password)

you can do whatever you want using flashrom with the SPI flash chips for both AP and EC.

> this design doc

Hmm, there's no timestamp for the page itself but the picture attachments are dated 2009.

> Cr50 RW storage can be recovered from the RO loader by using a physical USB-UART cable

That sentence sounds weird, not sure why it wouldn't be recoverable via the SBU cable — the RO firmware is just an earlier build of the same firmware that does offer the GSC/Cr50 UART among its consoles via SBU.

I'm not going to check though :D

> how the RO firmware is authenticated

According to OSFC presentation https://2018.osfc.io/uploads/talk/paper/7/gsc_copy.pdf

"RO public key in ROM, RW public key in RO" so they thought of that, the root of the root of everything is truly immutable silicon.

> e.g. glitching the Boot ROM

There are likely measures against this, since this is a "secure chip" designed in modern days by Google rather than some shitty vendor. But either way, attaching probes for voltage-glitching the root of trust is far beyond the capabilities of the proverbial "evil maid" :) And the glitching question should apply to Apple and whoever else as well.

> any end user with no specialized knowledge can follow a few simple documented steps with another machine and a USB cable and an app in the App Store (or idevicerestore) to fully, securely, and confidently restore all the writable firmware

What Google does for the "normal people" AP flash recovery: only the RW CBFS partition is writable from the AP, and for recovery it boots from an RO partition: https://doc.coreboot.org/security/vboot/index.html#recovery-... (there's a theme to everything the CrOS team does haha… surprise, the EC also uses the RO+RW mechanism)

Yes, this doesn't protect against the "I'm a normal regular user with no debug access and someone desoldered my SPI flash, tampered with it and soldered it back" but… come on :) Especially considering hard-to-open laptop cases and WSON-8 flash chips, that's just a ridiculous scenario to care about.

Re: How Secure Boot Works on M1 Series Macs

#104

Earlier quoted context omitted.

Just to follow up, it's about 16 seconds on a MacBook Air. 7 seconds of that are iBoot, and 9 are macOS. If you turn off the startup chime sound (which is a checkbox in system settings), that cuts out 2 seconds of iBoot time and makes it 14 seconds total. For comparison, a ThinkPad X230 running Arch takes 7 seconds to GRUB (which I skipped through as fast as possible), FDE unlock prompt at the 12 sec mark, and after…

> If you turn off the startup chime sound (which is a checkbox in system settings), that cuts out 2 seconds of iBoot time and makes it 14 seconds total. Lol, wait, so the startup chime blocks the rest of the boot process?! I would have expected the system to be working on booting while the chime was playing. Now I'm not sure whether I should keep the chime turned on. I like the chime, but I'm not sure I want to pay t…

I think it's mostly that by the time the system is ready to play the chime, it takes less than two seconds to do whatever is left before transferring control to iBoot2, and of course you can't leave audio playing as you call a new piece of code... so even if the playback happens in the background, it would still have to wait for it to finish.

Re: How Secure Boot Works on M1 Series Macs

#105

Earlier quoted context omitted.

Thanks for pointing this out. My Chromebook is from the era when they still had a screw... :-) Can you recover a modern Chromebook that has had all of its Flash memories tampered with or wiped externally, with just a USB cable? With a debug cable? That seems to be one of the major things that sets apart iDevices from others. At least this design doc still says local attacks involving e.g. replacing writable storage a…

Yes, with a cable that connects to SBU pins: https://chromium.googlesource.com/chromiumos/third_party/hdc... (if you have unlocked CCD and didn't lock yourself out of it — you could e.g. forget the password) you can do whatever you want using flashrom with the SPI flash chips for both AP and EC. > this design doc Hmm, there's no timestamp for the page itself but the picture attachments are dated 2009. > Cr50 RW stora…

Tell that to all the governments who keep trying to get Apple to break into their own devices... It's not ridiculous at all, the NSA does this all the time (supply chain intervention). And WSON-8 really isn't that hard to swap, a hot air rework station will do it in a couple minutes. I've done much worse than that ;)

Good to hear the RO partition is also authenticated, though. My mention of glitching was mostly around whether there was trust placed in Flash at any point, since then a one time glitching attack could compromise the machine. You could still brick it by screwing up RO, but at least not compromise it. And again, those attacks aren't nearly as hard as you think. People have productionized these things for console modchips; that's at the level where someone with a cheap soldering iron can do it.

This section details the borked RW recovery scenario, and as far as I can tell refers to using a physical UART only, not the USB one: https://chromium.googlesource.com/chromiumos/platform/ec/+/c...

As for chip design, I'm sure Google did a better job than most random vendors (they all keep making the same mistakes...), but Apple has been doing chip security for much longer so they also have had quite a lot of time to build up experience in this area. I would trust Apple's chips over Google's (at least design quality wise), and I say this as a xoogler ;)

Actually, I think I can come up with an apt comparison. Google has crazy good production system security, probably better than anyone else; they've just been doing it for long enough, have been targeted by governments (China incident, NSA wiretaps), and have the motivation to just keep pushing things forward. Apple is on a very similar level with system/silicon security, in part for similar reasons. They're both just in their own league in those categories.

Re: How Secure Boot Works on M1 Series Macs

#106

Earlier quoted context omitted.

Yes, with a cable that connects to SBU pins: https://chromium.googlesource.com/chromiumos/third_party/hdc... (if you have unlocked CCD and didn't lock yourself out of it — you could e.g. forget the password) you can do whatever you want using flashrom with the SPI flash chips for both AP and EC. > this design doc Hmm, there's no timestamp for the page itself but the picture attachments are dated 2009. > Cr50 RW stora…

Tell that to all the governments who keep trying to get Apple to break into their own devices... It's not ridiculous at all, the NSA does this all the time (supply chain intervention). And WSON-8 really isn't that hard to swap, a hot air rework station will do it in a couple minutes. I've done much worse than that ;) Good to hear the RO partition is also authenticated, though. My mention of glitching was mostly aroun…

Is on-chip flash really that much more vulnerable to glitching than on-chip RAM, the CPU registers, etc.?

Re: How Secure Boot Works on M1 Series Macs

#107

Earlier quoted context omitted.

I 100% agree with you and have argued the same point! I expect to get an Apple Silicon Mac at some point and to put Asahi Linux on it. :) I just don't think that the counterargument is completely spurious. Craig Federighi taking the stand in court and saying that Mac security is at a place they "don’t find acceptable" doesn't exactly make me feel all warm and fuzzy about Apple's future plans. And so if someone says t…

Well, there's always the part where trying to lock down existing devices would run afoul of various consumer protection and warranty laws. Sony already got sued and lost for locking down the PS3, and this would be a much higher profile case, especially once Asahi Linux gets to the point where we have a significant user base... Apple could certainly choose to lock down future Mac iterations (though I don't think they…

I think the irony would be less dramatic if the free software wasn't running on hardware constructed with slave labor. Put your eggs in whichever baskets you choose, but people's worries about the conflict of interests here is fully justified. Apple and open source are not friends, and while they'll be happy to tip their hat every once in a while (much like Microsoft's platitudes with WSL and GitHub), their ultimate goal is to stomp you out and expand control. Once again, nobody here has much interest in stopping you here; just don't be surprised when your blood, sweat and tears ultimately end up being used to grease the gears of their production line. We're talking about a trillion-dollar company that doesn't release their own device drivers or schematics; it's ridiculous that we even need to finish the job for them in the first place. It's hard to see this work as "noble" in the same way other free software projects are, at least to me.

Re: How Secure Boot Works on M1 Series Macs

#108

Earlier quoted context omitted.

Tell that to all the governments who keep trying to get Apple to break into their own devices... It's not ridiculous at all, the NSA does this all the time (supply chain intervention). And WSON-8 really isn't that hard to swap, a hot air rework station will do it in a couple minutes. I've done much worse than that ;) Good to hear the RO partition is also authenticated, though. My mention of glitching was mostly aroun…

Is on-chip flash really that much more vulnerable to glitching than on-chip RAM, the CPU registers, etc.?

No, it's just Flash so it's a point of persistency. If you rely on on-chip flash integrity for security, a one-time glitch can compromise the system forever. If you rely on it for availability, then a random glitch (or even just cell decay) can brick your system forever.

Re: How Secure Boot Works on M1 Series Macs

#109

Earlier quoted context omitted.

Well, there's always the part where trying to lock down existing devices would run afoul of various consumer protection and warranty laws. Sony already got sued and lost for locking down the PS3, and this would be a much higher profile case, especially once Asahi Linux gets to the point where we have a significant user base... Apple could certainly choose to lock down future Mac iterations (though I don't think they…

I think the irony would be less dramatic if the free software wasn't running on hardware constructed with slave labor. Put your eggs in whichever baskets you choose, but people's worries about the conflict of interests here is fully justified. Apple and open source are not friends, and while they'll be happy to tip their hat every once in a while (much like Microsoft's platitudes with WSL and GitHub), their ultimate…

sigh here we go again.

> I think the irony would be less dramatic if the free software wasn't running on hardware constructed with slave labor.

Why do you feel the need to direct criticism of Apple's business practices at me? I do not work for Apple.

> but people's worries about the conflict of interests here is fully justified.

Then don't buy the machines and move on with your life?

> Apple and open source are not friends

Neither are they enemies. The world isn't binary. I do not exclude from my life everything that is related to everyone who isn't explicitly my friend, do you?

> their ultimate goal is to stomp you out and expand control

Ah yes, stomp us out by... building machines we can use to run our own OS? They could've just not done that and we wouldn't exist.

> just don't be surprised when your blood, sweat and tears ultimately end up being used to grease the gears of their production line.

So which is, are they going to stomp us out or are they going to embrace the extra business we bring? You can't have it both ways, you know.

> We're talking about a trillion-dollar company that doesn't release their own device drivers or schematics; it's ridiculous that we even need to finish the job for them in the first place.

I find it fun finishing the job for them. This is exactly the kind of project I enjoy doing. If you don't, then choose a different free software to contribute to.

> It's hard to see this work as "noble" in the same way other free software projects are, at least to me.

So our project is inherently morally inferior to others because you simultaneously think Apple should've done the work for us and Apple are our enemies. ????????

Seriously, this makes no sense. You know Linux itself started out as a hobby OS with no corporate backing and tons of other drivers are reverse engineered, right? Do you also think Nouveau isn't noble? What about LineageOS? What about XBMC/Kodi when it started? Freedreno, Panfrost, and friends? All of those projects are or were about bringing free software to devices designed and manufactured by giant corporations without any support.

Heck, I got sued by a multinational for bringing Linux back to the PS3, and I still don't regret it. That work got upstreamed, by the way.

Re: How Secure Boot Works on M1 Series Macs

#110

Earlier quoted context omitted.

I 100% agree with you and have argued the same point! I expect to get an Apple Silicon Mac at some point and to put Asahi Linux on it. :) I just don't think that the counterargument is completely spurious. Craig Federighi taking the stand in court and saying that Mac security is at a place they "don’t find acceptable" doesn't exactly make me feel all warm and fuzzy about Apple's future plans. And so if someone says t…

Well, there's always the part where trying to lock down existing devices would run afoul of various consumer protection and warranty laws. Sony already got sued and lost for locking down the PS3, and this would be a much higher profile case, especially once Asahi Linux gets to the point where we have a significant user base... Apple could certainly choose to lock down future Mac iterations (though I don't think they…

> Well, there's always the part where trying to lock down existing devices would run afoul of various consumer protection and warranty laws. Sony already got sued and lost for locking down the PS3, and this would be a much higher profile case, especially once Asahi Linux gets to the point where we have a significant user base...

That's a really good point I hadn't thought of!

Post reply on HN