mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-05-20 21:41:12 +02:00
base/mitigations: blacklist modules for copyfail and pintheft
This commit is contained in:
@@ -1,17 +1,24 @@
|
||||
{ ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
modulesToBan = [
|
||||
# copy.fail
|
||||
"af_alg"
|
||||
"algif_aead"
|
||||
"algif_hash"
|
||||
"algif_rng"
|
||||
"algif_skcipher"
|
||||
|
||||
# dirtyfrag / Fragnesia
|
||||
"esp4"
|
||||
"esp6"
|
||||
"rxrpc"
|
||||
|
||||
# PinTheft
|
||||
"rds"
|
||||
];
|
||||
in
|
||||
{
|
||||
boot.blacklistedKernelModules = [
|
||||
"rxrpc" # dirtyfrag
|
||||
"esp6" # dirtyfrag
|
||||
"esp4" # dirtyfrag
|
||||
];
|
||||
boot.extraModprobeConfig = ''
|
||||
# dirtyfrag
|
||||
install esp4 /bin/false
|
||||
# dirtyfrag
|
||||
install esp6 /bin/false
|
||||
# dirtyfrag
|
||||
install rxrpc /bin/false
|
||||
'';
|
||||
boot.blacklistedKernelModules = modulesToBan;
|
||||
|
||||
boot.extraModprobeConfig = lib.concatMapStringsSep "\n" (mod: "install ${mod} ${lib.getExe' pkgs.coreutils "false"}") modulesToBan;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user