The Ubuntu operating system must be configured so that Advance package Tool (APT) removes all software components after updated versions have been installed.

STIG ID: UBTU-18-010017  |  SRG: SRG-OS-000437-GPOS-00194 |  Severity: medium |  CCI: CCI-002617 |  Vulnerability Id: V-219156 | 

Vulnerability Discussion

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.

Check

Verify Advance package Tool (APT) is configured to remove all software components after updated versions have been installed.

Check that APT is configured to remove all software components after updating with the following command:

# grep -i remove-unused /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";

If the "::Remove-Unused-Dependencies" and "::Remove-Unused-Kernel-Packages" parameters are not set to "true", or are missing, or are commented out, this is a finding.

Fix

Configure APT to remove all software components after updated versions have been installed.

Add or updated the following options to the "/etc/apt/apt.conf.d/50unattended-upgrades" file:

Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";