Skip to content

Ensure bootupd-generated GRUB configs have secure permissions and ownership #952

@jan-cerny

Description

@jan-cerny

Security compliance frameworks, such as CIS or PCI-DSS, mandate that /boot/grub2/grub.cfg and /boot/grub2/user.cfg must be owned by root:root with file permissions set to 0600 to prevent unauthorized modification.

Currently, bootupd appears to rely on system defaults (e.g., umask) when creating this file, which can result in insufficient permissions (like 0644). This causes failing rules when performing compliance scans of RHEL Image Mode systems.

We propose that bootupd be enhanced to enforce secure-by-default settings for the bootloader configurations it creates. Specifically, when bootupd generates /boot/grub2/grub.cfg and /boot/grub2/user.cfg , it should explicitly set the file owner to root (UID 0), set the file group to root (GID 0) and et the file permissions to 0600.

Alternatively, bootupd could provide a way how to configure the owner and permissions of the GRUB files at the bootable container image build time, ie. users would drop in a config file for bootupd in their Containerfiles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions