Bug 1784473
| Summary: | fips-mode-setup breaks the Grub default value handling | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Renaud Métrich <rmetrich> |
| Component: | crypto-policies | Assignee: | Tomas Mraz <tmraz> |
| Status: | CLOSED ERRATA | QA Contact: | Ondrej Moriš <omoris> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 8.1 | CC: | bootloader-eng-team, cbesson, fmartine, hkario, nmavrogi, omoris, tmraz |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 8.3 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | crypto-policies-20200527-1.git0a29b28.el8 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-11-04 01:58:27 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
Renaud Métrich
2019-12-17 14:31:27 UTC
Why cannot grubby DTRT on BLS enabled system and just modify kernelopts? It is a huge mess and I would really like to know from some expert what should fips-mode-setup do to modify the kernel options without breaking any relevant use-cases. (In reply to Tomas Mraz from comment #1) > Why cannot grubby DTRT on BLS enabled system and just modify kernelopts? It That's what it does when using the grubby --update-kernel=ALL option. > is a huge mess and I would really like to know from some expert what should > fips-mode-setup do to modify the kernel options without breaking any > relevant use-cases. I've looked at the fips-mode-setup script and I see that's running 'grubby --update-kernel=$default_kernel --args="$fipsopts"' and then 'grub2-editenv - set kernelopts="$kernelopts $fipsopts"'. Since the intention seems to be to update the cmdline for all the entries, I think that instead it should run 'grubby --update-kernel=ALL --args="$fipsopts"'. With that command grubby will update the $kernelopts variable. The reason why the 'grubby --update-kernel=$kernel --args=$foo' expands the $kernelopts variable and writes the resulting value in the BLS snippet for $kernel is that the user is telling grubby that only wants to modify the cmdline for that entry. So the $kernelopts variable can't be updated since that will affect all the entries. That's why grubby supports an ALL argument for the --update-kernel option to specify that all the entries should modified, so grubby updates the $kernelopts variable instead of editing the options fields in the BLS files. Do I get it right that grubby --update-kernel=ALL --args="$fipsopts" would replace both the existing grubby call and the grub2-editenv call? (In reply to Tomas Mraz from comment #3) > Do I get it right that grubby --update-kernel=ALL --args="$fipsopts" would > replace both the existing grubby call and the grub2-editenv call? That's correct. OK, thank you. Reassigned back to crypto-policies. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (crypto-policies bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4536 |