NixOS must remove all software components after updated versions have been installed.
Overview
Finding ID
Version
Rule ID
IA Controls
Severity
V-268162
ANIX-00-001680
SV-268162r1039374_rule
Medium
Description
Previous versions of software components that are not removed from the information system after updates have been installed may be exploited by adversaries. Some information technology products may remove older versions of software automatically from the information system.
Verify NixOS removes all software components after updated versions have been installed by reviewing /etc/nixos/configuration.nix and remove any references to outdated versions of nixpkgs.
If any outdated versions of nixpkgs are present in the configuration.nix file, this is a finding.
Fix Text (F-71989r1039373_fix)
After updating NixOS (either via "cd /etc/nixos; sudo nix flake update; sudo nixos-rebuild switch" or "sudo nixos-rebuild switch –upgrade"), reboot the system to ensure all running software comes from the current active NixOS generation.
Edit /etc/nixos/configuration.nix and remove any references to outdated versions of nixpkgs.