mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
Merge pull request #84522 from emilazy/add-linux-hardened-patches
linux_*_hardened: use linux-hardened patch set
This commit is contained in:
commit
6f1165a0cb
@ -7,7 +7,7 @@ with lib;
|
||||
|
||||
{
|
||||
meta = {
|
||||
maintainers = [ maintainers.joachifm ];
|
||||
maintainers = [ maintainers.joachifm maintainers.emily ];
|
||||
};
|
||||
|
||||
boot.kernelPackages = mkDefault pkgs.linuxPackages_hardened;
|
||||
@ -21,8 +21,6 @@ with lib;
|
||||
|
||||
security.lockKernelModules = mkDefault true;
|
||||
|
||||
security.allowUserNamespaces = mkDefault false;
|
||||
|
||||
security.protectKernelImage = mkDefault true;
|
||||
|
||||
security.allowSimultaneousMultithreading = mkDefault false;
|
||||
@ -37,15 +35,9 @@ with lib;
|
||||
# Slab/slub sanity checks, redzoning, and poisoning
|
||||
"slub_debug=FZP"
|
||||
|
||||
# Disable slab merging to make certain heap overflow attacks harder
|
||||
"slab_nomerge"
|
||||
|
||||
# Overwrite free'd memory
|
||||
"page_poison=1"
|
||||
|
||||
# Disable legacy virtual syscalls
|
||||
"vsyscall=none"
|
||||
|
||||
# Enable page allocator randomization
|
||||
"page_alloc.shuffle=1"
|
||||
];
|
||||
@ -82,38 +74,12 @@ with lib;
|
||||
# (e.g., parent/child)
|
||||
boot.kernel.sysctl."kernel.yama.ptrace_scope" = mkOverride 500 1;
|
||||
|
||||
# Restrict access to kernel ring buffer (information leaks)
|
||||
boot.kernel.sysctl."kernel.dmesg_restrict" = mkDefault true;
|
||||
|
||||
# Hide kptrs even for processes with CAP_SYSLOG
|
||||
boot.kernel.sysctl."kernel.kptr_restrict" = mkOverride 500 2;
|
||||
|
||||
# Unprivileged access to bpf() has been used for privilege escalation in
|
||||
# the past
|
||||
boot.kernel.sysctl."kernel.unprivileged_bpf_disabled" = mkDefault true;
|
||||
|
||||
# Disable bpf() JIT (to eliminate spray attacks)
|
||||
boot.kernel.sysctl."net.core.bpf_jit_enable" = mkDefault false;
|
||||
|
||||
# ... or at least apply some hardening to it
|
||||
boot.kernel.sysctl."net.core.bpf_jit_harden" = mkDefault true;
|
||||
|
||||
# Raise ASLR entropy for 64bit & 32bit, respectively.
|
||||
#
|
||||
# Note: mmap_rnd_compat_bits may not exist on 64bit.
|
||||
boot.kernel.sysctl."vm.mmap_rnd_bits" = mkDefault 32;
|
||||
boot.kernel.sysctl."vm.mmap_rnd_compat_bits" = mkDefault 16;
|
||||
|
||||
# Allowing users to mmap() memory starting at virtual address 0 can turn a
|
||||
# NULL dereference bug in the kernel into code execution with elevated
|
||||
# privilege. Mitigate by enforcing a minimum base addr beyond the NULL memory
|
||||
# space. This breaks applications that require mapping the 0 page, such as
|
||||
# dosemu or running 16bit applications under wine. It also breaks older
|
||||
# versions of qemu.
|
||||
#
|
||||
# The value is taken from the KSPP recommendations (Debian uses 4096).
|
||||
boot.kernel.sysctl."vm.mmap_min_addr" = mkDefault 65536;
|
||||
|
||||
# Disable ftrace debugging
|
||||
boot.kernel.sysctl."kernel.ftrace_enabled" = mkDefault false;
|
||||
|
||||
@ -140,7 +106,4 @@ with lib;
|
||||
# Ignore outgoing ICMP redirects (this is ipv4 only)
|
||||
boot.kernel.sysctl."net.ipv4.conf.all.send_redirects" = mkDefault false;
|
||||
boot.kernel.sysctl."net.ipv4.conf.default.send_redirects" = mkDefault false;
|
||||
|
||||
# Restrict userfaultfd syscalls to processes with the SYS_PTRACE capability
|
||||
boot.kernel.sysctl."vm.unprivileged_userfaultfd" = mkDefault false;
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ in rec {
|
||||
(onFullSupported "nixos.tests.fontconfig-default-fonts")
|
||||
(onFullSupported "nixos.tests.gnome3")
|
||||
(onFullSupported "nixos.tests.gnome3-xorg")
|
||||
(onFullSupported "nixos.tests.hardened")
|
||||
(onSystems ["x86_64-linux"] "nixos.tests.hibernate")
|
||||
(onFullSupported "nixos.tests.i3wm")
|
||||
(onSystems ["x86_64-linux"] "nixos.tests.installer.btrfsSimple")
|
||||
@ -96,6 +97,8 @@ in rec {
|
||||
(onFullSupported "nixos.tests.keymap.dvp")
|
||||
(onFullSupported "nixos.tests.keymap.neo")
|
||||
(onFullSupported "nixos.tests.keymap.qwertz")
|
||||
(onFullSupported "nixos.tests.latestKernel.hardened")
|
||||
(onFullSupported "nixos.tests.latestKernel.login")
|
||||
(onFullSupported "nixos.tests.lightdm")
|
||||
(onFullSupported "nixos.tests.login")
|
||||
(onFullSupported "nixos.tests.misc")
|
||||
|
@ -101,6 +101,7 @@ in rec {
|
||||
"nixos.tests.installer.separateBoot.x86_64-linux"
|
||||
"nixos.tests.installer.simple.x86_64-linux"
|
||||
"nixos.tests.ipv6.x86_64-linux"
|
||||
"nixos.tests.latestKernel.login.x86_64-linux"
|
||||
"nixos.tests.login.x86_64-linux"
|
||||
"nixos.tests.misc.x86_64-linux"
|
||||
"nixos.tests.nat.firewall-conntrack.x86_64-linux"
|
||||
|
@ -160,6 +160,7 @@ in
|
||||
# kubernetes.e2e should eventually replace kubernetes.rbac when it works
|
||||
#kubernetes.e2e = handleTestOn ["x86_64-linux"] ./kubernetes/e2e.nix {};
|
||||
kubernetes.rbac = handleTestOn ["x86_64-linux"] ./kubernetes/rbac.nix {};
|
||||
latestKernel.hardened = handleTest ./hardened.nix { latestKernel = true; };
|
||||
latestKernel.login = handleTest ./login.nix { latestKernel = true; };
|
||||
ldap = handleTest ./ldap.nix {};
|
||||
leaps = handleTest ./leaps.nix {};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test.nix ({ pkgs, latestKernel ? false, ... } : {
|
||||
name = "hardened";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ joachifm ];
|
||||
@ -10,6 +10,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };
|
||||
users.users.sybil = { isNormalUser = true; group = "wheel"; };
|
||||
imports = [ ../modules/profiles/hardened.nix ];
|
||||
boot.kernelPackages =
|
||||
lib.mkIf latestKernel pkgs.linuxPackages_latest_hardened;
|
||||
environment.memoryAllocator.provider = "graphene-hardened";
|
||||
nix.useSandbox = false;
|
||||
virtualisation.emptyDiskImages = [ 4096 ];
|
||||
@ -23,7 +25,9 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
options = [ "noauto" ];
|
||||
};
|
||||
};
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
|
||||
boot.extraModulePackages =
|
||||
optional (versionOlder config.boot.kernelPackages.kernel.version "5.6")
|
||||
config.boot.kernelPackages.wireguard;
|
||||
boot.kernelModules = [ "wireguard" ];
|
||||
};
|
||||
|
||||
@ -76,7 +80,8 @@ import ./make-test.nix ({ pkgs, ...} : {
|
||||
|
||||
# Test userns
|
||||
subtest "userns", sub {
|
||||
$machine->fail("unshare --user");
|
||||
$machine->succeed("unshare --user true");
|
||||
$machine->fail("su -l alice -c 'unshare --user true'");
|
||||
};
|
||||
|
||||
# Test dmesg restriction
|
||||
|
@ -52,6 +52,6 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ris ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
|
325
pkgs/os-specific/linux/kernel/anthraxx.asc
Normal file
325
pkgs/os-specific/linux/kernel/anthraxx.asc
Normal file
@ -0,0 +1,325 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v2
|
||||
|
||||
mQINBE64OEUBEADPS1v+zoCdKA6zyfUtVIaBoIwMhCibqurXi30tVoC9LgM6W1ve
|
||||
HwPFukWq7DAS0mZUPE3mSV63JFLaTy0bY/6GO1D4wLdWZx4ppH7XKNCvKCbsi70k
|
||||
UozFykNVf+83WEskuF1oYzXlF3aB5suz2I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3oiVg
|
||||
XdOKshyXB+obhRFlWtirK4udX5yYzUpcB0zBoo1hABEBAAGJAiUEGAECAA8CGwwF
|
||||
AlSXVAEFCQfATzwACgkQ/BtUfI2Bcsj0Tw//dyDYwcnh0BIb+nDCXFC91KiPUILa
|
||||
f+wI5w6c9YYEo6TR89q6Wsq8EDiqcqSJcztuNvw3MZGHWA25nNB/0046CGM/tUBd
|
||||
Jyudd3TxQBi6XMMSTbG1EMtSN1UMV4guuUfYcAGW38oZ+YJACCBFFz/Kt0aa/hhi
|
||||
/hBNyvI73vZfQ/fsScFDewkxikUEspRsLVmX6gaEmumOxOhJP3HBoxeBCM4Z3IXo
|
||||
dON2SiiMxt9BPIPJOyKNkFQGQ3dqJIag3GnsZ1s0CEoi8iqF7uS4RjC7uOJtvn74
|
||||
CODxg1Ibl1IweyAuBEA80wUh9DGLAdRJpxWy1B2fDhIROvpcg0R5p6j9UX0b0esc
|
||||
jKLQEiE1wRswjXhWpZhe7Pjl38KhwqMyaeR3OnDtP7JXazIG6HiBIp4cx4k5A2TT
|
||||
X+LhvG3NHCeuxIyjLTRTWgv241kf7uAu+qgjHDSKXQqpjvo+cUYQgSxQZZXnmlz0
|
||||
sz/tEeiWl+i8kW/RNKQvNNR8ghWDW3YRak/zS+WFNoLZchecIzMj+je1vSg411o4
|
||||
Xd3LHDur6boCetaq7ZkqoS+NcX9n8MnKhHKYJblvXyc1h67s90+wSwhlumA8WqlM
|
||||
yqn99m13aF8GuGZbw5B2/x/Cd7WW5wZV6ioola/yqDXB1XtDFBy2Hxr/VMRlE3Cu
|
||||
kekzzVjVTZxOgZE=
|
||||
=yRuG
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
@ -608,6 +608,8 @@ let
|
||||
MODULE_COMPRESS_XZ = yes;
|
||||
KERNEL_XZ = yes;
|
||||
|
||||
SYSVIPC = yes; # System-V IPC
|
||||
|
||||
UNIX = yes; # Unix domain sockets.
|
||||
|
||||
MD = yes; # Device mapper (RAID, LVM, etc.)
|
||||
|
@ -16,32 +16,10 @@ with (stdenv.lib.kernel.whenHelpers version);
|
||||
|
||||
assert (versionAtLeast version "4.9");
|
||||
|
||||
optionalAttrs (stdenv.hostPlatform.platform.kernelArch == "x86_64") {
|
||||
DEFAULT_MMAP_MIN_ADDR = freeform "65536"; # Prevent allocation of first 64K of memory
|
||||
|
||||
# Reduce attack surface by disabling X32
|
||||
X86_X32 = no;
|
||||
# Note: this config depends on EXPERT y and so will not take effect, hence
|
||||
# it is left "optional" for now.
|
||||
MODIFY_LDT_SYSCALL = option no;
|
||||
VMAP_STACK = yes; # Catch kernel stack overflows
|
||||
|
||||
# Randomize position of kernel and memory.
|
||||
RANDOMIZE_BASE = yes;
|
||||
RANDOMIZE_MEMORY = yes;
|
||||
|
||||
# Disable legacy virtual syscalls by default (modern glibc use vDSO instead).
|
||||
#
|
||||
# Note that the vanilla default is to *emulate* the legacy vsyscall mechanism,
|
||||
# which is supposed to be safer than the native variant (wrt. ret2libc), so
|
||||
# disabling it mainly helps reduce surface.
|
||||
LEGACY_VSYSCALL_NONE = yes;
|
||||
} // {
|
||||
{
|
||||
# Report BUG() conditions and kill the offending process.
|
||||
BUG = yes;
|
||||
|
||||
BUG_ON_DATA_CORRUPTION = whenAtLeast "4.10" yes;
|
||||
|
||||
# Safer page access permissions (wrt. code injection). Default on >=4.11.
|
||||
DEBUG_RODATA = whenOlder "4.11" yes;
|
||||
DEBUG_SET_MODULE_RONX = whenOlder "4.11" yes;
|
||||
@ -57,32 +35,17 @@ optionalAttrs (stdenv.hostPlatform.platform.kernelArch == "x86_64") {
|
||||
SECURITY_SELINUX_DISABLE = whenAtLeast "4.12" no;
|
||||
SECURITY_WRITABLE_HOOKS = whenAtLeast "4.12" (option no);
|
||||
|
||||
DEBUG_WX = yes; # boot-time warning on RWX mappings
|
||||
STRICT_KERNEL_RWX = whenAtLeast "4.11" yes;
|
||||
|
||||
# Stricter /dev/mem
|
||||
STRICT_DEVMEM = option yes;
|
||||
IO_STRICT_DEVMEM = option yes;
|
||||
|
||||
# Perform additional validation of commonly targeted structures.
|
||||
DEBUG_CREDENTIALS = yes;
|
||||
DEBUG_NOTIFIERS = yes;
|
||||
DEBUG_LIST = yes;
|
||||
DEBUG_PI_LIST = yes; # doesn't BUG()
|
||||
DEBUG_SG = yes;
|
||||
SCHED_STACK_END_CHECK = yes;
|
||||
|
||||
REFCOUNT_FULL = whenAtLeast "4.13" yes;
|
||||
|
||||
# Perform usercopy bounds checking.
|
||||
HARDENED_USERCOPY = yes;
|
||||
HARDENED_USERCOPY_FALLBACK = whenAtLeast "4.16" no; # for full whitelist enforcement
|
||||
|
||||
# Randomize allocator freelists.
|
||||
SLAB_FREELIST_RANDOM = yes;
|
||||
|
||||
SLAB_FREELIST_HARDENED = whenAtLeast "4.14" yes;
|
||||
|
||||
# Randomize page allocator when page_alloc.shuffle=1
|
||||
SHUFFLE_PAGE_ALLOCATOR = whenAtLeast "5.2" yes;
|
||||
|
||||
@ -98,7 +61,6 @@ optionalAttrs (stdenv.hostPlatform.platform.kernelArch == "x86_64") {
|
||||
SECURITY_SAFESETID = whenAtLeast "5.1" yes;
|
||||
|
||||
# Reboot devices immediately if kernel experiences an Oops.
|
||||
PANIC_ON_OOPS = yes;
|
||||
PANIC_TIMEOUT = freeform "-1";
|
||||
|
||||
GCC_PLUGINS = yes; # Enable gcc plugin options
|
||||
@ -120,7 +82,4 @@ optionalAttrs (stdenv.hostPlatform.platform.kernelArch == "x86_64") {
|
||||
CC_STACKPROTECTOR_REGULAR = whenOlder "4.18" no;
|
||||
CC_STACKPROTECTOR_STRONG = whenOlder "4.18" yes;
|
||||
|
||||
# Enable compile/run-time buffer overflow detection ala glibc's _FORTIFY_SOURCE
|
||||
FORTIFY_SOURCE = whenAtLeast "4.13" yes;
|
||||
|
||||
}
|
||||
|
27
pkgs/os-specific/linux/kernel/hardened-patches.json
Normal file
27
pkgs/os-specific/linux/kernel/hardened-patches.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"4.14.176": {
|
||||
"sha256": "0pr3m2j63mc746fcbzg1hlwv85im9f87qkl6r4033gwnpa9brcgk",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/4.14.176.a/linux-hardened-4.14.176.a.patch",
|
||||
"version_suffix": "a"
|
||||
},
|
||||
"4.19.116": {
|
||||
"sha256": "1f54g0xw708kxha07nsb979h5vwxjrkbwa5h04zny2kq702x1h13",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/4.19.115.a/linux-hardened-4.19.115.a.patch",
|
||||
"version_suffix": "NixOS-a"
|
||||
},
|
||||
"5.4.33": {
|
||||
"sha256": "154iz7i9l0hihjrmfk6rjh7hhqwyhsdjr2c74m3dhadrlm5hwy89",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.4.32.a/linux-hardened-5.4.32.a.patch",
|
||||
"version_suffix": "NixOS-a"
|
||||
},
|
||||
"5.5.17": {
|
||||
"sha256": "1lms090kkk4vlvfssqsm7r3j88hlf8smrnpcgq24v9rq9pbr0fyw",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.5.17.a/linux-hardened-5.5.17.a.patch",
|
||||
"version_suffix": "a"
|
||||
},
|
||||
"5.6.4": {
|
||||
"sha256": "05wkzh7927n71x4cl69mclc44grqpnx6i65hli470q1rg1qrk26n",
|
||||
"url": "https://github.com/anthraxx/linux-hardened/releases/download/5.6.4.a/linux-hardened-5.6.4.a.patch",
|
||||
"version_suffix": "a"
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ fetchpatch }:
|
||||
{ lib, fetchpatch, fetchurl }:
|
||||
|
||||
{
|
||||
bridge_stp_helper =
|
||||
@ -38,6 +38,21 @@
|
||||
patch = ./tag-hardened.patch;
|
||||
};
|
||||
|
||||
hardened = let
|
||||
mkPatch = kernelVersion: patch: let
|
||||
fullVersion = "${kernelVersion}.${patch.version_suffix}";
|
||||
name = "linux-hardened-${fullVersion}";
|
||||
in {
|
||||
inherit name;
|
||||
patch = fetchurl {
|
||||
name = "${name}.patch";
|
||||
inherit (patch) url sha256;
|
||||
meta.maintainers = with lib.maintainers; [ emily ];
|
||||
};
|
||||
};
|
||||
patches = builtins.fromJSON (builtins.readFile ./hardened-patches.json);
|
||||
in lib.mapAttrs mkPatch patches;
|
||||
|
||||
# https://bugzilla.kernel.org/show_bug.cgi?id=197591#c6
|
||||
iwlwifi_mvm_support_version_7_scan_req_umac_fw_command = rec {
|
||||
name = "iwlwifi_mvm_support_version_7_scan_req_umac_fw_command";
|
||||
|
200
pkgs/os-specific/linux/kernel/update-hardened.py
Executable file
200
pkgs/os-specific/linux/kernel/update-hardened.py
Executable file
@ -0,0 +1,200 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i python -p "python3.withPackages (ps: [ps.PyGithub])" git gnupg
|
||||
|
||||
# This is automatically called by ./update.sh.
|
||||
|
||||
import re
|
||||
import json
|
||||
import sys
|
||||
import os.path
|
||||
from glob import glob
|
||||
import subprocess
|
||||
from tempfile import TemporaryDirectory
|
||||
|
||||
from github import Github
|
||||
|
||||
HERE = os.path.dirname(os.path.realpath(__file__))
|
||||
HARDENED_GITHUB_REPO = 'anthraxx/linux-hardened'
|
||||
HARDENED_TRUSTED_KEY = os.path.join(HERE, 'anthraxx.asc')
|
||||
HARDENED_PATCHES_PATH = os.path.join(HERE, 'hardened-patches.json')
|
||||
MIN_KERNEL = (4, 14)
|
||||
|
||||
HARDENED_VERSION_RE = re.compile(r'''
|
||||
(?P<kernel_version> [\d.]+) \.
|
||||
(?P<version_suffix> [a-z]+)
|
||||
''', re.VERBOSE)
|
||||
|
||||
def parse_version(version):
|
||||
match = HARDENED_VERSION_RE.fullmatch(version)
|
||||
if match:
|
||||
return match.groups()
|
||||
|
||||
def run(*args, **kwargs):
|
||||
try:
|
||||
return subprocess.run(
|
||||
args, **kwargs,
|
||||
check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
)
|
||||
except subprocess.CalledProcessError as err:
|
||||
print(
|
||||
f'error: `{err.cmd}` failed unexpectedly\n'
|
||||
f'status code: {err.returncode}\n'
|
||||
f'stdout:\n{err.stdout.decode("utf-8").strip()}\n'
|
||||
f'stderr:\n{err.stderr.decode("utf-8").strip()}',
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
def nix_prefetch_url(url):
|
||||
output = run('nix-prefetch-url', '--print-path', url).stdout
|
||||
return output.decode('utf-8').strip().split('\n')
|
||||
|
||||
def verify_openpgp_signature(*, name, trusted_key, sig_path, data_path):
|
||||
with TemporaryDirectory(suffix='.nixpkgs-gnupg-home') as gnupg_home:
|
||||
run('gpg', '--homedir', gnupg_home, '--import', trusted_key)
|
||||
keyring = os.path.join(gnupg_home, 'pubring.kbx')
|
||||
try:
|
||||
subprocess.run(
|
||||
('gpgv', '--keyring', keyring, sig_path, data_path),
|
||||
check=True, stderr=subprocess.PIPE,
|
||||
)
|
||||
return True
|
||||
except subprocess.CalledProcessError as err:
|
||||
print(
|
||||
f'error: signature for {name} failed to verify!',
|
||||
file=sys.stderr,
|
||||
)
|
||||
print(err.stderr.decode('utf-8'), file=sys.stderr, end='')
|
||||
return False
|
||||
|
||||
def fetch_patch(*, name, release):
|
||||
def find_asset(filename):
|
||||
try:
|
||||
return next(
|
||||
asset.browser_download_url
|
||||
for asset in release.get_assets()
|
||||
if asset.name == filename
|
||||
)
|
||||
except StopIteration:
|
||||
raise KeyError(filename)
|
||||
|
||||
try:
|
||||
patch_url = find_asset(f'{name}.patch')
|
||||
sig_url = find_asset(f'{name}.patch.sig')
|
||||
except KeyError:
|
||||
print(f'error: {name}.patch{{,sig}} not present', file=sys.stderr)
|
||||
return None
|
||||
|
||||
sha256, patch_path = nix_prefetch_url(patch_url)
|
||||
_, sig_path = nix_prefetch_url(sig_url)
|
||||
sig_ok = verify_openpgp_signature(
|
||||
name=name,
|
||||
trusted_key=HARDENED_TRUSTED_KEY,
|
||||
sig_path=sig_path,
|
||||
data_path=patch_path,
|
||||
)
|
||||
if not sig_ok:
|
||||
return None
|
||||
|
||||
return {
|
||||
'url': patch_url,
|
||||
'sha256': sha256,
|
||||
}
|
||||
|
||||
def commit_patches(*, kernel_version, message):
|
||||
with open(HARDENED_PATCHES_PATH + '.new', 'w') as new_patches_file:
|
||||
json.dump(patches, new_patches_file, indent=4, sort_keys=True)
|
||||
new_patches_file.write('\n')
|
||||
os.rename(HARDENED_PATCHES_PATH + '.new', HARDENED_PATCHES_PATH)
|
||||
message = f'linux/hardened-patches/{kernel_version}: {message}'
|
||||
print(message)
|
||||
if os.environ.get('COMMIT'):
|
||||
run(
|
||||
'git', '-C', HERE, 'commit', f'--message={message}',
|
||||
'hardened-patches.json',
|
||||
)
|
||||
|
||||
# Load the existing patches.
|
||||
with open(HARDENED_PATCHES_PATH) as patches_file:
|
||||
patches = json.load(patches_file)
|
||||
|
||||
NIX_VERSION_RE = re.compile(r'''
|
||||
\s* version \s* =
|
||||
\s* " (?P<version> [^"]*) "
|
||||
\s* ; \s* \n
|
||||
''', re.VERBOSE)
|
||||
|
||||
# Get the set of currently packaged kernel versions.
|
||||
kernel_versions = set()
|
||||
for filename in os.listdir(HERE):
|
||||
filename_match = re.fullmatch(r'linux-(\d+)\.(\d+)\.nix', filename)
|
||||
if filename_match:
|
||||
if tuple(int(v) for v in filename_match.groups()) < MIN_KERNEL:
|
||||
continue
|
||||
with open(os.path.join(HERE, filename)) as nix_file:
|
||||
for nix_line in nix_file:
|
||||
match = NIX_VERSION_RE.fullmatch(nix_line)
|
||||
if match:
|
||||
kernel_versions.add(match.group('version'))
|
||||
|
||||
# Remove patches for old kernel versions.
|
||||
for kernel_version in patches.keys() - kernel_versions:
|
||||
del patches[kernel_version]
|
||||
commit_patches(kernel_version=kernel_version, message='remove')
|
||||
|
||||
g = Github(os.environ.get('GITHUB_TOKEN'))
|
||||
repo = g.get_repo(HARDENED_GITHUB_REPO)
|
||||
releases = repo.get_releases()
|
||||
|
||||
found_kernel_versions = set()
|
||||
failures = False
|
||||
|
||||
for release in releases:
|
||||
remaining_kernel_versions = kernel_versions - found_kernel_versions
|
||||
|
||||
if not remaining_kernel_versions:
|
||||
break
|
||||
|
||||
version = release.tag_name
|
||||
name = f'linux-hardened-{version}'
|
||||
version_info = parse_version(version)
|
||||
if not version_info:
|
||||
continue
|
||||
kernel_version, version_suffix = version_info
|
||||
|
||||
if kernel_version in remaining_kernel_versions:
|
||||
found_kernel_versions.add(kernel_version)
|
||||
try:
|
||||
old_version_suffix = patches[kernel_version]['version_suffix']
|
||||
old_version = f'{kernel_version}.{old_version_suffix}'
|
||||
update = old_version_suffix < version_suffix
|
||||
except KeyError:
|
||||
update = True
|
||||
old_version = None
|
||||
|
||||
if update:
|
||||
patch = fetch_patch(name=name, release=release)
|
||||
if patch is None:
|
||||
failures = True
|
||||
else:
|
||||
patch['version_suffix'] = version_suffix
|
||||
patches[kernel_version] = patch
|
||||
if old_version:
|
||||
message = f'{old_version} -> {version}'
|
||||
else:
|
||||
message = f'init at {version}'
|
||||
commit_patches(kernel_version=kernel_version, message=message)
|
||||
|
||||
missing_kernel_versions = kernel_versions - patches.keys()
|
||||
|
||||
if missing_kernel_versions:
|
||||
print(
|
||||
f'warning: no patches for kernel versions ' +
|
||||
', '.join(missing_kernel_versions) +
|
||||
'\nwarning: consider manually backporting older patches (bump '
|
||||
'JSON key, set version_suffix to "NixOS-a")',
|
||||
file=sys.stderr,
|
||||
)
|
||||
|
||||
if failures:
|
||||
sys.exit(1)
|
@ -60,3 +60,6 @@ done
|
||||
|
||||
# Update linux-libre
|
||||
COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-libre.sh
|
||||
|
||||
# Update linux-hardened
|
||||
COMMIT=1 $NIXPKGS/pkgs/os-specific/linux/kernel/update-hardened.py
|
||||
|
@ -249,6 +249,11 @@ mapAliases ({
|
||||
links = links2; # added 2016-01-31
|
||||
linux_rpi0 = linux_rpi1;
|
||||
linuxPackages_rpi0 = linuxPackages_rpi1;
|
||||
|
||||
# added 2020-04-04
|
||||
linuxPackages_testing_hardened = throw "linuxPackages_testing_hardened has been removed, please use linuxPackages_latest_hardened";
|
||||
linux_testing_hardened = throw "linux_testing_hardened has been removed, please use linux_latest_hardened";
|
||||
|
||||
loadcaffe = throw "loadcaffe has been removed, as the upstream project has been abandoned"; # added 2020-03-28
|
||||
lttngTools = lttng-tools; # added 2014-07-31
|
||||
lttngUst = lttng-ust; # added 2014-07-31
|
||||
|
@ -16991,7 +16991,10 @@ in
|
||||
inherit stdenv;
|
||||
inherit (kernel) version;
|
||||
};
|
||||
kernelPatches = kernel.kernelPatches ++ [ kernelPatches.tag_hardened ];
|
||||
kernelPatches = kernel.kernelPatches ++ [
|
||||
kernelPatches.tag_hardened
|
||||
kernelPatches.hardened.${kernel.version}
|
||||
];
|
||||
modDirVersionArg = kernel.modDirVersion + "-hardened";
|
||||
});
|
||||
|
||||
@ -17001,9 +17004,6 @@ in
|
||||
linuxPackages_latest_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor pkgs.linux_latest);
|
||||
linux_latest_hardened = linuxPackages_latest_hardened.kernel;
|
||||
|
||||
linuxPackages_testing_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor pkgs.linux_testing);
|
||||
linux_testing_hardened = linuxPackages_testing_hardened.kernel;
|
||||
|
||||
linuxPackages_xen_dom0_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor (pkgs.linux.override { features.xen_dom0=true; }));
|
||||
|
||||
linuxPackages_latest_xen_dom0_hardened = recurseIntoAttrs (hardenedLinuxPackagesFor (pkgs.linux_latest.override { features.xen_dom0=true; }));
|
||||
|
Loading…
Reference in New Issue
Block a user