I had to change the script a bit to be able to launch a xenial lxd vm.
Here are the results:
# Testing series xenial
###########################################
Creating xenial-2067810
Device config added to xenial-2067810
Waiting for container IP
Waiting for container ssh
Connection to 10.0.102.82 22 port [tcp/ssh] succeeded!
Waiting for cloud-init to be done
timeout: unrecognized option '--verbose'
Try 'timeout --help' for more information.
cloud-init status --wait failed on container xenial-2067810
dpkg-preconfigure: unable to re-open stdin: No such file or directory
# Latest u-a-t is installed
###########################################
ubuntu-advantage-tools:
Installed: 32.3~16.04
Candidate: 32.3~16.04
Version table:
*** 32.3~16.04 500
500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
100 /var/lib/dpkg/status
###########################################
# Creating conditions for the bug
###########################################
###########################################
# Reproducing the bug
###########################################
# Triggering apparmor DENIED messages
###########################################
# aa-exec -p ubuntu_pro_esm_cache//dpkg dpkg --print-foreign-
architectures
# dmesg:
[Fri Jun 21 21:45:19 2024] audit: type=1400 audit(1719006320.072:25):
apparmor="DENIED" operation="open" profile="ubuntu_pro_esm_cache//dpkg"
name="/var/lib/dpkg/arch" pid=2471 comm="dpkg" requested_mask="r"
denied_mask="r" fsuid=0 ouid=0
# aa-exec -p ubuntu_pro_esm_cache apt-cache policy | head
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages
release
v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=multiverse,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
release
v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=universe,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
# dmesg:
[Fri Jun 21 21:45:20 2024] audit: type=1400 audit(1719006321.448:26):
apparmor="DENIED" operation="open" profile="ubuntu_pro_esm_cache//dpkg"
name="/var/lib/dpkg/arch" pid=2478 comm="dpkg" requested_mask="r"
denied_mask="r" fsuid=0 ouid=0
[Fri Jun 21 21:45:20 2024] audit: type=1400 audit(1719006321.452:27):
apparmor="DENIED" operation="open" profile="ubuntu_pro_esm_cache//dpkg"
name="/var/lib/dpkg/arch" pid=2479 comm="dpkg" requested_mask="r"
denied_mask="r" fsuid=0 ouid=0
# esm-cache.service test
###########################################
# /var/lib/apt/periodic/ contents
###########################################
total 8
drwxr-xr-x 2 root root 4096 Jun 21 21:45 .
drwxr-xr-x 6 root root 4096 Jun 21 21:45 ..
# systemctl start esm-cache.service
# dmesg:
# Updating to proposed
###########################################
deb http://archive.ubuntu.com/ubuntu xenial-proposed main
dpkg-preconfigure: unable to re-open stdin: No such file or directory
ubuntu-advantage-tools:
Installed: 32.3.1~16.04
Candidate: 32.3.1~16.04
Version table:
*** 32.3.1~16.04 500
500 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 Packages
100 /var/lib/dpkg/status
32.3~16.04 500
500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
# Now there must be no apparmor DENIED messages
###########################################
# Triggering apparmor DENIED messages
###########################################
# aa-exec -p ubuntu_pro_esm_cache//dpkg dpkg --print-foreign-
architectures
# dmesg:
# aa-exec -p ubuntu_pro_esm_cache apt-cache policy | head
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-proposed,n=xenial,l=Ubuntu,c=main,b=amd64
origin archive.ubuntu.com
500 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages
release
v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=multiverse,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
# dmesg:
# esm-cache.service test
###########################################
# /var/lib/apt/periodic/ contents
###########################################
total 8
drwxr-xr-x 2 root root 4096 Jun 21 21:45 .
drwxr-xr-x 6 root root 4096 Jun 21 21:45 ..
# systemctl start esm-cache.service
# dmesg:
TEST SUCCEEDED
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2067810
Title:
Apparmor denial on /var/lib/dpkg/arch
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/2067810/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs