/srv/irclogs.ubuntu.com/2024/06/14/#ubuntu-security.txt

=== chris14_ is now known as chris14
=== crazybyte22 is now known as crazybyte2
=== ahasenack_ is now known as ahasenack
ahasenackhi #security, georgiag if you are around19:38
ahasenackI'm on patch pilot, and reviewing a patch19:38
ahasenackit's one of those apparmor profiles that is generated by an application, and loaded into the kernel, without a source text file in /etc/apparmor.d19:39
ahasenackthis is the patch: https://github.com/containers/common/commit/1aedc12e356cfd29a5bb54d94e9b2e09da3649ca19:39
-ubottu:#ubuntu-security- Commit 1aedc12 in containers/common "Update apparmor profile to support v4.0.0"19:39
ahasenackthat template is used by podman when creating a container on-the-fly19:39
ahasenackmy problem is not that the fix does not work, it does19:40
ahasenackBUT19:40
ahasenackthe package doesn't do any profile reloading after it's upgraded19:40
ahasenackso even if I update podman with the fix, and even start new profiles, they won't load the fresh profile, they will use the one that is already loaded, and wrong19:40
ahasenackso I guess my guestion is, how can I sort this? Can I unload a specific profile, without having its "source" on disk? And even that is not optimal, as it will affect every container that is still running19:41
ahasenackand I can't just attach the new one after, because it doesn't exist on disk19:41
ahasenackcontext is https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/204048319:45
-ubottu:#ubuntu-security- Launchpad bug 2040483 in libpod (Ubuntu Noble) "AppArmor denies crun sending signals to containers (stop, kill)" [Undecided, Confirmed]19:45
ahasenackaa-disable <name> doesn't work: https://pastebin.ubuntu.com/p/HQMtDjtBY2/19:47
sdezielahasenack: `echo -n "/usr/bin/evince" > /sys/kernel/security/apparmor/.remove` worked for me19:52
georgiagyou can unload a profile by echo -n profilename > /sys/kernel/security/apparmor/.remove19:52
ahasenacklet me try19:52
ahasenackok, that worked, and of course made all running containers unconfined19:53
ahasenackbut then at least I can stop them19:53
ahasenackthis sounds like something upstream should work on19:54
georgiagyeah, it does. there should be an option to reload the profile. all containers use the same profile?19:56
georgiagdo all containers use the same profile?*19:56
ahasenackyes, it's the same, it's not as dynamic as in the libvirt case, with an uuid19:57
ahasenackand per vm19:57
ahasenack[Fri Jun 14 19:38:11 2024] audit: type=1400 audit(1718393892.183:141): apparmor="DENIED" operation="signal" class="signal" profile="containers-default-0.57.4" pid=2309 comm="3" requested_mask="receive" denied_mask="receive" signal=quit peer="crun"19:57
ahasenackit's that containers-default-0.57.419:57
ahasenackhm, that version, where does it come from19:57
ahasenackthe podman package is 4.9.4+ds1-119:57
ahasenacksrc:golang-github-containers-common which is where the profile definition is in, is version 0.57.4+ds1-2ubuntu119:58
ahasenackaha19:58
georgiagthat's unfortunate, I didn't look deeper into it but I thought that was the point of having "profile {{.Name}}"19:58
ahasenackso perhaps to trigger the new profile, that version needs to change19:58
ahasenackthing is, we wouldn't change 0.57.4, in our case it's the ubuntuN suffix19:58

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!