Skip to content

CIS Linux Benchmark Level 2 Compliance

Comprehensive engineering specification mapping Center for Internet Security (CIS) Benchmark Level 2 controls to compile-time Linux kernel configuration options and sysfs parameters.


1. Scope & Level 2 Mandate

The CIS Distribution-Independent Linux Benchmark categorizes security configurations into:

  • Level 1 (Basic / Operational): Prudent security baselines achievable with minimal performance impact and broad software compatibility.
  • Level 2 (High-Security / Defense-in-Depth): Specialized security controls for high-assurance, multi-tenant environments where attack surface minimization supersedes legacy backwards compatibility.

In cordanaLLM/nucleus, kernel configuration fragments (kconfig/security-hardened.config and the architecture fragments, resolved onto the architecture's defconfig and checked for survival by scripts/merge-config.sh --source-tree) directly enforce CIS Level 2 requirements at compile time, guaranteeing that unauthorized features cannot be activated even if requested by user-space binaries.

graph TD
    subgraph CIS_L2["CIS Linux Benchmark Level 2 Domains"]
        FS["Domain 1: Filesystem Surface Elimination"]
        NET["Domain 3: Legacy Protocol Neutralization"]
        AUDIT["Domain 4: Syscall Auditing & Telemetry"]
        MAC["Domain 5: Mandatory Access Control & LSM"]
        LOCK["Domain 1.4: Kernel Lockdown & Signature Enforcement"]
    end

    subgraph KConfig["nucleus Implementations"]
        FS_CFG["Disable cramfs, freevxfs, jffs2, hfs, hfsplus, squashfs unpriv"]
        NET_CFG["Disable DCCP, SCTP, RDS, TIPC, ATM, FireWire"]
        AUDIT_CFG["CONFIG_AUDIT=y & CONFIG_AUDITSYSCALL=y"]
        MAC_CFG["CONFIG_SECURITY_APPARMOR=y & CONFIG_BPF_LSM=y"]
        LOCK_CFG["CONFIG_SECURITY_LOCKDOWN_LSM=y & MODULE_SIG=y"]
    end

    FS --> FS_CFG
    NET --> NET_CFG
    AUDIT --> AUDIT_CFG
    MAC --> MAC_CFG
    LOCK --> LOCK_CFG

2. CIS Level 2 Compliance Matrix

CIS Control ID CIS Requirement Description Kernel KConfig / Sysctl Primitive Enforcement Status
1.1.1.1 Disable unneeded cramfs filesystem CONFIG_CRAMFS=n Enforced (Compile-time)
1.1.1.2 Disable unneeded freevxfs filesystem CONFIG_VXFS_FS=n Enforced (Compile-time)
1.1.1.3 Disable unneeded jffs2 filesystem CONFIG_JFFS2_FS=n Enforced (Compile-time)
1.1.1.4 Disable unneeded hfs filesystem CONFIG_HFS_FS=n Enforced (Compile-time)
1.1.1.5 Disable unneeded hfsplus filesystem CONFIG_HFSPLUS_FS=n Enforced (Compile-time)
1.1.1.6 Disable unneeded squashfs unprivileged mount CONFIG_SQUASHFS=m (Restricted) Enforced (Module)
1.1.1.7 Disable unneeded udf filesystem CONFIG_UDF_FS=n Enforced (Compile-time)
1.4.1 Ensure module signature validation CONFIG_MODULE_SIG=y; every module signed after the build by scripts/sign_kernel_modules.py and checked by the artifact gate (ADR-0016) Enforced (Compile-time and artifact gate)
1.4.2 Ensure kernel lockdown LSM enabled CONFIG_SECURITY_LOCKDOWN_LSM=y Enforced (Compile-time)
3.4.1 Disable DCCP protocol CONFIG_IP_DCCP=n Enforced (Compile-time)
3.4.2 Disable SCTP protocol CONFIG_IP_SCTP=n Enforced (Compile-time)
3.4.3 Disable RDS protocol CONFIG_RDS=n Enforced (Compile-time)
3.4.4 Disable TIPC protocol CONFIG_TIPC=n Enforced (Compile-time)
4.1.1 Ensure audit subsystem is active CONFIG_AUDIT=y, CONFIG_AUDITSYSCALL=y Enforced (Compile-time)
5.2.1 Ensure AppArmor / LSM stack configured CONFIG_LSM="landlock,lockdown,yama,apparmor,bpf", set in kconfig/security-hardened.config for every architecture Enforced (Compile-time)

3. Kernel Configuration Fragment (cis-l2.config)

Not implemented: no cis-l2.config fragment exists in kconfig/, and no build merges one. The block below is the intended content, kept as the specification for that work:

# CIS Domain 1: Obsolete Filesystem Drivers
CONFIG_CRAMFS=n
CONFIG_VXFS_FS=n
CONFIG_JFFS2_FS=n
CONFIG_HFS_FS=n
CONFIG_HFSPLUS_FS=n
CONFIG_UDF_FS=n

# CIS Domain 1.4: Cryptographic Module Signatures & Lockdown
CONFIG_MODULE_SIG=y
# CONFIG_MODULE_SIG_ALL is not set (modules are signed after the build, ADR-0016)
CONFIG_MODULE_SIG_SHA512=y
CONFIG_MODULE_SIG_FORCE=n
CONFIG_SECURITY_LOCKDOWN_LSM=y
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y

# CIS Domain 3: Rare & Exploitable Network Protocols
CONFIG_IP_DCCP=n
CONFIG_IP_SCTP=n
CONFIG_RDS=n
CONFIG_TIPC=n
CONFIG_NET_ATM=n
CONFIG_IEEE1394=n
CONFIG_FIREWIRE=n

# CIS Domain 4: Comprehensive Syscall Auditing
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_WATCH=y
CONFIG_AUDIT_TREE=y

# CIS Domain 5: Security Modules & LSM Stacking
CONFIG_SECURITY=y
CONFIG_SECURITY_APPARMOR=y
CONFIG_SECURITY_YAMA=y
CONFIG_SECURITY_LANDLOCK=y
CONFIG_BPF_LSM=y
CONFIG_DEFAULT_SECURITY_APPARMOR=y
CONFIG_LSM="landlock,lockdown,yama,apparmor,bpf"

Of this block, the fragments in kconfig/ declare the LSM symbols today: kconfig/security-hardened.config sets CONFIG_LSM, CONFIG_SECURITY_LOCKDOWN_LSM and CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE; every architecture fragment sets CONFIG_SECURITY, CONFIG_SECURITY_APPARMOR and CONFIG_DEFAULT_SECURITY_APPARMOR; kconfig/x86_64.config sets CONFIG_BPF_LSM. CONFIG_LSM is set explicitly because it is a string: once a base .config records one, make olddefconfig keeps it, so an arm64 or riscv64 defconfig base would leave AppArmor built but off the list and inactive. An LSM the list names but the kernel does not build, such as landlock or yama today, is skipped at boot.

No fragment requests the other symbols of the block, so the architecture's defconfig decides them. The kernel-<stream>-x86_64.config asset of a release shows the resolved values.


4. Kernel Lockdown LSM Explained

The Kernel Lockdown mechanism prevents user-space root accounts from modifying the running kernel code or reading secret memory structures:

  • Integrity Mode (lockdown=integrity):
  • Blocks direct hardware access via /dev/mem, /dev/kmem, and /dev/port.
  • Disallows raw I/O port instructions (iopl, ioperm).
  • Restricts ACPI custom tables and EFI variable mutation.
  • Mandates cryptographic module signature checking for all dynamically inserted modules.
  • Confidentiality Mode (lockdown=confidentiality):
  • Extends integrity mode by also preventing root from reading kernel memory contents (e.g. via /proc/kcore or raw PCI configuration spaces), protecting in-memory encryption keys and TLS credentials.

In cordanaLLM/nucleus, the kernel supports runtime transition to lockdown=integrity automatically whenever UEFI Secure Boot is active.


5. Automated Compliance Audit

Not implemented: full CIS Level 2 compliance verification is not automated in CI today. Existing test gates (tests/test_kconfig.py) verify kernel configuration baseline properties such as KSPP options and BPF trampoline requirements, but do not assert the full CIS Level 2 suite.