STIGhubSTIGhub
STIGsSearchCompareAbout

STIGhub

A free tool to search and browse the entire DISA STIG library. Saves up to 75% in security compliance research time.

Navigation

  • Browse STIGs
  • Search
  • Compare Versions

Resources

  • About
  • VPAT
  • DISA STIG Library
Powered by Pylon
© 2026 Beacon Cloud Solutions, Inc. All rights reserved.
← Back to Anduril NixOS Security Technical Implementation Guide

V-268160

CAT II (Medium)

NixOS must implement nonexecutable data to protect its memory from unauthorized code execution.

Rule ID

SV-268160r1131126_rule

STIG

Anduril NixOS Security Technical Implementation Guide

Version

V1R2

CCIs

CCI-002824, CCI-001082

Discussion

Some adversaries launch attacks with the intent of executing code in nonexecutable regions of memory or in memory locations that are prohibited. Security safeguards employed to protect memory include, for example, data execution prevention and address space layout randomization. Data execution prevention safeguards can either be hardware-enforced or software-enforced with hardware providing the greater strength of mechanism. Examples of attacks are buffer overflow attacks. Satisfies: SRG-OS-000433-GPOS-00192, SRG-OS-000132-GPOS-00067

Check Content

Verify NixOS prevents internal kernel addresses from being leaked with the following command:

$ sudo sysctl kernel.kptr_restrict

 kernel.kptr_restrict = 1

If "kernel.kptr_restrict" does not have a value of "1" or is missing, this is a finding.

Fix Text

Configure NixOS to prevent internal kernel addresses from being leaked.

Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix:

 boot.kernel.sysctl = {
"kernel.kptr_restrict" = 1;
};

Rebuild and switch to the new NixOS configuration:
$ sudo nixos-rebuild switch