systemd v239 (networkd && resolved) containers broken by AA

jwh

New Member
Jul 13, 2018
3
1
3
54
Hi guys,

Just stumbled across this one - using Arch in a container, once upgraded to v239 (which uses dynamic users for networkd and resolved), AA seems to be breaking it for some reason, setting the profile to unconfined allows it to work - unprivileged container is not enough

Just wondering if anyone had come across this yet?

Container journal:

systemd[51]: systemd-networkd.service: Failed to update dynamic user credentials: Permission denied
systemd[51]: systemd-networkd.service: Failed at step USER spawning /usr/lib/systemd/systemd-networkd: Permission denied
 
Last edited:
  • Like
Reactions: BerndA
So it's actually being denied the ability to create a lock on a socket it would appear?

Jul 14 16:47:44 vm1 audit[3315869]: AVC apparmor="DENIED" operation="file_lock" profile="lxc-container-default-cgns" pid=3315869 comm="systemd" family="unix" sock_type="dgram" protocol=0 addr=none
Jul 14 16:47:44 vm1 audit[3315869]: AVC apparmor="DENIED" operation="file_lock" profile="lxc-container-default-cgns" pid=3315869 comm="systemd" family="unix" sock_type="dgram" protocol=0 addr=none
Jul 14 16:47:44 vm1 audit[3316074]: AVC apparmor="DENIED" operation="file_lock" profile="lxc-container-default-cgns" pid=3316074 comm="(networkd)" family="unix" sock_type="dgram" protocol=0 addr=none
Jul 14 16:47:44 vm1 audit[3316074]: AVC apparmor="DENIED" operation="file_lock" profile="lxc-container-default-cgns" pid=3316074 comm="(networkd)" family="unix" sock_type="dgram" protocol=0 addr=none
Jul 14 16:47:44 vm1 audit[3316074]: AVC apparmor="DENIED" operation="file_lock" profile="lxc-container-default-cgns" pid=3316074 comm="(networkd)" family="unix" sock_type="dgram" protocol=0 addr=none
Jul 14 16:47:44 vm1 audit[3316074]: AVC apparmor="DENIED" operation="file_lock" profile="lxc-container-default-cgns" pid=3316074 comm="(networkd)" family="unix" sock_type="dgram" protocol=0 addr=none

How do I tell this apparmor nonsense to allow it?
 
Ah I didn't come across those, makes sense!

Are you guys going to wait until its backported?
 
Depends on how long it takes. The fixes need to appear upstream first.
 
They ended up with a kernel-side fix for this. There's a kernel in the `pvetest` repository ready to be tested. Package pve-kernel-4.15.18-1-pve version 4.15.18-17.
 
New kernel fixed it for me. I can now boot Arch containers that use the new systemd version.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!