Skip to content

Add whitelisting support for load_env

Jon McCune grub-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 5 repliesIn review
  2. v33 patches 1 replySuperseded
  3. v25 patches 10 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4style: indent --no-tabs --gnu-style grub-core/commands/loadenv.cgrub-core/commands/loadenv.c+44 -432 replies
2/4load_env support for whitelisting which variables are read from an env file, even if check_signatures=enforcegrub-core/commands/loadenv.c grub-core/lib/envblk.c include/grub/lib/envblk.h +1 more+74 -103 replies
3/4save_env should work, even if check_signatures=enforcegrub-core/commands/loadenv.c+1 -10 replies
4/4Add (multiple) -k, --pubkey=FILE support to installation commands.util/grub-install.in util/grub-install_header util/grub-mknetdir.in +2 more+29 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/4] Add whitelisting support for load_env

These patches add support to load_env and save_env to work nicely in concert with check_signatures=enforce. This represents an evolution from the design in my email to grub-devel entitled "Proposal to enable savedefault, one-shot reboot, etc with check_signatures=enforce". In particular, no new commands are added. Instead, the behavior of load_env is modified based on the presence of a whitelist of environment variables to be updated from an untrusted grubenv-style file.

Some additional work is done to make this support usable:
A {-k, --pubkey} option is added to:
grub-install, grub-mkrescue, grub-mkstandalone, grub-mknetdir. See the individual patch descriptions for more specifics.

Jon McCune (4):
style: indent --no-tabs --gnu-style grub-core/commands/loadenv.c load_env support for whitelisting which variables are read from an env
file, even if check_signatures=enforce
save_env should work, even if check_signatures=enforce
Add (multiple) -k, --pubkey=FILE support to installation commands.

 grub-core/commands/loadenv.c | 139 ++++++++++++++++++++++++++++---------------
 grub-core/lib/envblk.c       |  20 ++++++-
 include/grub/lib/envblk.h    |   8 +++
 util/grub-editenv.c          |   2 +-
 util/grub-install.in         |   8 +--
 util/grub-install_header     |  17 ++++++
 util/grub-mknetdir.in        |   2 +-
 util/grub-mkrescue.in        |  12 ++--
 util/grub-mkstandalone.in    |   2 +-
 9 files changed, 146 insertions(+), 64 deletions(-)
Signature · 1 line
1.8.4