NixOS must implement address space layout randomization to protect its memory from unauthorized code execution.
Overview
| Finding ID | Version | Rule ID | IA Controls | Severity |
| V-268161 | ANIX-00-001670 | SV-268161r1039371_rule | CCI-002824 | medium |
| Description | ||||
| 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. | ||||
| STIG | Date | |||
| Anduril NixOS Security Technical Implementation Guide | 2024-10-25 | |||
Related Frameworks
2 paths across 2 frameworks
Related Frameworks
NIST 800-531 mapping
SI-16
1.00
- DISA · 1 · disa_xccdf · related
- DISA · 2025-01-23 · disa_cci_list · equivalent
CCI1 mapping
CCI-002824
1.00
- DISA · 1 · disa_xccdf · related
Details
Check Text (C-268161r1039371_chk)
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 (F-71988r1039370_fix)
Configure /etc/nixos/configuration.nix to enable ASLR by adding the following configuration settings:
boot.kernel.sysctl = {
"kernel.randomize_va_space" = 2;
};
Rebuild the system with the following command:
$ sudo nixos-rebuild switch