Skip to content

Use paxctld to manage all PaX flags in Ubuntu Focal #4134

@emkll

Description

@emkll

Description

Initially raised during review of #4114, we should consolidate the PaX flag management logic. We are using both paxctl and paxctld for management of PaX flags, it would be best to maintain a single paxctld.conf file with all flags. It will also simplify some of the install logic, and allow us to more consistenly apply these flags to binaries and persist reboots (as an added feature, it might also help address #3916).

We could also evaluate and reuse what was done as part of the SecureDrop Workstation as an example: https://github.com/freedomofpress/securedrop-debian-packaging/tree/master/securedrop-workstation-svs-disp

UPDATE 2020-11-16

The following based on a conversation with @conorsch, as part of the current sprint commitments:

The paxctl header formats/commands are different in Focal from Xenial, and as a result, some existing paxctl logic from Xenial will not work in Focal. Specifically, updates to the flags for grub binaries (grub-probe, grub-mkdevicemap, grub-script-check) will not work in Focal under the current logic[1]. If grub is updated, PaX flags won't be applied, leading to cascading failures (grub update will fail, kernel update will fail, packages may be held back/broken)

Based on our conversation, we went through various approaches and decided on the following:

  1. Fork securedrop-grsec for Focal only (and leave the existing version for Xenial unchanged, because it works and we aren't supporting Xenial for much longer)
  2. Add paxctld to the Requires field in the Control file. Since we are installing from scratch on Focal, it's a good opportunity to add, but also make 1. easier.
  3. Add a securedrop-managed paxctld.conf file to the Focal-specific metapackage, to configure the pax flags as we would expect them.
  4. Remove kernel postinst file from the metapackage, since use of paxctld makes use of paxctl moot

User Stories

As a SecureDrop administrator or developer, I would like to manage all PaX flags in a single place and would like to consistently apply them across the system.

[1] https://github.com/freedomofpress/securedrop/blob/develop/install_files/securedrop-grsec/etc/kernel/postinst.d/paxctl-grub

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions