-
Notifications
You must be signed in to change notification settings - Fork 1
Many apps are crashing in Mint 22 due to recent changes in apparmor in Ubuntu 24.04: reverse this Ubuntu regression just like snaps #82
Comments
#71 was a duplicate of this issue. Not just Jitsi, too many useful apps are affected. |
Just FYI as a temp workaround, I had this problem with Mullvad VPN and using --no-sandbox makes it work. Not ideal, but usable for now. Interestingly, Mullvad claims their latest release was meant to fix compatibility with 24.04, so perhaps there's a bit more to the issue that's Mint beta specific (or Mullvad just failed at the fix). |
Another affected app is freetube FreeTubeApp/FreeTube#5199 |
Another affected app: Upscayl upscayl/upscayl#902 |
Another affected program is the Steam Flatpak (notice: it was because of apparmor 4.0.1-0ubuntu0.24.04.2 update because I had no problems with Steam games on Mint 22 before). There are few workarounds: Anyway, Does Mint even use apparmor for anything? Can't it be just thrown away like snaps? |
bug report marked ‘fix committed’: https://launchpad.net/ubuntu/+source/apparmor/4.0.1really4.0.0-beta3-0ubuntu0.1 |
@haggen88 The way they implemented it, they have to manually add a fix almost every single electron/web app out there, which is never going to happen. |
Here's my take on this:
Whether user namespaces continue to be enabled by default or not in the future, I think we need a global solution to this. Not something specific to Ubuntu, and not something elective and rushed like this. We'll need to keep an eye on this and reconsider eventually, but for now, we'll reenable this feature in Linux Mint 22. |
|
Can someone (with more knowledge about this than me) tell us what is the stance of every major distro regarding this? |
There is an Ubuntu bug report here.
I think Ubuntu is the only major distro restricting user namespace creation nowadays, though this might depend on your definition of "major." Debian notably did not allow unprivileged user namespaces until Debian 11 (Bullseye). My $0.02 is that reverting the AppArmor policy changes was the right call, at least until Ubuntu figures out how to unbreak affected applications. User namespaces are the foundation of Linux desktop sandboxing; if you cannot create sandboxes, that's surely the worst possible security outcome by far. That's why WebKit apps are crashing. (Workaround: set the environment variable There is an alternative to user namespaces: you probably don't need user namespaces if you build bubblewrap as a setuid root executable instead. (I say probably because it's been a few years since it was common for distros to do this, so maybe something unexpected would break.) This was how bubblewrap was originally deployed years ago before unprivileged user namespaces were commonly available, and it's still supported as a legacy option, but the cost is maybe setuid root is a bigger security risk than user namespaces. I would say probably. The Ubuntu blog post recommends that affected applications ship their own AppArmor profiles, but that seems unlikely. |
If a nasty developer wants to create a malware, they can also ship their own apparmor profile (which will be installed during the .deb package installation), right? So, as long as the user provides the password during the installation of the software, there is really no way such attacks can be prevented. |
(The goal of the restrictions on unprivileged user namespaces is to protect against malicious input that compromises non-malicious applications. Of course installing software that is itself malicious is not going to end well.) |
Ubuntu made some changes in apparmor in 24.04, preventing many apps from working. Such apps include Balena Etcher (balena-io/etcher#4184 (comment)), Wike (available on official repositories and also flatpak), Foliate ebook reader, and many more (including all electron based apps electron/electron#41066).
Despite Launchpad saying Fix Released for some of these apps, I verified that wike still crashes in Mint 22 beta.
Here is the output when I run Wike using APT.
(This is not a Wike bug. It is because apparmor is preventing wike from running).
While the change was made to improve security, the implementation is buggy. Many apps just crash without any clear GUI error message, and non-expert users may have no idea why they are crashing.
I suggest Mint reverses this immature Ubuntu-specific bug that crashes so many apps (at least until apparmor becomes mature enough), just like the Mint's policy for snap.
Snap is an upstream issue, which Mint took care of, and I suggest the same for apparmor, for better out of the box user experience.
How to fix
The procedure to undo these changes is described here and here
Creating a configuration file
/etc/sysctl.d/20-apparmor-mint.conf
with the contentkernel.apparmor_restrict_unprivileged_userns = 0
fixes the issue permanently (then restart).It can be done with the following command
I suggest this configuration file is added to the default installation of Mint 22, so that the apps will never crash
The text was updated successfully, but these errors were encountered: