[regression] NoNewPrivileges incompatible with Apparmor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Confirmed
|
Undecided
|
Unassigned | ||
Bionic |
Confirmed
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Description:
Host: Bionic 64 bit with GA kernel (4.15)
Container: Bionic 64 bit
The container runs a binary (/usr/sbin/nsd) locked by an Apparmor profile. The systemd service is configured with NoNewPrivileges
# systemctl show nsd | grep ^NoNew
NoNewPrivileg
This setup worked fine with 4.15.0-58-generic and before but stopped working with the 4.15.0-60-generic update. When running the bogus kernel, starting the nsd service fails and the following is logged in the host's dmesg:
audit: type=1400 audit(156838783
audit: type=1400 audit(156838783
Disabling the Apparmor profile OR setting NoNewPrivileges=no in the container makes it work again.
I check with a couple of kernels:
4.15.0-52-generic works
4.15.0-58-generic works
4.15.0-60-generic is broken
The 5.0 HWE kernel has always been broken it seems:
5.0.0-15-generic is broken
5.0.0-17-generic is broken
5.0.0-20-generic is broken
5.0.0-23-generic is broken
5.0.0-25-generic is broken
5.0.0-27-generic is broken
I have another similar setup but using Xenial host/container and it broke in a similar fashion where 4.4.0-159-generic works but 4.4.0-161-generic is broken.
Additional information:
# lsb_release -rd
Description: Ubuntu 18.04.3 LTS
Release: 18.04
# apt-cache policy nsd
nsd:
Installed: 4.1.26-
Candidate: 4.1.26-
Version table:
*** 4.1.26-
500 http://
100 /var/lib/
4.1.17-1build1 500
500 http://
nsd comes from a custom backport this should be irrelevant.
nsd's custom Apparmor profile: https:/
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-
ProcVersionSign
Uname: Linux 5.0.0-27-generic x86_64
NonfreeKernelMo
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Sep 16 18:02 seq
crw-rw---- 1 root audio 116, 33 Sep 16 18:02 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Date: Mon Sep 16 18:14:02 2019
InstallationDate: Installed on 2019-08-22 (24 days ago)
InstallationMedia: Ubuntu-Server 18.04.3 LTS "Bionic Beaver" - Release amd64 (20190805)
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
MachineType: Dell Inc. Inspiron 530s
PciMultimedia:
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
TERM=xterm-
PATH=(custom, no user)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.173.9
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/24/2009
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.0.18
dmi.board.name: 0RY007
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 3
dmi.chassis.vendor: Dell Inc.
dmi.chassis.
dmi.modalias: dmi:bvnDellInc.
dmi.product.name: Inspiron 530s
dmi.sys.vendor: Dell Inc.
description: | updated |
description: | updated |
Changed in linux (Ubuntu Disco): | |
status: | New → Confirmed |
Changed in linux (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in linux (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in linux (Ubuntu Disco): | |
status: | Confirmed → Fix Committed |
Changed in linux (Ubuntu Eoan): | |
status: | Confirmed → Fix Committed |
This change was made by a bot.