13 ms·
What is an SBAT and why does everyone suddenly care
- pas 2y agois it possible to update grub from Windows? or is it enough to disable secure boot, boot Linux, upgrade, reenable?
- dwattttt 2y agoI wouldn't try update grub from Windows, but the second strategy would work.
- zokier 2y agoI don't see why you couldn't update grub from Windows, its just EFI binary in ESP after all.
- mjg59 2y agoDistro grub is signed by the distro rather than Microsoft, so coordinating that would be extremely difficult
- ab71e5 2y agoWhy? You could just copy the binary and signature to your EFI partition from Windows? What am I missing here?
- cesarb 2y agoFrom what I understood, the parent's question is not about Microsoft updating grub; it's about a person hit by the bug, and thus in a situation where Windows boots but Linux doesn't, using Windows to copy the correct file (probably extracted from an updated package from the Linux distribution they're using) to the correct place in the EFI partition by hand. (The first obstacle would be that AFAIK the EFI isn't mounted by default on Windows, but I believe it should not be hard to tell Windows to mount it and give it a drive letter.)
- zx8080 2y agoMS could just sign it with whatever three-letter agency certificate they usually cooperate with. /s
- rwmj 2y agoI really hate the error message from shim (or SB in general) when a security check fails. At tell me what exactly failed and what I could do to fix it.
- xnzakg 2y agoSeems to be a general trend in a lot of software nowadays. Vague error messages telling you "Something went wrong" with no additional details.
- immibis 2y agoIt's not a new trend - error-code based software would propagate that ERROR_INVALID_PARAMETER all the way from the function with the invalid parameter back out to the return value of the user operation, then helpfully tell the user "Invalid parameter!" Exceptions with string messages and full stack traces might be yet another underrated Java invention.
- chuckadams 2y agoDr Watson is still a thing for getting tracebacks. Doesn’t work for kernel mode of course, but most things don’t.
- immibis 2y agoDo you ask your users to run some weird debug tool when the dialog box says "Invalid parameter!" Does it help? The stack trace at the point where the dialog box is displayed is useless.
- ziml77 2y agoGod that error is nearly useless even to the developer. Last couple of times I've gotten it, I've dropped the DLL that the error originates from into Binary Ninja and run the debugger to figure out which parameter failed a check.
- ack_complete 2y ago
- mtlmtlmtlmtl 2y agoThis sort of thing is exactly why I have automatic updates disabled on my Windows partition. I've been burned so many times by bad Windows updates breaking stuff. My favourite is when stuff breaks during the "configuring updates" stage after a reboot, leaving Windows in a boot loop with no error codes or anything to help you figure it out. And of course the documentation from MS is utter garbage. Most of the time the only solution I found was to reinstall Windows. Now I always google around a bit before applying any fresh Windows updates to see of there's any breakage reported.
- detourdog 2y agoThe last time I had to manages windows I used Unattended to wipe and re-install to a base level. I found that diagnosing and troubleshooting was not worth the effort. https://tgup.net/ https://tgup.net/
- gcr 2y agoHow does tgup compare to ninite? The latter seems more polished and older/stable, with more software available. https://ninite.com/ https://ninite.com/
- 1oooqooq 2y agoif you're at a point you need either of them, just hire someone too work on the oem scripts. for personal use, not really worth it imo if you're installing the right version of windows (Enterprise ltsc) it's already one click install. and your applications will change every week anyway.
- detourdog 2y agono idea. This was the early 2000s. I'm sure it's based on the same thing. I set-up a netbsd box as the server and could hook up as many laptop as I had network ports. I would then just hit the enter key or perform a few manually steps when things couldn't be automated. I'm sure it's all based on silent install or the /s switch for install.bat. If my memory is working.
- 2y ago
- tannhaeuser 2y agoAlthough MS' stance to block old vulnerable grub installs seems reasonable here, I've come to run Windows only for games and a single piece of legacy software (as a backup for my aging x86 Mac) without net access at all. The moment you allow Win updates, everything is up to chances. MS moving around registry keys and other shenanigans to force "telemetry" (aka ads and behavioral data scanning for ML) onto users, even on Windows Pro, should be telling enough. Needless to say, I'm running Win 10.
- zokier 2y agoMajor question for me is, are the grubs that are getting rejected completely unpatched, or were they patched by distros without updating the "security generation"? I'd be also really curious to hear how MS was attempting to do dual-boot detection, I hope someone (more skilled than I) would reverse engineer that bit from the update.
- ChocolateGod 2y ago> Major question for me is, are the grubs that are getting rejected completely unpatched, or were they patched by distros without updating the "security generation"? Reading into https://www.gnu.org/software/grub/manual/grub/html_node/Secure-Boot-Advanced-Targeting.html https://www.gnu.org/software/grub/manual/grub/html_node/Secu... It's possible it's both? > I'd be also really curious to hear how MS was attempting to do dual-boot detection I'm in the boat that they shouldn't doing dual boot detection at all, it sounds like everyone agreed to use SBAT to stop vulnerable bootchains from being exploitable and some Linux distributions got caught slacking.
- ploxiln 2y agoI agree, this is the key question. It seems like all the distros, and microsoft, need to coordinate on the "security generation", whenever grub (or other linux boot component) releases an update or patch? Maybe that's an extra annoyance they didn't have before, so until now they just left that number alone, and kinda forgot about it?
- mzhaase 2y ago[dead]
- notarealllama 2y ago<Tinfoil hat> I think there's more than meets the eye here. I think part of the reason MS is enforcing TPM2.0 and now this SBAT update is that there is widespread rootkit level malware and they are trying to stay ahead of the curve. </Tinfoil hat> When it comes to the realities of dual-booting, I had tons of problems with Win7/8/10 with suspend-to-hiberfile.sys issues and updates 10 years ago breaking grub. 10 years ago I finally decided, "You know what, I'm just going to run Linux, if I really need Windows or Mac, I can run a VM or use a separate spare computer." Since then I have successfully setup Secure Boot for my distro, learned how to tweak QEMU for performance and passthrough, got a working QEMU macOS VM (although having to update every few months to keep XCode working is a pain), and generally pretty happy with the state of affairs.
- blueflow 2y ago> widespread rootkit level malware and they are trying to stay ahead of the curve Microsoft is within US-legislation. So a three-letter agency already has the keys and their spyware is a signed UEFI module.
- gruez 2y ago[flagged]
- 0l 2y agoCertificate transparency is intended to solve this issue.
- brookst 2y ago[flagged]
- HideousKojima 2y agoThe Snowden leaks made it clear that so long as the government has the means and motive to perform some kind of surveillance, they'll do exactly that. It may not be through the exact methods people are suggesting, but rest assured it is happening.
- ab71e5 2y ago> Microsoft's stated intention was that Windows Update would only apply the SBAT update to systems that were Windows-only, and any dual-boot setups would instead be left vulnerable to attack until the installed distro updated its grub and shipped an SBAT update itself. I wonder what went wrong here? If you would read the EFI boot order it would clearly say to boot shim first? Or were these dual boot setups where the user would use the firmware menu to select linux or windows? Anyway this comes at a time when I want to install linux on my work PC, since it has two nvme slots I think I'll go with installing it on a completely separate drive. Would have not prevented this issue though, which seems a legitimate fix from microsoft, just bad communication.
- TiredOfLife 2y agoPeople that dualboot are probably also people that run random debloat scripts that disable telemetry. So when such system broke there was no signal it happened.
- HumblyTossed 2y agoDoubtful. I don't.
- iam-TJ 2y agoFrom the people reporting this affecting their Linux boots in various IRC/Matrix forums and my diagnostics with them, very often they weren't dual-booting in the Microsoft sense, in that they were booting using the UEFI Removable Media Path so there was no entry in the motherboard firmware's Boot menu. I suspect the MS installer simply scans the EFI BootXXXX entries and looks for a non-Windows boot-loader path like, for example, /EFI/$distro/shimx64.efi If one-such doesn't exist the installer likely assumes it is not a dual-boot system.
- HumblyTossed 2y agoMS has zero vested interest in caring. If they brake booting for Linux users, how does that hurt them in any meaningful way? Sure they get some press, but is it bad press if most people are never affected by this?
- gradschoolfail 2y agohttps://archive.ph/PePOh https://archive.ph/PePOh Secure Boot Advanced Targeting
- kuon 2y agoIsn't secure boot the first thing you disable when you install linux?
- genpfault 2y agoSure is if you want to hibernate!
- dripton 2y agoI installed Linux on a new laptop yesterday, and couldn't get either NixOS or Debian to install until I turned off secure boot. So I guess these distros don't bother getting every release signed by Microsoft. At least it was easy to turn off. I just wish the error message mentioned Secure Boot -- it took me a few minutes to figure out what was wrong. At first I thought I had a corrupt USB stick or something.
- hiimshort 2y agoYou can set up secure boot on NixOS with lanzaboote: https://github.com/nix-community/lanzaboote https://github.com/nix-community/lanzaboote
- teddyh 2y agoYou don’t always have to disable Secure Boot; it usually works with just changing some “OS Type” from “Microsoft” to “Other”.
- cesarb 2y agoThere are two separate Secure Boot keys Microsoft uses: one which they use to sign Windows, and another which they use to sign everything else (the "Microsoft 3rd Party UEFI CA"). AFAIK, some recent laptops with Windows preinstalled come by the default with the second one disabled in the BIOS (it's a new Microsoft requirement). To install Linux on these laptops without disabling Secure Boot, you have to go into the BIOS and enable that key.
- wilsonnb3 2y agoDepends on the distro, Fedora for example works with secureboot enabled. If you are using Nvidia graphics you have to deal with signing the kernel drivers but it is pretty easy, AMD or Intel works out of the box.
- hypeatei 2y ago> because otherwise they're shipping a vector that can be used to attack other operating systems and that's kind of a violation of the social contract I see the end of the chain still ends up at "trust" in humans/companies at some level. Microsoft broke dual boot systems because they think they know what's best for someone else's system and that's not okay.
- deleted 2y ago[deleted]
- Hydrocarb0n 2y agoIMO secure boot is a waste of time for most scenarios, if theres closed source EUFI code running god knows what in the background, it dosn't matter how signed and secure your OS kernel is. Ive never been sucessfully able to dual boot windows and linux on a mobo with secure boot turned on, it seems that is a feature not a bug I'm sure MS would never influence hardware vendors to make it dissadvantage a growing number of linux users.
- 1oooqooq 2y agoagree its a waste of time, but we pay the paranoid cost is special occasion. it does make breaking FDE just a little bit more annoying/expensive. the only time it's worth the hassle for we to enable it: travel to the USA, Russia and most of africa (if the country have USA backed airport security, like uganda). pause updates, enable secure boot with a disposable key we don't store anywhere. that on top of the usual FDE with plausible deniability dual boot. but we still prefer to just fly contributors with blank devices if we can.
- wongarsu 2y agoTLAs from major powers probably have backdoors in your UEFI, mainboard or OS. But even if they do that doesn't mean they will use them on everyone, they probably keep the good stuff for the most valuable cases. Each use of an attack carries the risk of the attack vector being discovered and prevented in the future. And besides, there are threat actors besides TLAs of the USA, Russia and China. If you use full disk encryption secure boot is pretty essential, otherwise an attacker can modify the code that asks for your credentials to also log them somewhere easily accessible, circumventing your entire encryption. If you don't do full disk encryption it's still a decent protection against some bootkits. It can absolutely be more trouble than it's worth. It's not that useful in most desktop computers. But if you are traveling with a laptop it's probably worth some effort to keep secure boot working on that system (and make it more difficult to disable)
- mordae 2y agoIf I am ever traveling to US, I am wiping the system, installing a clean, stock Linux distribution without any encryption, keeping everything valuable at home. Once I am behind the border, I am reinstalling the system with encryption, then proceed to download key material and other important stuff from home over the internet. I am never letting anyone near my unlocked laptop and if I ever find it turned off e.g. while visiting office toilet, I just assume it has been infected with firmware level rootkit and I am wiping it without decrypting. If it's removed from my sight during the border check, I assume the same, purchase a new one in a brick-and-mortar shop and sell the infected one when I am back home.
- pjc50 2y agoSomething seems to be wrong with the whole security model. > those versions of grub had genuine security vulnerabilities that would allow an attacker to compromise the Windows secure boot chain This feels like a "my secure compartments are all connected together" moment. If Microsoft want to verify that they're in an all-Microsoft boot chain, sure, whatever, fine. But somehow the compromise of any loader allows compromise of Windows? And in turn Microsoft are able to break grub installations? Why is that acceptable? (also, I feel a bit "I told you so" about this. Back when all this was being introduced I felt that (a) secure boot increases the risk of locking you out of your machine and/or data loss and (b) a situation where Linux is dependent on the collaboration of Microsoft in order to boot is very dangerous long-term.)
- eightysixfour 2y ago> This feels like a "my secure compartments are all connected together" moment. If Microsoft want to verify that they're in an all-Microsoft boot chain, sure, whatever, fine. But somehow the compromise of any loader allows compromise of Windows? Exactly how would you propose starting software securely from an unknown environment? > Back when all this was being introduced I felt that (a) secure boot increases the risk of locking you out of your machine and/or data loss So does a password and encryption.
- skywhopper 2y ago> Exactly how would you propose starting software securely from an unknown environment? Accept that it’s impossible?
- wongarsu 2y agoSo don't do secure boot at all rather than saying "when one step in the boot chain is compromised that can compromise all later steps"? How is that a better security model?
- eightysixfour 2y agoOkay, so then you need to know the environment, which leads us to secure boot. It isn't perfect, but it is better than nothing.
- teekert 2y agoA recent Linux Unplugged episode went into how one can use the TPM to set up a secure and trusted chain of trust for the booting process on Linux [0] using Clevis [1], very interesting! [0] https://linuxunplugged.com/572 https://linuxunplugged.com/572 [1] https://fedoramagazine.org/automatically-decrypt-your-disk-using-tpm2/ https://fedoramagazine.org/automatically-decrypt-your-disk-u...
- tostiheld 2y agoThe "new" way of doing this would be using systemd-cryptenroll [0]. I did this recently on Ubuntu 24.04. I actually tried the default LUKS+TPM shipped with Ubuntu 24.04 at first [1], but it was a bit disappointing because it locks you into using snap-based kernels. This means you cannot install custom DKMS modules (which I needed). Although Clevis is very interesting software (you can even unlock based on some other computer in your network [2]), it's not absolutely required anymore for LUKS+TPM. [0] https://fedoramagazine.org/use-systemd-cryptenroll-with-fido-u2f-or-tpm2-to-decrypt-your-disk/ https://fedoramagazine.org/use-systemd-cryptenroll-with-fido... [1] https://ubuntu.com/blog/tpm-backed-full-disk-encryption-is-coming-to-ubuntu https://ubuntu.com/blog/tpm-backed-full-disk-encryption-is-c... [2] https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/security_hardening/configuring-automated-unlocking-of-encrypted-volumes-using-policy-based-decryption_security-hardening https://docs.redhat.com/en/documentation/red_hat_enterprise_...
- dathinab 2y agoI do something similar on all my laptops: - have custom secure boot platform key - use a unified kernel image (UKI) which means I directly boot the kernel from efi (and place it in the efi partition) - sign the image with that platform key (I use sbctrl) - have every thing else including swap partition for hybernation fully disk encrypted, I could set it up to auto unlock using TPM2 but I would recommend using a long password. TPM2+password would be optimal. There had been too many cases of leaky TPMs and especially on a laptop you don't want to fully rely on it (through you in turn could decide to auto login if PCRs are unchanged, or login using only the (often not so secure) fingerprint reader etc.) - efi password, I mean if you don't set that you lose most secure boot benefits... EDIT: Not really most, there is still a bunch of ways it helps but it's anyway a bad idea to rely on secure boot and not have a efi password As bonus tip: - include the vfat in your initramfs (i.e. `MODULES=(vfat)` in `/etc/mkinitcpio.conf`) if your booting kernel and installed kernel modules ever mismatch that is nice to have to fix the issue
- teractiveodular 2y agoMildly disappointed that this wasn't about CBAT. https://www.sportskeeda.com/pop-culture/who-hudson-mohawke-dj-goes-viral-cbat-song-sparks-hilarious-memefest-online https://www.sportskeeda.com/pop-culture/who-hudson-mohawke-d...
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- skywhopper 2y agoInteresting. The question that immediately popped into my head was: How does the secure boot system determine the “security generation” of GRUB exactly? Sounds like just based on the assertion of GRUB itself (and trusted signature of the distribution that built GRUB)? The fact that the list of allowed GRUB versions is itself manageable via a Windows Update points to some other issues with this particular security scheme, given Microsoft’s own recent history of mishandling private keys.
- dist-epoch 2y agoIt goes the other way too. An Ubuntu Update could put the Windows bootloader on the deny list.
- wolrah 2y ago> It goes the other way too. An Ubuntu Update could put the Windows bootloader on the deny list. I don't think this is generally true. Since most computers don't ship with Ubuntu's CA directly trusted their signed components rely on a chain of trust that goes up through Microsoft's 3rd party UEFI CA cert to their root. I don't know the specific details of UEFI's implementation but it seems incredibly unlikely that it'd allow a subordinate CA to sign an update that distrusts components upstream of it. If an OEM does ship Ubuntu's root or if a system owner has manually installed it then sure, but that's not the majority of systems.
- stonethrowaway 2y ago> Short version: Secure Boot Advanced Targeting and if that's enough for you you can skip the rest you're welcome. Based. Unfathomably based.
- deleted 2y ago[deleted]
- spathi_fwiffo 2y agoagree; defined long acronym immediately in article. i'll probably read the test, but that's some high quality posting from the get-go!
- superkuh 2y agoHere is a mirror for anyone else getting blocked* by dreamwidth for not using a corporate browser: https://web.archive.org/web/20240822091216/https://mjg59.dreamwidth.org/70348.html https://web.archive.org/web/20240822091216/https://mjg59.dre... * No matter how many times I do the captcha.
- offmycloud 2y agoThank you. I had a similar problem in Firefox 129.0.2 on Linux.
- fuzzer371 2y agoSo it's a linked list
- Animats 2y agoDoes this interfere with wiping Windows from a system and installing Linux? Or does installing Windows contaminate the TPM module permanently?
- cesarb 2y ago> Or does installing Windows contaminate the TPM module permanently? It's not the TPM, it's a simple UEFI variable. AFAIK, there's a way in the BIOS to reset all these variables to their original default value, though you might have to use the "clear CMOS" jumper to do it.
- Animats 2y ago> though you might have to use the "clear CMOS" jumper to do it. So installing Windows can break a computer for Linux. That's a great antitrust issue. Microsoft should be fined for that.
- Bognar 2y agoIt's almost like you didn't read the article. Anyone can increment the variable, and both MS and the Linux communities agreed on the solution. How dare Microsoft operate within the bounds of an agreed-upon industry standard, what a monopoly!
- userbinator 2y agoObviously people might screw up, but the spec included a way to revoke any signed components that turned out not to be trustworthy "trustworthy" according to who? Remember that dystopia does not appear spontaneously, but steadily advances little-by-little. What's the summary? Microsoft (understandably) didn't want it to be possible to attack Windows by using a vulnerable version of grub that could be tricked into executing arbitrary code and then introduce a bootkit into the Windows kernel during boot. Microsoft did this by pushing a Windows Update that updated the SBAT variable to indicate that known-vulnerable versions of grub shouldn't be allowed to boot on those systems. Who is Microsoft to decide what others do on their machines? Should they have the right to police and censor software they have no control of? In the spirit of Linus Torvalds: Microsoft, fuck you! We are seeing the scenario Stallman alluded to over 2 decades ago slowly become a reality. He wasn't alone either. https://www.gnu.org/philosophy/right-to-read.en.html https://www.gnu.org/philosophy/right-to-read.en.html https://www.cl.cam.ac.uk/~rja14/tcpa-faq.html https://www.cl.cam.ac.uk/~rja14/tcpa-faq.html Things like TPM and "secure" boot were never envisioned for the interests of the user. The fact that it incidentally protects against 3rd party attacks just happened to be a good marketing point. "Those who give up freedom for security deserve neither."
- palisade 2y agoI guess in their defense the same attack can be used against any other OS so they're unintentionally protecting Linux as well, since they stated this was supposed to be a Windows-only system change. You can disable secure boot if you don't want to be secure. And, there is a way to disable the SBAT policy and keep secure boot if you want that, which is also insecure. Disable Secure Boot, login, sudo mokutil --set-sbat-policy delete, reboot again, re-enable secure boot. But, then you're susceptible to the attack. I think understandably, everyone is concerned because it felt like an affront by MS against Linux. But, I don't think that was their thought process at all.
- thwarted 2y ago> I think understandably, everyone is concerned because it felt like an affront by MS against Linux. But, I don't think that was their thought process at all. Given Microsoft's history, it's hard to really be sure. It's been a quarter century since The Halloween Documents and Microsoft definitely gives the air of contributing to the open source ecosystem today, but giants like having a big moat to defend, and old habits die hard. And Microsoft definitely has a reputation, even if, technically, undeserved.
- elendee 2y agoThis hit me 2 days ago as I was shuffling dual boot systems around trying to recover some old data for a client. Kind of hilarious timing tbh, right after I was done laughing arrogantly about CrowdStrike
- heelix 2y agoYah, I got hit by this as well. Was pulling some stuff off of windows, it updated overnight, rebooted, and I woke up to my default Ubuntu boot being horked. A bit of a WTF till I started searching for it. I'll be backing up and leaving that box as Linux + a vm.
- franga2000 2y agoI don't understand what the expected behaviour is here? Let's say you dual-boot two copies of Arch so we don't drag M$ into this. You update one, get the latest bootloader update that increments this security generation thingy. You reboot to go update the other one as well but its number is too low, so it's unbootable. What now?
- jeroenhd 2y agoThat's why you wait a while before raising the SBAT requirements, so both of your distros can be updated. Microsoft waited two years, for instance.
- glandium 2y agoFun fact. Just as this story was unfolding, I was installing a Debian system on an Acer desktop machine. The Debian installer wouldn't start with secure boot enabled because of this, but also, once I fixed up things, I couldn't get the firmware to recognize any entry added by Debian. It would hide and deactivate them on its own. I ultimately had to use a copy of the EFI partition on a USB key for it to work.
- CodeVenturer 2y ago[dead]
- fortran77 2y agoAll I can think of is choral music arrangements.
- MELEKE 2y ago[dead]
- SixDouble5321 2y agoEasy answer: say no to Microsoft and TPMs. You can buy a computer with Linux installed, today! Ubuntu is easy, so is kubuntu. You can do anything on Linux that you can do on windows and most of the time it's child's play. The past is the past, give up on windows.
- deleted 2y ago[deleted]
- donnaalbert 2y ago[dead]