Skip to content

Commit

Permalink
do not set kernel boot parameter page_poison=1 in Qubes since does no…
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Schleizer committed Nov 5, 2019
1 parent f57702c commit 94d40c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions etc/default/grub.d/40_kernel_hardening.cfg
Expand Up @@ -7,8 +7,13 @@ GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX slab_nomerge"
## Enables sanity checks (F), redzoning (Z) and poisoning (P).
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX slub_debug=FZP"

## Wipes free memory so it can't leak in various ways and prevents some use-after-free vulnerabilites.
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX page_poison=1"
if command -v "qubesdb-read" >/dev/null 2>&1 ; then
## https://github.com/QubesOS/qubes-issues/issues/5212#issuecomment-533873012
true "skip adding page_poison=1 in Qubes"
else
## Wipes free memory so it can't leak in various ways and prevents some use-after-free vulnerabilites.
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX page_poison=1"
fi

## Makes the kernel panic on uncorrectable errors in ECC memory that an attacker could exploit.
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX mce=0"
Expand Down

1 comment on commit 94d40c6

@egberts
Copy link

@egberts egberts commented on 94d40c6 Oct 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into some trouble there. Running Debian bullseye 5.10.46.

But the logic gave me “poison” settings.

thought the if-then logic was checking for less than 5.3.x.

Please sign in to comment.