Activity log for bug #1934005

Date Who What changed Old value New value Message
2021-06-29 18:42:28 Thomas Ward bug added bug
2021-06-29 18:42:41 Thomas Ward summary abstractions/X: Possible regression by removing 'w' from /tmp/.X11-unix/* line abstractions/X: Possible regression of X session functionality by removing 'w' from /tmp/.X11-unix/* line?
2021-06-30 20:31:40 Thomas Ward apparmor (Ubuntu): assignee Thomas Ward (teward)
2021-06-30 21:45:05 Thomas Ward nominated for series Ubuntu Impish
2021-06-30 21:45:05 Thomas Ward bug task added apparmor (Ubuntu Impish)
2021-06-30 21:45:05 Thomas Ward nominated for series Ubuntu Hirsute
2021-06-30 21:45:05 Thomas Ward bug task added apparmor (Ubuntu Hirsute)
2021-06-30 21:45:13 Thomas Ward apparmor (Ubuntu Hirsute): importance Undecided High
2021-06-30 21:45:17 Thomas Ward apparmor (Ubuntu Hirsute): assignee Thomas Ward (teward)
2021-06-30 21:45:21 Thomas Ward apparmor (Ubuntu Hirsute): status New In Progress
2021-06-30 21:45:23 Thomas Ward apparmor (Ubuntu Impish): status New In Progress
2021-06-30 22:06:20 Thomas Ward description In Focal, abstractions/X has the following section in it: # the unix socket to use to connect to the display /tmp/.X11-unix/* rw, unix (connect, receive, send) type=stream peer=(addr="@/tmp/.X11-unix/X[0-9]*"), unix (connect, receive, send) type=stream peer=(addr="@/tmp/.ICE-unix/[0-9]*"), However, in Impish, this seems to have changed: # the unix socket to use to connect to the display /tmp/.X11-unix/* r, unix (connect, receive, send) type=stream peer=(addr="@/tmp/.X11-unix/X[0-9]*"), unix (connect, receive, send) type=stream peer=(addr="@/tmp/.ICE-unix/[0-9]*"), This in turn breaks torbrowser-launcher's Firefox from launching, even if we include the X abstractions, because the display sockets in /tmp/.X11-unix/* (X0 for Display :0 for example) are not read/write. This looks like a MAJOR regression by removing the permissions. Or has Impish apparmor not been updated for any Ubuntu specific changes? ProblemType: Bug DistroRelease: Ubuntu 21.10 Package: apparmor 3.0.0-0ubuntu8 ProcVersionSignature: Ubuntu 5.11.0-20.21+21.10.1-generic 5.11.21 Uname: Linux 5.11.0-20-generic x86_64 ApportVersion: 2.20.11-0ubuntu67 Architecture: amd64 CasperMD5CheckResult: unknown CurrentDesktop: LXQt Date: Tue Jun 29 14:39:00 2021 InstallationDate: Installed on 2021-06-29 (0 days ago) InstallationMedia: Lubuntu 21.10 "Impish Indri" - Alpha amd64 (20210628) ProcKernelCmdline: BOOT_IMAGE=/boot/vmlinuz-5.11.0-20-generic root=UUID=d042602b-0900-4b2e-acb1-f67436e9805f ro quiet splash vt.handoff=7 SourcePackage: apparmor UpgradeStatus: No upgrade log present (probably fresh install) [Impact] Any application that requires access to X11 sockets for the Display may want to include abstractions/X in the AppArmor rules, which usually will include rules that we would want for access to the Display socket for X. However, an upstream regression was made by changes to the abstractions/X to remove the 'w' and leave it read only. This doesn't work - X11 needs readwrite on the sockets for it to properly interact with X11. This is a fundamental regression that has been fixed upstream. [Test Plan] Any application that needs X11 integration with apparmor rules should `#include <abstractions/X>` This is the problem with https://bugs.launchpad.net/ubuntu/+source/torbrowser-launcher/+bug/1933886 - while the fix for that would be to add `#include <abstractions/X>` in the ruleset, it will not function with the existing abstractions. This is our test case in Impish: - add `#include <abstractions/X>` into `/etc/apparmor.d/torbrowser.Browser.firefox` and the apparmor rule. - `sudo systemctl restart apparmor.service` - Attempt to run torbrowser with torbrowser-launcher, which should now properly work with the revisions. Without, torbrowser-launcher 'starts' Tor Browser but then it just segfaults and stops running. We don't have a full test case for Hirsute at this time. [Where problems could occur] Based on my understanding of X11 and the upstream AppArmor bugs on this (refer to comments), there is no breakage introduced by this, in fact the breakage was already introduced upstream, so this simply fixes and removes the breakage when an apparmor rule includes these X abstractions and need to write to the socket but can't. Therefore, I don't believe there are any 'problems' that can occur with this change. [Original Description] In Focal, abstractions/X has the following section in it:   # the unix socket to use to connect to the display   /tmp/.X11-unix/* rw,   unix (connect, receive, send)        type=stream        peer=(addr="@/tmp/.X11-unix/X[0-9]*"),   unix (connect, receive, send)        type=stream        peer=(addr="@/tmp/.ICE-unix/[0-9]*"), However, in Impish, this seems to have changed:   # the unix socket to use to connect to the display   /tmp/.X11-unix/* r,   unix (connect, receive, send)        type=stream        peer=(addr="@/tmp/.X11-unix/X[0-9]*"),   unix (connect, receive, send)        type=stream        peer=(addr="@/tmp/.ICE-unix/[0-9]*"), This in turn breaks torbrowser-launcher's Firefox from launching, even if we include the X abstractions, because the display sockets in /tmp/.X11-unix/* (X0 for Display :0 for example) are not read/write. This looks like a MAJOR regression by removing the permissions. Or has Impish apparmor not been updated for any Ubuntu specific changes? ProblemType: Bug DistroRelease: Ubuntu 21.10 Package: apparmor 3.0.0-0ubuntu8 ProcVersionSignature: Ubuntu 5.11.0-20.21+21.10.1-generic 5.11.21 Uname: Linux 5.11.0-20-generic x86_64 ApportVersion: 2.20.11-0ubuntu67 Architecture: amd64 CasperMD5CheckResult: unknown CurrentDesktop: LXQt Date: Tue Jun 29 14:39:00 2021 InstallationDate: Installed on 2021-06-29 (0 days ago) InstallationMedia: Lubuntu 21.10 "Impish Indri" - Alpha amd64 (20210628) ProcKernelCmdline: BOOT_IMAGE=/boot/vmlinuz-5.11.0-20-generic root=UUID=d042602b-0900-4b2e-acb1-f67436e9805f ro quiet splash vt.handoff=7 SourcePackage: apparmor UpgradeStatus: No upgrade log present (probably fresh install)
2021-07-01 15:52:27 Launchpad Janitor apparmor (Ubuntu Impish): status In Progress Fix Released
2021-07-01 18:40:00 Thomas Ward bug added subscriber Ubuntu Stable Release Updates Team
2021-07-06 07:10:31 Chris Guiver bug added subscriber Chris Guiver
2021-07-06 21:42:19 Brian Murray apparmor (Ubuntu Hirsute): status In Progress Fix Committed
2021-07-06 21:42:21 Brian Murray bug added subscriber SRU Verification
2021-07-06 21:42:25 Brian Murray tags amd64 apport-bug impish amd64 apport-bug impish verification-needed verification-needed-hirsute
2021-07-07 00:41:42 Thomas Ward tags amd64 apport-bug impish verification-needed verification-needed-hirsute amd64 apport-bug impish verification-done verification-done-hirsute
2021-07-15 14:03:16 Launchpad Janitor apparmor (Ubuntu Hirsute): status Fix Committed Fix Released
2021-07-15 14:03:27 Łukasz Zemczak removed subscriber Ubuntu Stable Release Updates Team