# yaml-language-server: $schema=../../../../schema/control.schema.json id: CB-DEB-BOOT-012 title: Restrict access to the boot loader configuration finding: title: Users can read the boot loader configuration description: The GRUB configuration can hold the boot password hash and reveals the boot parameters of the system. status: active profiles: [core] risk: severity: low assessment: automated tags: [grub, boot, permissions] applicability: facts: [grub] 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. setting: location: /boot/grub/grub.cfg default_value: "root:root 0644" recommended_value: "root:root, mode 0600 or stricter" audit: manual: | Run `stat -c '%U:%G %a' /boot/grub/grub.cfg`. It must print `root:root` and a mode of `600` or stricter. checks: - id: perms engine: file-perms description: Owner, group and mode of /boot/grub/grub.cfg. spec: { path: /boot/grub/grub.cfg, owner: root, group: root, mode: "0600" } remediation: manual: | Run `chown root:root /boot/grub/grub.cfg` and `chmod 600 /boot/grub/grub.cfg`. effects: restart: none disruption: none lockout_risk: false rollback: | Run `chmod 644 /boot/grub/grub.cfg`. scripts: - id: perms from_check: perms references: - title: GNU GRUB Manual - Authentication and authorisation url: https://www.gnu.org/software/grub/manual/grub/html_node/Authentication-and-authorisation.html publisher: GNU Project kind: vendor-doc accessed: 2026-10-18 - title: ANSSI-BP-028 v2.0 - Recommandations de configuration d'un système GNU/Linux (R29) url: https://messervices.cyber.gouv.fr/documents-guides/fr_np_linux_configuration-v2.0.pdf publisher: ANSSI kind: guide accessed: 2026-10-18 mappings: - framework: anssi-linux framework_version: "2.0" id: R29 relation: partial note: R29 restricts the whole /boot directory; this control covers the GRUB configuration. - framework: nist-800-53r5 framework_version: "5.1.1" id: AC-3 relation: related - framework: cis-debian-12 framework_version: "2.0.0" id: "1.4.2" relation: equivalent - framework: cis-debian-13 framework_version: "1.1.0" id: "1.4.2" relation: equivalent threats: - framework: cwe id: CWE-732 related_controls: - id: CB-DEB-BOOT-011 type: related authors: - name: Alice github: Sn0wAlice verified: - date: 2026-10-18 by: Sn0wAlice versions: ["12"] environment: Proxmox VM, Debian 12 genericcloud image, kernel 6.1.0-54-cloud-amd64, BIOS boot notes: Fails on fresh install (0644); fix sets 0600; mode kept by update-grub and after reboot. - date: 2026-10-18 by: Sn0wAlice versions: ["13"] environment: Proxmox VM, Debian 13 genericcloud image, kernel 6.12.113+deb13-cloud-amd64, BIOS boot notes: Fails on fresh install (0644); fix sets 0600; mode kept by update-grub and after reboot. introduced_in: 0.1.0 created: 2026-10-18 updated: 2026-10-18