Skip to contentSkip to conversation

efi: Clarify that reset attack mitigation needs appropriate userspace

PATCH In review Matthew Garrett 2 participants 2 messages Jan 8, 2018 – Jan 15, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi: Clarify that reset attack mitigation needs appropriate userspace

Some distributions have turned on the reset attack mitigation feature, which is designed to force the platform to clear the contents of RAM if the machine is shut down uncleanly. However, in order for the platform to be able to determine whether the shutdown was clean or not, userspace has to be configured to clear the MemoryOverwriteRequest flag on shutdown - otherwise the firmware will end up clearing RAM on every reboot, which is unnecessarily time consuming. Add some additional clarity to the kconfig text to reduce the risk of systems being configured this way.

---
 drivers/firmware/efi/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/firmware/efi/Kconfig +4 -1
index 2b4c39fdfa91..86210f75d233 100644
@@ -159,7 +159,10 @@ config RESET_ATTACK_MITIGATION
 	  using the TCG Platform Reset Attack Mitigation specification. This
 	  protects against an attacker forcibly rebooting the system while it
 	  still contains secrets in RAM, booting another OS and extracting the
-	  secrets.
+	  secrets. This should only be enabled when userland is configured to
+	  clear the MemoryOverwriteRequest flag on clean shutdown after secrets
+	  have been evicted, since otherwise it will trigger even on clean
+	  reboots.
 
 endmenu
 
Signature · 1 line
2.16.0.rc0.223.g4a4ac83678-goog
#2 lore raw
In reply to a message not in the archive
Quoted 10 lines · Matthew Garrett

Some distributions have turned on the reset attack mitigation feature, which is designed to force the platform to clear the contents of RAM if the machine is shut down uncleanly. However, in order for the platform to be able to determine whether the shutdown was clean or not, userspace has to be configured to clear the MemoryOverwriteRequest flag on shutdown - otherwise the firmware will end up clearing RAM on every reboot, which is unnecessarily time consuming. Add some additional clarity to the kconfig text to reduce the risk of systems being configured this way.

Quoted 4 lines

Ingo, do you mind picking this up directly?

https://marc.info/?l=linux-efi&m=151545181706115

Quoted 23 lines
---
 drivers/firmware/efi/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/firmware/efi/Kconfig +4 -2
index 2b4c39fdfa91..86210f75d233 100644
@@ -159,7 +159,10 @@ config RESET_ATTACK_MITIGATION
          using the TCG Platform Reset Attack Mitigation specification. This
          protects against an attacker forcibly rebooting the system while it
          still contains secrets in RAM, booting another OS and extracting the
-         secrets.
+         secrets. This should only be enabled when userland is configured to
+         clear the MemoryOverwriteRequest flag on clean shutdown after secrets
+         have been evicted, since otherwise it will trigger even on clean
+         reboots.
 
 endmenu
 
--

2.16.0.rc0.223.g4a4ac83678-goog