Debian GNU/Linux · Boot & system hardening

Restrict access to the boot loader configuration

When it fails: Users can read the boot loader configuration. The GRUB configuration can hold the boot password hash and reveals the boot parameters of the system.

CB-DEB-BOOT-012lowactiveautomatedautomated fixprofile core

As released in v0.1.1 beta · pre-release. Current state.

Description

/boot/grub/grub.cfg is the configuration GRUB reads at boot. It is generated by update-grub and contains every boot entry, the kernel command lines and, when one is set, the PBKDF2 hash of the boot password.

Rationale

A readable password hash can be attacked offline. Restricting the file to root also hides the boot parameters from local users and stops them from learning which protections are enabled.

Impact

None known. GRUB reads the file before the operating system starts, and update-grub keeps the restricted mode when it regenerates the file.

Applies when

Detected: when: GRUB is the boot loader A scanner reports the control not applicable when one is false.

Setting

Location/boot/grub/grub.cfg
Defaultroot:root 0644
Recommendedroot:root, mode 0600 or stricter

Audit

Run stat -c '%U:%G %a' /boot/grub/grub.cfg. It must print root:root and a mode of 600 or stricter.

Automated: every check must pass. Scanners report each check by its id.

perms

Owner, group and mode of /boot/grub/grub.cfg.

path: /boot/grub/grub.cfg
owner: root
group: root
mode: '0600'

Remediation

Run chown root:root /boot/grub/grub.cfg and chmod 600 /boot/grub/grub.cfg.

Restartnone
Disruptionnone

Rollback

Run chmod 644 /boot/grub/grub.cfg.

perms

Generated from check perms: the engine writes the fix for every output, it sets the expected value and the check runs again after.

Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.

References

Mappings

FrameworkIDRelationNote
ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0R29partialR29 restricts the whole /boot directory; this control covers the GRUB configuration.
NIST SP 800-53 Rev. 55.1.1AC-3related

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

  • related CB-DEB-BOOT-011 Protect the boot loader configuration with a password

People and lifecycle

Authors
Verified2026-10-18 by Sn0wAlice on 12, Proxmox VM, Debian 12 genericcloud image, kernel 6.1.0-54-cloud-amd64, BIOS boot. Fails on fresh install (0644); fix sets 0600; mode kept by update-grub and after reboot.
Verified2026-10-18 by Sn0wAlice on 13, Proxmox VM, Debian 13 genericcloud image, kernel 6.12.113+deb13-cloud-amd64, BIOS boot. Fails on fresh install (0644); fix sets 0600; mode kept by update-grub and after reboot.
Introduced inv0.1.0
Created, updated2026-10-18, 2026-10-18
Translationsfr