]> git.ipfire.org Git - thirdparty/grub.git/commit
disk/cryptodisk: Require authentication after TPM unlock for CLI access
authorMichael Chang <mchang@suse.com>
Thu, 29 Aug 2024 05:27:30 +0000 (13:27 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:47 +0000 (16:22 +0100)
commit13febd78db3cd85dcba67d8ad03ad4d42815f11e
treeb827967546bd3f441fa1af6c190be1771a5d5490
parent16f196874fbe360a1b3c66064ec15adadf94c57b
disk/cryptodisk: Require authentication after TPM unlock for CLI access

The GRUB may use TPM to verify the integrity of boot components and the
result can determine whether a previously sealed key can be released. If
everything checks out, showing nothing has been tampered with, the key
is released and GRUB unlocks the encrypted root partition for the next
stage of booting.

However, the liberal Command Line Interface (CLI) can be misused by
anyone in this case to access files in the encrypted partition one way
or another. Despite efforts to keep the CLI secure by preventing utility
command output from leaking file content, many techniques in the wild
could still be used to exploit the CLI, enabling attacks or learning
methods to attack. It's nearly impossible to account for all scenarios
where a hack could be applied.

Therefore, to mitigate potential misuse of the CLI after the root device
has been successfully unlocked via TPM, the user should be required to
authenticate using the LUKS password. This added layer of security
ensures that only authorized users can access the CLI reducing the risk
of exploitation or unauthorized access to the encrypted partition.

Fixes: CVE-2024-49504
Signed-off-by: Michael Chang <mchang@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
docs/grub.texi
grub-core/disk/cryptodisk.c
grub-core/kern/main.c
grub-core/normal/auth.c
grub-core/normal/main.c
grub-core/normal/menu_entry.c
include/grub/auth.h
include/grub/cryptodisk.h
include/grub/misc.h