Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin...
by mjg59 on Monday February 22, 2016 @03:04PM
(#11153826)
They could remount it read-write, but they don't. If systemd had made a unilateral change that broke existing userspace people would have been unhappy for a different reason. Doing this in-kernel means that the issue could be fixed without breaking existing userspace, so it's clearly the better solution.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin...
by zanny on Tuesday February 23, 2016 @02:54AM
(#11157276)
The EFI spec is a horrible disastrous mess, but in theory you could be reading and writing EFIvars at runtime to dynamically configure boots - ie, "reboot to safe mode" would set the evifar next boot parameter to your initram-fs fallback. It would not be complicated to implement pam / polkit support for unprivlidged users to set such things without authenticating root.
It does not change the fact the fault lies with shitty proprietary UEFI implementations, and nobody writing free software is at fault here.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin...
by EmanueleAina on Tuesday February 23, 2016 @04:42AM
(#11157704)
What happens if a stray `rm` runs while `grub-install` runs?
The kernel fix prevents that, using mount flags alone only restrict the vulnerability but it doesn't make it go away.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin...
by sandGorgon on Monday February 22, 2016 @02:58PM
(#11153774)
Each time boot variables need to be written, etc.
I would think a) this are mostly system tools like boot managers and b) these tools need root (or setuid root) anyway, so why can't they just mount it themselves temporarily?
Edit: It seems it is mostly grub-install, efibootmgr, and `systemctl reboot --firmware` that need this mounted rw. The first two aren't something that a casual user uses very often, and if someone does, a "Filesystem is mounted read-only" message will point them in the right direction. The latter is part of systemd and could easily be changed to mount efivarfs itself, no third party involved.