From 28b67c357826c5b53a08d902624a5abfa2b08e70 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Wed, 20 May 2026 16:33:07 +0900 Subject: [PATCH] base/mitigations: blacklist modules for copyfail and pintheft --- base/mitigations.nix | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/base/mitigations.nix b/base/mitigations.nix index 27168fb..f5ceb4c 100644 --- a/base/mitigations.nix +++ b/base/mitigations.nix @@ -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; }