All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Kiper via Grub-devel <grub-devel@gnu.org>
To: grub-devel@gnu.org
Cc: Daniel Kiper <daniel.kiper@oracle.com>,
	dfirblog@gmail.com, eworm@archlinux.org, glin@suse.com,
	mbenatto@redhat.com, mchang@suse.com, meissner@suse.com,
	tpowa@archlinux.org
Subject: [SECURITY PATCH 5/8] docs: Document available crypto disks checks
Date: Thu,  8 May 2025 19:02:11 +0200	[thread overview]
Message-ID: <20250508170214.26577-6-daniel.kiper@oracle.com> (raw)
In-Reply-To: <20250508170214.26577-1-daniel.kiper@oracle.com>

From: Maxim Suhanov <dfirblog@gmail.com>

Document the --cryptodisk-only argument. Also, document the
"cryptocheck" command invoked when that argument is processed.

Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 docs/grub.texi | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/docs/grub.texi b/docs/grub.texi
index 2b3d536d3..48438c2b6 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -4475,6 +4475,8 @@ This module provides library support for writing to a storage disk.
 @node diskfilter_module
 @section diskfilter
 This module provides library support for reading a disk RAID array.
+It also provides support for the command @command{cryptocheck}.
+@xref{cryptocheck} for more information.
 
 @node div_module
 @section div
@@ -6427,6 +6429,7 @@ you forget a command, you can run the command @command{help}
 * configfile::                  Load a configuration file
 * cpuid::                       Check for CPU features
 * crc::                         Compute or check CRC32 checksums
+* cryptocheck::                 Check if a device is encrypted
 * cryptomount::                 Mount a crypto device
 * cutmem::                      Remove memory regions
 * date::                        Display or set current date and time
@@ -6737,6 +6740,16 @@ Alias for @code{hashsum --hash crc32 arg @dots{}}. See command @command{hashsum}
 (@pxref{hashsum}) for full description.
 @end deffn
 
+@node cryptocheck
+@subsection cryptocheck
+
+@deffn Command cryptocheck device
+Check if a given diskfilter device is backed by encrypted devices
+(@pxref{cryptomount} for additional information).
+
+The command examines all backing devices, physical volumes, of a specified
+logical volume, like LVM2, and fails when at least one of them is unencrypted.
+@end deffn
 
 @node cryptomount
 @subsection cryptomount
@@ -7666,7 +7679,8 @@ unbootable. @xref{Using digital signatures}, for more information.
 
 @deffn Command search @
  [@option{--file}|@option{--label}|@option{--fs-uuid}] @
- [@option{--set} [var]] [@option{--no-floppy}|@option{--efidisk-only}] name
+ [@option{--set} [var]] [@option{--no-floppy}|@option{--efidisk-only}|@option{--cryptodisk-only}] @
+ name
 Search devices by file (@option{-f}, @option{--file}), filesystem label
 (@option{-l}, @option{--label}), or filesystem UUID (@option{-u},
 @option{--fs-uuid}).
@@ -7681,6 +7695,14 @@ devices, which can be slow.
 The (@option{--efidisk-only}) option prevents searching any other devices then
 EFI disks. This is typically used when chainloading to local EFI partition.
 
+The (@option{--cryptodisk-only}) option prevents searching any devices other
+than encrypted disks. This is typically used when booting from an encrypted
+file system to ensure that no code gets executed from an unencrypted device
+having the same filesystem UUID or label.
+
+This option implicitly invokes the command @command{cryptocheck}, if it is
+available (@pxref{cryptocheck} for additional information).
+
 The @samp{search.file}, @samp{search.fs_label}, and @samp{search.fs_uuid}
 commands are aliases for @samp{search --file}, @samp{search --label}, and
 @samp{search --fs-uuid} respectively.
-- 
2.11.0


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

  parent reply	other threads:[~2025-05-08 17:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 17:02 [SECURITY PATCH 00/08] GRUB2 vulnerabilities - 2025/05/08 Daniel Kiper via Grub-devel
2025-05-08 17:02 ` [SECURITY PATCH 1/8] kern/rescue_reader: Block the rescue mode until the CLI authentication Daniel Kiper via Grub-devel
2025-05-08 17:02 ` [SECURITY PATCH 2/8] commands/search: Introduce the --cryptodisk-only argument Daniel Kiper via Grub-devel
2025-05-09 12:47   ` Vladimir 'phcoder' Serbinenko
2025-05-08 17:02 ` [SECURITY PATCH 3/8] disk/diskfilter: Introduce the "cryptocheck" command Daniel Kiper via Grub-devel
2025-05-09 12:44   ` Vladimir 'phcoder' Serbinenko
2025-05-08 17:02 ` [SECURITY PATCH 4/8] commands/search: Add the diskfilter support Daniel Kiper via Grub-devel
2025-05-09 12:41   ` Vladimir 'phcoder' Serbinenko
2025-05-08 17:02 ` Daniel Kiper via Grub-devel [this message]
2025-05-08 17:02 ` [SECURITY PATCH 6/8] disk/cryptodisk: Add the "erase secrets" function Daniel Kiper via Grub-devel
2025-05-09 12:37   ` Vladimir 'phcoder' Serbinenko
2025-05-08 17:02 ` [SECURITY PATCH 7/8] disk/cryptodisk: Wipe the passphrase from memory Daniel Kiper via Grub-devel
2025-05-09 12:34   ` Vladimir 'phcoder' Serbinenko
2025-05-08 17:02 ` [SECURITY PATCH 8/8] cryptocheck: Add --quiet option Daniel Kiper via Grub-devel
2025-05-09 12:33   ` Vladimir 'phcoder' Serbinenko
2025-05-09  7:47 ` [SECURITY PATCH 00/08] GRUB2 vulnerabilities - 2025/05/08 Christian Hesse
2025-05-09 11:06   ` Daniel Kiper via Grub-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250508170214.26577-6-daniel.kiper@oracle.com \
    --to=grub-devel@gnu.org \
    --cc=daniel.kiper@oracle.com \
    --cc=dfirblog@gmail.com \
    --cc=eworm@archlinux.org \
    --cc=glin@suse.com \
    --cc=mbenatto@redhat.com \
    --cc=mchang@suse.com \
    --cc=meissner@suse.com \
    --cc=tpowa@archlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.