/srv/irclogs.ubuntu.com/2022/09/06/#ubuntu-security.txt

stacktoodeepI'm having issues with apparmour blocking signals to docker containers in Ubuntu 22. I'm a bit baffled as I have two machines with fresh installs of Ubuntu, and docker installed via apt, but this only happens on one machine. Any recommendations on how to solve this?13:56
stacktoodeepThis is a log from dmesg:13:56
stacktoodeep[ 3909.261432] audit: type=1400 audit(1662471984.785:48): apparmor="DENIED" operation="signal" profile="docker-default" pid=3310 comm="runc" requested_mask="receive" denied_mask="receive" signal=term peer="snap.docker.dockerd"13:56
ebarrettojjohansen, georgiag ^ 14:02
georgiagstacktoodeep: sorry, I'm not familiar on how docker apparmor policies work, but I found weird that you installed docker via apt and the peer of the log is "snap.docker.dockerd"14:27
ebarrettogeorgiag, I think the docker deb package was modified to install the docker snap instead, much like chromium deb14:31
ahasenackin jammy docker.io still looks like the real thing14:46
ahasenack150Mb or so for "installed-size"14:47
ahasenackbut there is a docker snap, published by canonical14:47
ahasenackdocker has a default apparmor profile, from upstream, generated on the fly14:50
ahasenackhttps://github.com/moby/moby/blob/master/profiles/apparmor/template.go14:50
ahasenackthe signal block bits are in line 2714:50
ahasenackit probably doesn't know about snaps14:51
jjohansenindeed, that looks to be it14:53
jjohansenso I don't know why this is happening on only one machine, but the issue looks to be that the docker-default profile doesn't know about snap.docker.dockerd14:55
jjohansenfirst thing to check is if docker-default is loaded on both systems (it obviously is on the one)14:57
ahasenackand that one machine is running the dockerd snap14:57
jjohansensudo aa-status14:57
jjohansenyep14:57
ahasenackbecause the sender of the signal is snap.docker.docker14:57
ahasenackbecause the sender of the signal is snap.docker.dockerd14:57
ahasenacknot just dockerd14:57
jjohansenand that is the next thing to look for in the output of aa-status, does the machine that is not failing have snap.docker.dockerd in its aa-status output14:58
ahasenackthat profile might also only exist if there is an actual docker daemon and/or container running14:59
ahasenackexist == be loaded14:59
jjohansenright14:59
stacktoodeepjjohansen yup, on the working machine it does not have snap.docker.dockerd but it does have specific ones for each running container (eg.  /usr/local/bin/node (66090) docker-default)15:00
jjohansenstacktoodeep: what does the command15:04
jjohansensnap list15:04
jjohansenshow on each system, is it the same?15:04
stacktoodeepjjohansen: On the working box docker is not via snap . The broken box is local, the working one is on AWS - so my assumption is that due to the different repos AWS instances use out of the box it didn't pull in the snap.16:08
stacktoodeepI've got docker installed from the official repo on the local machine, everything seems to work16:10
jjohansenah, that would do it16:10
ahasenackyou said the broken box is local, and then that you have upstream docker installed on the local machine and that it is working? Those statements are conflicting17:01
tewardpfsmorigo: sarnold: has anyone reported problems in Ubuntu 22.04 with openssl being *unable* to extract certs from or even open pkcs12 files?19:18
sarnoldteward: the closest I think I've heard is that the openssl command changed which subcommand works with (some type of file that I've forgotten) -- it's possible that what you're trying to do may have changed to a different subcommand19:26
tewardsarnold: no, i don't think so, i think this is a change to 22.04's security defaults for sig algos.  Which some PKCS12 exporters still use 'old' (pfSense)19:26
tewarddigital envelope routines:inner_evp_generic_fetch:unsupported:../crypto/evp/evp_fetch.c:349:Global default library context, Algorithm (RC2-40-CBC : 0)19:27
tewardworks fine in 20.04 but this one is a perfectly fine .p12 that is no longer able to be exported19:27
tewardi WONDER if this is because of default security level changes19:27
tewardi'm doing some testing19:27
sarnoldoof :) rc2, 40 bits.. that's not much more than rot13, heh19:28
tewardyeah that explains a lot i'll have to do some stuff to make this work19:28
teward*does come chaos-fu*19:28
tewardthank you old 20.04 containers.19:32
tewardguess i'mma keep an old 20.04 container around for "older openssl" and open some major bugs at pfSense heh19:32
tewardsarnold: any easy way to find the current default encryption algos used for p12 files in OPenSSL?19:39
sbeattiehrm, I would have hated to do it, but there was precedent for keeping an openssl1.1 in jammy for such purposes.19:39
tewardsbeattie: well, in this case, i just need to know the default encryption algos and such used and then can suggest that the p12s be using a stronger mechanism19:40
teward(for pfSense)19:40
tewardhmmm i wonder... *tests*19:41
tewardahah! i just have to append -legacy to the arguments and it works (per OpenSSL manpage)19:41
ahasenackteward: sarnold is it that openssl 3 (jammy) no longer ships rc2-40, or just that it was disabled via the seclevel setting? If it's the latter, the user should be able to lower the seclevel just for that one operation, no?19:42
ahasenackah, -legacy19:42
ahasenackso it's the providers change, not seclevel specifically19:43
teward[m]ahasenack -legacy indicates that OPenSSL upstream considers the algo "dead"19:43
teward[m]ahasenack correct19:43
teward[m]but since rc2-40-cbc provides *less* security than rot13 it's basically dead and should stay dead19:43
teward[m]so -legacy needed passed.  That was a braintwister, and I only solved it by reading the upstream openssl manpages :\19:43
ahasenackthere was a nice chart with all openssl options somewhere19:44
ahasenackmeant as a joke19:44
tewardhah19:46
ahasenackah, here: https://smallstep.com/blog/if-openssl-were-a-gui/19:46
ahasenackand the note at the bottom: "This is incomplete. It covers about 80% of one corner of OpenSSL’s functionality. The certificate policy options have a lot more knobs that I didn’t include."19:47
ahasenackI like the slider for `fd` :)19:47
tomreynhaha, lovely. this must have taken hours to craft.20:06
tewardsarnold: oh i found a bug in SOMETHING related to 22.04's network manager and openvpn... "Sep  6 16:11:49 tau-volantis nm-openvpn[53867]: OpenSSL: error:0480006C:PEM routines::no start line" even though the PEM files have start lines.  That's an unusual problem.20:12
sarnoldteward: yay, thanks for reporting back the -legacy switch20:13
sarnoldteward: hrmph. that "no start line" sounds vaguely familiar. try sticking another newline in there.20:14
tewardat the beginning or the end?20:14
sarnoldnear the beginning, between the things that look like headers and the body20:14
tewardE:NOHEADERS20:15
tewardlet me try something then20:15
ahasenackmaybe also check line termination?20:15
ahasenackif it's DOS20:16
ahasenack(check EOL char is in my list of "if an error is weird")20:16
tewardshouldn't be DOS because openssl opened the binary pkcs12 and exported it itself from within a UNIX environment20:17
tewardalso getting the *same* error when attempting to open the P12 as well (formerly worked on 20.04)20:17
tewardnope same error20:18
tewardhmmmmmmmmmmmmm20:18
tewardwhy does this *feel* like an OpenSSL bug20:18
tomreynthere are no openssl bugs, there is just bad input20:19
tewardtomreyn: given this file and its exported certs worked FINE in 20.04 I am going to beg to differ here20:19
tewardopenssl on the command line can read the files fine when they're passed in.  but network-manager-openvpn when passing options to the backend is failing...20:20
tomreynthat's what i said ;)20:21
tomreynteward: i was joking, and that's not helping, sorry.20:28
teward[m]no it's not i was about to smack you with a fish :p20:29
tomreyngood luck there.20:29
enychrrm, is  thunderbird in ubuntu lagging behind on security ... ?  .11  not .13 ....?  debian is updated.  Might be missing from display on  packages.ubuntu.com  of course.20:36
sarnoldenyc: it looks like some packages are being prepped in https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa/+packages -- I don't know where these are in the update preperation process, so maybe don't run these in production or anything20:50
enycsarnold: oh yes -- thankyou for pointing that out!21:14

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