X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig_hardened_check%2Fconfig_files%2Fkspp-recommendations%2Fkspp-recommendations-x86-32.config;h=ca929985614d977170f30880034db00ca61fe7e5;hb=ea880f61ef5e65dae9beb09beb6cdfca669af9cc;hp=477d75c1dd1608cdc313bb723986657518df10fd;hpb=1aa2467c554732ba3ac1318d4070817b077645e2;p=kconfig-hardened-check.git diff --git a/kconfig_hardened_check/config_files/kspp-recommendations/kspp-recommendations-x86-32.config b/kconfig_hardened_check/config_files/kspp-recommendations/kspp-recommendations-x86-32.config index 477d75c..ca92998 100644 --- a/kconfig_hardened_check/config_files/kspp-recommendations/kspp-recommendations-x86-32.config +++ b/kconfig_hardened_check/config_files/kspp-recommendations/kspp-recommendations-x86-32.config @@ -1,5 +1,5 @@ # CONFIGs -# Linux/i386 5.4.0 Kernel Configuration +# Linux/i386 5.14.0 Kernel Configuration # Report BUG() conditions and kill the offending process. CONFIG_BUG=y @@ -68,8 +68,8 @@ CONFIG_PAGE_POISONING_ZERO=y CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y CONFIG_INIT_ON_FREE_DEFAULT_ON=y -# Initialize all stack variables on function entry. (Clang builds only. For GCC, see CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y below) -CONFIG_INIT_STACK_ALL=y +# Initialize all stack variables on function entry. (Clang and GCC 12+ builds only. For earlier GCC, see CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y below) +CONFIG_INIT_STACK_ALL_ZERO=y # Adds guard pages to kernel stacks (not all architectures support this yet). CONFIG_VMAP_STACK=y @@ -80,6 +80,27 @@ CONFIG_REFCOUNT_FULL=y # Check for memory copies that might overflow a structure in str*() and mem*() functions both at build-time and run-time. CONFIG_FORTIFY_SOURCE=y +# Avoid kernel memory address exposures via dmesg (sets sysctl kernel.dmesg_restrict initial value to 1) +CONFIG_SECURITY_DMESG_RESTRICT=y + +# Randomize kernel stack offset on syscall entry (since v5.13). +CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=y + +# Enable sampling-based overflow detection. This is similar to KASAN coverage, but with almost zero runtime overhead. +CONFIG_KFENCE=y + +# Do not ignore compile-time warnings (since v5.15) +CONFIG_WERROR=y + +# Force IOMMU TLB invalidation so devices will never be able to access stale data contents (or set "iommu.passthrough=0 iommu.strict=1" at boot) +CONFIG_IOMMU_DEFAULT_DMA_STRICT=y + +# Make scheduler aware of SMT Cores. Program needs to opt-in to using this feature with prctl(PR_SCHED_CORE). +CONFIG_SCHED_CORE=y + +# Wipe all caller-used registers on exit from the function (reduces available ROP gadgets and minimizes stale data in registers) +CONFIG_ZERO_CALL_USED_REGS=y + # Dangerous; enabling this allows direct physical memory writing. # CONFIG_ACPI_CUSTOM_METHOD is not set @@ -162,6 +183,9 @@ CONFIG_X86_PAE=y # Disallow allocating the first 64k of memory. CONFIG_DEFAULT_MMAP_MIN_ADDR=65536 +# Disable Model-Specific Register writes. +# CONFIG_X86_MSR is not set + # Randomize position of kernel. CONFIG_RANDOMIZE_BASE=y