CIS 1.7.1.2 on 20.04 AppArmor bootloader does not work on Azure

Bug #1948668 reported by Aaron Whitehouse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Security Certifications
In Progress
Undecided
Adam Bell
cloud-images
Confirmed
Undecided
Unassigned

Bug Description

It looks like there is an Azure-specific bug in the CIS hardening script for rule "Ensure AppArmor is enabled in the bootloader configuration" (CIS 1.7.1.2).

It looks like we append
GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor"
to /etc/default/grub, but Azure has its own /etc/default/grub.d/50-cloudimg-settings.cfg where they define
GRUB_CMDLINE_LINUX="console=tty1 console=ttyS0 earlyprintk=ttyS0"
so we need to be appending the additional lines to that command instead (i.e. to make it GRUB_CMDLINE_LINUX="console=tty1 console=ttyS0 earlyprintk=ttyS0 apparmor=1 security=apparmor")

Adam Bell (arbell)
Changed in ubuntu-security-certifications:
assignee: nobody → Adam Bell (arbell)
Adam Bell (arbell)
Changed in ubuntu-security-certifications:
status: New → Triaged
Revision history for this message
Adam Bell (arbell) wrote :

Hi Aaron (et al),

Is it possible that the /e/d/grub.d/50-cloudimg-settings.cfg GRUB_CMDLINE_LINUX line could be modified to include the previously defined GRUB_CMDLINE_LINUX variable? For example:
```
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX console=tty1 console=ttyS0 earlyprintk=ttyS0"
```

We do the same thing on the FIPS side with GRUB_CMDLINE_LINUX_DEFAULT to add "fips=1" to the command line.

Please let us know whether that could work on the Azure images or whether this would open a different issue on unhardened images.

Changed in ubuntu-security-certifications:
status: Triaged → In Progress
Gauthier Jolly (gjolly)
Changed in cloud-images:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.