CONFIG_RESET_ATTACK_MITIGATION should not be enabled by default without additional scripts

Bug #1871395 reported by valdikss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Description of problem:

Ubuntu 19.10 kernel 5.3.0-46-generic has Reset Attack Mitigation enabled (CONFIG_RESET_ATTACK_MITIGATION) which may cause strange reboot sequence on certain hardware (Lenovo Thinkpad X220).
Instead of rebooting normally, the laptop would hard power off (without properly stopping peripherals and internal devices, which may be spotted by HDD losing power with a specific unusual sound) and then powers on again after 1 second.

This kernel configuration option should not be enabled unless additional scripts, which disable RAM clean step upon normal poweroff/reboot. I made the systemd service to workaround the problem, which writes "0" to MemoryOverwriteRequestControl EFI variable:
https://gist.github.com/ValdikSS/86352b03ec3ed3c8713b78c7e20dc222

The author of this kernel option, Matthew Garett, wrote the following:
>if userspace can ensure that all secrets are
>removed as part of a controlled shutdown, it can reset this variable to
>0 before triggering a hardware reboot.

https://lwn.net/Articles/730006/

Version-Release number of selected component (if applicable):
linux-image 5.3.0-46-generic

How reproducible:
Always

Steps to Reproduce:
1. Boot Ubuntu 19.10, either live or installed
2. Reboot the computer (Lenovo X220 laptop in my case)

Actual results:
The computer perform hard power off and power on after 1 second

Expected results:
The computer reboots without losing power

Tags: eoan
Revision history for this message
valdikss (valdikss1) wrote :

In 2018, Fedora enabled this option and I got this bug. I talked to Matthew Garrett, he replied:

>It shouldn't be enabled unless there's code in the shutdown path to clear the flag on clean shutdowns

The option has been disabled in Fedora since then.

https://bugzilla.redhat.com/show_bug.cgi?id=1532058#c2

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1871395

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: eoan
Revision history for this message
valdikss (valdikss1) wrote :

systemd service which disables reset mitigation upon shutdown

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.