Skip to content

Make bdev_allow_write_mounted kernel parameter optional#362

Open
assisted-by-ai wants to merge 1 commit intoKicksecure:masterfrom
assisted-by-ai:claude/comment-bdev-allow-write-aYEla
Open

Make bdev_allow_write_mounted kernel parameter optional#362
assisted-by-ai wants to merge 1 commit intoKicksecure:masterfrom
assisted-by-ai:claude/comment-bdev-allow-write-aYEla

Conversation

@assisted-by-ai
Copy link
Copy Markdown

Summary

This change makes the bdev_allow_write_mounted=0 kernel hardening parameter optional by commenting it out in the default GRUB configuration, while updating documentation to reflect potential compatibility issues.

Key Changes

  • Commented out the bdev_allow_write_mounted=0 kernel parameter in etc/default/grub.d/40_kernel_hardening.cfg
  • Added references to related discussions documenting issues with disk management operations
  • Updated README.md to clarify that this is an optional hardening measure
  • Added documentation of known breakages with disk resizing and VDI compaction in virtual machines

Details

The bdev_allow_write_mounted=0 parameter prevents privileged processes from writing to mounted block devices, protecting against filesystem corruption and kernel crashes. However, this parameter can interfere with legitimate disk management operations such as:

  • Disk resizing in virtual machines
  • VDI compaction operations

By making this parameter optional (disabled by default), users can choose to enable it based on their security requirements and use case compatibility. The documentation now clearly indicates this is an optional hardening feature with potential operational trade-offs.

https://claude.ai/code/session_01Cd9ka8sC7zLUvB31V4kxMk

@adrelanos
Copy link
Copy Markdown
Member

Grow/shrink virtual hard disk versus bdev_allow_write_mounted is now documented.

Issues with fwupd are more important. Was reported here:

#334 (comment)

Firmware updates,fwupd seems more important than bdev_allow_write_mounted=0.

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