Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin...
by gnud on Monday February 22, 2016 @04:12PM
(#11154339)
For this particular example, wouldn't this be best solved with a separate runlevel for "reboot into UEFI"? Stop all daemons, remount all normal filesystems read-only, remount UEFI RW, write variable and reboot.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin...
by EmanueleAina on Tuesday February 23, 2016 @04:40AM
(#11157697)
Possibly, but what happens if a faulty script does a `rm` too much in that short time window?
The kernel fix prevents that, using mount flags alone only restrict the vulnerability but it doesn't make it go away.
Best example of why you need to have it RW: if uefi is in fast boot, the only way to actually enter uefi is to boot an OS and have the OS set the uefi variables so that it goes into the firmware screen on next restart. This is (on Linux) done by changing something in that virtual filesystem.
> certainly I'd have a hard time believing that they would need it to be mounted and writable all the time.
You could probably remount it, but that also means that you all the sudden have concurrency problems with that operation. So not really ideal.