Email or username:

Password:

Forgot your password?
Top-level
Lennart Poettering

And it's a shame that commercial distros do not hook into that, and the boot stack of them hasn't changed in more than a decade, is laughably bad at security (unsigned initrds, ffs!) and robustness, and the if you have boot assessment enabled at all turn it into a fantastic DoS (by showing you a boot menu instead of reverting to a working boot choice).

19 comments
David Haller

@pid_eins Is there any distro that has implemented automatic boot assessment, as you suggested?

makefu

@raito @david There were a number of Pull Requests for this feature (one implementation was even merged to master for 20 minutes) but none is currently available, no? I'd really love to use this feature, just today one of my boxes would have been saved by that 👍

Raito Bezarius

@makefu @david for UKI, it was already available, for normal NixOS usecases, yes, it was merged recently but I have been using it for a while

karlggest

@david
Any inmutable. All of them works this way by design.
@pid_eins

Lennart Poettering

@karlggestd @david not really true. The ones that use systemd-boot migth, but boot counting in grub is pretty useless and manual if you ask me.

karlggest

@pid_eins @david wow, My mistake, I assumed that Aeon was the most delayed project (they are with the latest RC).

christian mock

@pid_eins @karlggestd @david You can do it, but it is involved. But basically, using BootNext entries in EFI and only setting the fixed boot order after the system is booted is what I implemented for an immutable digital signage project.

Bou

@karlggestd @david @pid_eins Fedora Silverblue doesn't, according to my experience.

Eric Curtin

@david @pid_eins Yes there are distros and commercial distros that hook into that RHEL for Edge and Red Hat In-Vehicle Operating System automatically rollback after a number of failed boots. Any rpm-ostree/ostree/bootc based OS is capable of it.

poleguy

@pid_eins I'm not disagreeing. It makes me wonder how you would categorize/assess/mitigate the security and operations risk of having a system that's supposed to be on one kernel fall back to a previous one?

Lennart Poettering

@poleguy the way automatic boot assessment with systemd works is that on each boot we make one of three assesments: "good", "bad", "dontknow". If we make the "bad" assessment we'll count down the entry's counter (and if it ist zero we give up on it in the future). if we make the "good" assessment we'll drop the counter entirely from the entry, marking it as good for basically all eternity. If we do "dontknow" we don't do a thing

Lennart Poettering

@poleguy this means that a bad actor can play games with us until the point we managed to do one boot that worked correctly, but from that point on, we'll never regress anymore.

I like to believe that that's quite a sensible and simple policy that should work for most cases. It balances robustness against chance for attackers to hold off updates indefinitely.

poleguy

@pid_eins thanks. That does seem reasonable and for remotely managed systems and better than the alternative, which is manual intervention. I worry a smidge about added complexity. I can't shake the feeling that we keep adding layers of complexity to our systems. It feels okay to add complexity that is proportional to the complexity of the problem being solved. In this case it seems sane. However these remotely managed systems all tend to have out of band methods to recover already, no?

Sheogorath 🦊

@pid_eins but would this really prevent it, when the configuration of a kernel driver goes bad? If I understand things correctly here (big if), only if you store that config in a volume that can be reverted it would be possible to fix the issue.

Otherwise you boot into the emergency shell and you are non the wiser than Windows systems are right now.

And given it's an endpoint protection that is supposed to react pretty instant to changes, I don't see how you would get theses in the A/B update.

Lennart Poettering

@sheogorath on linux drivers dont really have a "configuration" per se. At least not much you pass into the early, risky parts of the boot process. Subsystems might have some config. In a systemd world you wrap the im authenticated/signed PE addons or confext images, and those you drop next to a specific kernel image, thus you can revert them together as one or update as one and so on. Or in other words: the way we parameterize kernels in modern ways also makes it easy to do assessment/fallback.

Go Up