summaryrefslogtreecommitdiff
path: root/kernel/locking
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2024-09-24 15:18:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-04 16:30:02 +0200
commitbd24f30f5068df603b7d352243e15718e5c3add2 (patch)
treeff8b9249452927f4b7491d7e4d8d285cf596ec24 /kernel/locking
parentb3c10ac84c5a544ccd92ee4f891441df91a8cfbc (diff)
dm-verity: restart or panic on an I/O error
commit e6a3531dd542cb127c8de32ab1e54a48ae19962b upstream. Maxim Suhanov reported that dm-verity doesn't crash if an I/O error happens. In theory, this could be used to subvert security, because an attacker can create sectors that return error with the Write Uncorrectable command. Some programs may misbehave if they have to deal with EIO. This commit fixes dm-verity, so that if "panic_on_corruption" or "restart_on_corruption" was specified and an I/O error happens, the machine will panic or restart. This commit also changes kernel_restart to emergency_restart - kernel_restart calls reboot notifiers and these reboot notifiers may wait for the bio that failed. emergency_restart doesn't call the notifiers. Reported-by: Maxim Suhanov <dfirblog@gmail.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/locking')
0 files changed, 0 insertions, 0 deletions