From 8ecae36963e5353f14fdfa18888badeab88ab4b9 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Wed, 15 Nov 2017 21:39:13 +0100 Subject: [PATCH] linux_hardened: enable slab freelist hardening --- pkgs/os-specific/linux/kernel/hardened-config.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/hardened-config.nix b/pkgs/os-specific/linux/kernel/hardened-config.nix index 3744c28e204..7023c113190 100644 --- a/pkgs/os-specific/linux/kernel/hardened-config.nix +++ b/pkgs/os-specific/linux/kernel/hardened-config.nix @@ -82,6 +82,10 @@ HARDENED_USERCOPY y # Randomize allocator freelists. SLAB_FREELIST_RANDOM y +${optionalString (versionAtLeast version "4.14") '' + SLAB_FREELIST_HARDENED y +''} + # Wipe higher-level memory allocations on free() with page_poison=1 PAGE_POISONING y PAGE_POISONING_NO_SANITY y