Bug 2228016

Summary: grubby sets --unrestricted for all BLS entries, rendering password protection ineffective
Product: [Fedora] Fedora Reporter: James <jarmofin>
Component: grubbyAssignee: Peter Jones <pjones>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: fmartine, nfrayer, pjones, rharwood
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-28 13:38:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James 2023-08-01 07:02:38 UTC
Description of problem:
According to grub 2.06 documentation, "Superusers are permitted to use the GRUB command line, edit menu entries, and execute any menu entry." Currently bash script grubby sets "grub_arg --unrestricted" for all BLS entries in /boot/loader/entries. This allows any menu entry to be executed without requiring a password, even if a group of superusers would have been defined.

Version-Release number of selected component (if applicable):
grubby 8.40-69

How reproducible:
always

Steps to Reproduce:

The problem itself can be reproduced by verifying that entries in /boot/loader/entries have "grub_arg --unrestricted:
1. grep --files-with-matches "grub_arg --unrestricted" /boot/loader/entries/*.conf

The effect of "--unrestricted" in password protection can be reproduced as follows:
1. password-protect grub; this can be a bit tricky, as grub2-set-password also has a bug affecting UEFI systems: see https://bugzilla.redhat.com/show_bug.cgi?id=2227718
2. reboot
3. in grub menu, boot any non-default entry without being prompted for password

Actual results:
after enabling password protection (authentication), any non-default grub entry can be executed without password

Expected results:
after enabling password protection (authentication), execution of non-default grub entries should be password protected


Additional info:

Comment 1 Aoife Moloney 2024-05-28 13:38:49 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.