/srv/irclogs.ubuntu.com/2021/06/29/#ubuntu-security.txt

tewardwho here knows what the security risks are of letting an application connect / readwrite from an AppArmor perspective to /run/user/{gid,uid}/bus?  Because torbrowser-launcher on non-GNOME Ubuntu variants (Kubuntu, Lubuntu, Xubuntu) Impish don't run without readwrite to that apparmor rule, and I want to think about the security risks before I push that as a possible fix.17:25
teward(even though this is Universe, it's still a security question)17:26
sarnoldteward: if the dbus the user is using doesn't do any apparmor enforcement, that's a "let the tor browser ask any application on the session bus to do anything that they advertise that they can do"17:42
sarnoldteward: if the dbus the user is using does apparmor enforcement, then the dbus calls, signals, replies, etc, ought to be mediated as described by policy17:43
tewardsarnold: right, but right now in non-GNOME environments, the underlying Tor Browser Firefox can't connect to the bus, and can't connect to display :0 and hard segfaults17:47
tewardso i'm trying to determine if there's a way OTHER than readwrite to permit access17:47
tewardsarnold: https://paste.ubuntu.com/p/ybV5pPcwSZ/plain/ is the current apparmor errors17:48
tewards/errors/DENIES/17:48
tewardbut what's odd is I would assume you would *need* bus access to connect to DISPLAY17:48
tewardand what's MORE odd is non-GNOME environments are the only ones having the error17:48
tewardworks fine in Wayland17:48
tewardso unless htere's some included apparmor abstraction or something that is GNOME specific that would grant readwrite to the bus, I'm confused17:49
tewardsarnold: do you know if there is a requirement to read/write to the bus to make sure display can be connected to for an application?17:50
sarnoldteward: probably not, eg xeyes connects fine and doesn't open dbus..17:52
tewardsarnold: on an LXQt environment?17:52
tewardbecause this ONLY happens on lubuntu/xubuntu/kubuntu based on testing17:52
tewardworks fine in Wayland/GNOME/MATE17:52
tewardwell i'm testing MATE still17:52
sarnoldteward: heh, I can't imagine xeyes cares about the rest of the desktop :)17:53
tewardi found a dbus-session-strict policy for `owner /run/user/[0-9]*/bus rw,` in abstractions/dbus-session-strict... wonder if we should be pulling this in because that's a rule for systemd with enable-user-sessions17:53
teward(and that abstraction is pulled in in the firefox stuff)17:53
sarnoldthat sounds like a reasonable thing, yeah17:56
tewardhmm18:26
tewardsarnold: looks like I don't have to touch dbus at all, those denies were superfluous18:26
sarnoldteward: really? even with file open dialog boxes or similar?18:26
tewardi DID see an asplosion on /tmp/.X11-unix/X0 though, where it needs readwrite and apparently doesn't listen to the X abstractions if i include those18:26
tewardi'm still testing18:26
tewardthose failures were not what was causing it to not load the GUI18:27
sarnoldgood good then the world is back togethe ragain :)18:27
tewardwell not really18:29
tewardsarnold: dbus was needed18:29
tewardbut apparmor is set to DENY access to dconf and /home/ space EXCEPT for where tor browser bundle is launched from18:29
sarnoldjust so long as it wasn't needed to do X18:29
tewardsarnold: yeah, dbus wasn't needed to do X but it was needed for dialog18:29
tewardso i just imported abstractions/dbus-session-strict and fixed *that* call18:29
tewardbut the abstractions/X is being ignored I think18:30
tewardwhich is odd18:30
tewardhuh looks like maybe a permissions change on abstractions/X which removes 'w' from the unix sockets in /tmp/.X11-unix/* which is... odd.18:39
teward*cough cough* https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/193400518:42
ubottuLaunchpad bug 1934005 in apparmor (Ubuntu) "abstractions/X: Possible regression of X session functionality by removing 'w' from /tmp/.X11-unix/* line?" [High, New]18:42
teward*leaves this for the Security team to dig and handle*18:42
sarnoldthanks18:48
=== JanC_ is now known as JanC

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