/srv/irclogs.ubuntu.com/2021/10/05/#ubuntu-security.txt

sdezielI'm looking at a problem involving LXD, Apparmor and mount rules and I'd appreciate if someone could help me :)00:39
sdezielwhat I'm seeing suggest that mount options *ordering* would be relevant00:39
sarnoldyou should pick easier problems :)00:39
sdezielhttps://github.com/lxc/lxd/blob/master/lxd/apparmor/instance_lxc.go#L177: mount options=(ro,remount,bind,noatime) /[^spd]*{,/**},00:39
sdezielhttps://github.com/lxc/lxd/blob/master/lxd/apparmor/instance_lxc.go#L194: mount options=(ro,remount,noatime,bind) /[^spd]*{,/**},00:39
sdezielsarnold: haha00:40
sdezielare the above 2 rules redundant and LXD devs were overly zealous? Or is AppArmor really that picky?00:40
sdezielor maybe a past version of AppArmor was had a bug forcing this kind of workaround?00:41
sdezielsarnold: I don't think I pick problems, they seem to pick me </victim>00:42
sarnoldsdeziel: I'm pretty sure those compile to the same thing..00:46
sarnoldoh ffs .. I overlooked that these dump output to stderr, no stdout..00:47
sdezielsarnold: if you are positive those compile to the same, I'll send a PR killing this madness ;)00:48
sarnoldhttps://termbin.com/qpfjo00:48
sdezielsarnold: thanks for checking and teaching me how to do, much appreciated (as always)00:49
sarnoldsdeziel: it'd be reassuring if you fiddled with it a bit and saw similar things to convince you :) hehe00:50
sdezielsarnold: I intend to compare 2 dumps of the lxd generated profiles, one as-is and the other with the order alternations removed. I'd do this once on 18.04 and another on 20.04. Does that sound like a good test? Or should I throw in something more modern in terms of AA version?00:54
sarnoldsdeziel: that sounds like an excellent approach :)00:55
sdezielawesome, thanks again!00:55
sarnoldsdeziel: it might also be possible / better to compare the binary blobs from the cache directories, but I don't know for sure that they're going to be deterministic ;(00:55
sarnoldI sure expect them to be..00:55
sdezielyeah, good point00:58
sdezielsarnold: let's hope I did it right: https://github.com/lxc/lxd/pull/934203:36
ubottuPull 9342 in lxc/lxd "Apparmor simplification" [Open]03:36
sarnoldsdeziel: woot! nice :) thanks17:07

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