File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,6 +248,9 @@ Kernel space:
248248- Optional - On compatible AMD CPUs enable Secure Memory Encryption (SME) to protect against
249249 cold boot attacks and Secure Encrypted Virtualization (SEV) for further guest memory isolation.
250250
251+ - Prevent runaway privileged processes from writing to block devices that are mounted by
252+ filesystems to protect against filesystem corruption and kernel crashes.
253+
251254Direct memory access:
252255
253256- Enable strict IOMMU translation to protect against some DMA attacks via the use
Original file line number Diff line number Diff line change @@ -259,6 +259,18 @@ GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX erst_disable"
259259#GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX mem_encrypt=on"
260260#GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX kvm_amd.sev=1"
261261
262+ ## Prevent processes from writing to block devices that are mounted by filesystems.
263+ ## Enhances system stability and security by protecting against runaway privileged processes.
264+ ## Allowing processes to write to the buffer cache can cause filesystem corruption and kernel crashes.
265+ ## Does not prevent data modifications using direct SCSI commands or lower-level storage stack access.
266+ ## May lead to breakages in certain limited scenarios.
267+ ##
268+ ## https://github.com/torvalds/linux/commit/ed5cc702d311c14b653323d76062b0294effa66e
269+ ## https://lore.kernel.org/lkml/20240105-vfs-super-4092d802972c@brauner/
270+ ## https://github.com/a13xp0p0v/kernel-hardening-checker/issues/186
271+ ##
272+ GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX bdev_allow_write_mounted=0"
273+
262274## 2. Direct Memory Access:
263275##
264276## https://madaidans-insecurities.github.io/guides/linux-hardening.html#dma-attacks
You can’t perform that action at this time.
0 commit comments