Skip to content

Blacklist kernel modules and remove lockdown defaults in mantle variants - #4963

Merged
piyush-jena merged 2 commits into
bottlerocket-os:developfrom
piyush-jena:disable-kexec-binfmt_misc
Nov 7, 2026
Merged

piyush-jena merged 2 commits into
bottlerocket-os:developfrom
piyush-jena:disable-kexec-binfmt_misc

Conversation

@piyush-jena

@piyush-jena piyush-jena commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Requires bootconfig fixes in bottlerocket-os/twoliter#745

Description of changes:

  • Disable kexec directly through kernel command line instead of using the systemd service
  • Blacklist binfmt_misc kernel modules

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@piyush-jena
piyush-jena force-pushed the disable-kexec-binfmt_misc branch from bd24a26 to 178d48e Compare October 12, 2026 16:54
@piyush-jena
piyush-jena marked this pull request as ready for review November 7, 2026 03:29
@piyush-jena
piyush-jena force-pushed the disable-kexec-binfmt_misc branch from 178d48e to 7372d9b Compare November 7, 2026 03:39
@piyush-jena piyush-jena changed the title Blacklist kexec and binfmt_misc in mantle variants Blacklist kernel modules and remove lockdown defaults in mantle variants Nov 7, 2026
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
Signed-off-by: Piyush Jena <jepiyush@amazon.com>
@piyush-jena

piyush-jena commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Post rebase:
kernel-command-line in aws-mantle-1-nvidia-fips:

[root@admin]# cat /proc/cmdline
SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST=25 fips=1 lockdown=integrity module.sig_enforce=1 module_blacklist=binfmt_misc,efivarfs,i8042 sysctl.kernel.kexec_load_disabled=1 systemd.mask=proc-sys-fs-binfmt_misc.mount console=tty0 console=ttyS0,115200n8 net.ifnames=0 netdog.default-interface=eth0:dhcp4,dhcp6? quiet nvidia.NVreg_CoherentGPUMemoryMode=driver root=/dev/dm-0 rootwait ro raid=noautodetect random.trust_cpu=on selinux=1 enforcing=1 dm-mod.create="root,,,ro,0 1638272 verity 1 PARTUUID=39B8EABA-F97E-4682-865E-D80C1E5FD08B/PARTNROFF=1 PARTUUID=39B8EABA-F97E-4682-865E-D80C1E5FD08B/PARTNROFF=2 4096 4096 204784 1 sha256 8bad2eaeec18c465d04471f22cd8af22ea06898ee700f05d62f14ba502c134f6 8ac9373c72c93ecfc2aaad1a09b361cd142c9b8682e889866367f81ba77bf2e1 2 restart_on_corruption ignore_zero_blocks" -- systemd.unit=fipscheck.target systemd.log_target=journal-or-kmsg systemd.log_color=0 systemd.show_status=true

The required values are set:

lockdown=integrity
module.sig_enforce=1
module_blacklist=binfmt_misc,efivarfs,i8042
sysctl.kernel.kexec_load_disabled=1
systemd.mask=proc-sys-fs-binfmt_misc.mount

PCRs in instance match the predicted ones :)

@piyush-jena
piyush-jena force-pushed the disable-kexec-binfmt_misc branch from 7372d9b to ed01a4c Compare November 7, 2026 06:03
@piyush-jena
piyush-jena merged commit 80e1e99 into bottlerocket-os:develop Nov 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants