STIGhubSTIGhub
STIGsRMF ControlsCompare
STIGhub— A free STIG search and compliance tool·STIGs updated 3 days ago
Powered by Pylon·Privacy·Terms·© 2026 Beacon Cloud Solutions, Inc.
← Back to Anduril NixOS Security Technical Implementation Guide

V-268161

CAT II (Medium)

NixOS must implement address space layout randomization to protect its memory from unauthorized code execution.

Rule ID

SV-268161r1131128_rule

STIG

Anduril NixOS Security Technical Implementation Guide

Version

V1R2

CCIs

CCI-002824

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.

Check Content

Verify NixOS enables address space layout randomization with the following command:

$ sudo sysctl kernel.randomize_va_space

kernel.randomize_va_space = 2

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

Fix Text

Configure /etc/nixos/configuration.nix to enable ASLR.

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.randomize_va_space" = 2;
};

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