mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-01-11 21:59:27 -05:00
comments
This commit is contained in:
parent
bef41a38c2
commit
3e131174d5
@ -2,6 +2,7 @@
|
||||
## See the file COPYING for copying conditions.
|
||||
|
||||
kver="$(uname -r)"
|
||||
#echo "## kver: $kver"
|
||||
|
||||
## Disables the merging of slabs of similar sizes.
|
||||
## Sometimes a slab can be used in a vulnerable way which an attacker can exploit.
|
||||
@ -11,9 +12,11 @@ GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX slab_nomerge"
|
||||
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX slub_debug=FZ"
|
||||
|
||||
## Zero memory at allocation and free time.
|
||||
if dpkg --compare-versions "${kver}" ge "5.3"; then
|
||||
if dpkg --compare-versions "$kver" ge "5.3"; then
|
||||
#echo "## $kver grater or equal 5.3: yes"
|
||||
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX init_on_alloc=1 init_on_free=1"
|
||||
else
|
||||
#echo "## $kver grater or equal 5.3: no"
|
||||
## SLUB poisoning and page poisoning is used if the kernel
|
||||
## does not yet support init_on_{,alloc,free}.
|
||||
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX slub_debug=P"
|
||||
|
Loading…
Reference in New Issue
Block a user