/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=raider com.github.ADBeveridge.Raider
bwrap: No permissions to create new namespace, likely because the kernel does not allow non-privileged user namespaces.
This sounds like either Kicksecure has a kernel built without unprivileged user namespace creation abilities, or a major AppArmor update came through that is disabling the feature. I’ll look into this later today most likely.
Not clear what this is about since they failed to show the error message. I don
t think it’ not a permission issue. The error message is very clear and links to documentation. Permission issue would probably be a different issue. On Debian, there is no flatpak linux user group.
There are only two solutions. Debian and Flatpak are very clear about it. References:
B) kernel.unprivileged_userns_clone=1 Linux sysctl; or
C) Not using Flatpak.
As for bubblewrap SUID, quote Flatpak documenation:
This mode is not recommended, and some Flatpak apps and features will not work.
Quote Debian readme:
This can be a security risk: if there are bugs in bubblewrap, it might be
possible for an unprivileged user to get root privileges by running a
setuid version of the bwrap executable. CVE-2020-5291 and CVE-2016-8659
are examples of bugs that had this effect in the past. However, it allows
the kernel to be configured to disallow creation of user namespaces by
unprivileged users, which prevents attacks like CVE-2016-3135 from being
carried out against the kernel. This is a trade-off between different
security risks.
Quote Flatpak documentation:
This is a security trade-off. Disallowing unprivileged use of user namespaces reduces the kernel’s attack surface, which mitigates some attacks; but it also disallows some sandboxing techniques, which prevents other attacks from being mitigated. Making bwrap or flatpak-bwrap setuid root also carries some risk: an attacker might be able to exploit vulnerabilities in bwrap to achieve root privilege escalation.
So there is no perfect solution. However, since SUID is being discouraged by Flatpak, the choice is simple: B) kernel.unprivileged_userns_clone=1 Linux sysctl.
# Disable User Namespaces, as it opens up a large attack surface to unprivileged users.
user.max_user_namespaces = 0
But that will also break flatpak. To break flatpak temporarily, run: sudo sysctl -w user.max_user_namespaces=0. To unbreak, reboot or sudo sysctl -w user.max_user_namespaces=3643. Where number 3643 is coming from? That’s the default that can be seen using: sysctl -a | grep user.max_user_namespaces
It doesnt matter, break flatpak or break thunderbird… idea is that this option preventing malicious attacks, breaking it for app/s satisfactory is security nonsense.
workaround mean either giving user extra (even if insecure) instructions because this is user decision to decide or a workaround that can be implemented but keeps up the same security level.
how come this is a good security decision for the users? this is a degrade to the security for just user self satisfactory.
But, if you can’t patch it or think there may indeed be a new version of the vulnerability out there? In that case, you can mitigate it by disabling the ability for unprivileged users to create namespaces. To do this temporarily, in the Debian/Ubuntu world run:
FWIW Ubuntu implemented a very similar policy to this using AppArmor. I don’t think Debian 12 will have the needed code for it to work, but their solution to this issue was to make AppArmor able to grant unprivileged user namespace creation privileges to individual apps via AppArmor policies. This is documented at Ubuntu 24.04 LTS (Noble Numbat) Release Notes - Release - Ubuntu Community Hub. Sadly, this solution is not easy to use with AppImages.
IMO it would be worthwhile figuring out how to disable unprivileged userns creation in Kicksecure in a way that doesn’t render many apps unusable. Perhaps if Trixie has the needed code for using AppArmor policies for this, a permissions-granting app could be created and used here.
I am sympathetic to nurmagoz’s reasoning here. If kernel.unprivileged_userns_clone=0 helps security, I would think it would be good to have it that way by default for a security-oriented distribution. Users who want to use flatpak can look at documentation on how to make it kernel.unprivileged_userns_clone=1 in order to use flatpak. However, I have alternatives to flatpak that suit my needs, so I guess I am biased.
In regards to appimages breaking, wouldn’t the “–no-sandbox” option for appimages solve the problem? For example, under kernel.unprivileged_userns_clone=0, my appimage for FreeTube does not work if I go to the terminal and type “./freetube_0.21.3_amd64.AppImage”. However, it does work if I type “./freetube_0.21.3_amd64.AppImage --no-sandbox”. Would the appimages that the other commenters are talking about work with the “–no-sandbox” option?
Regardless, I decided to go in and follow nurmagoz’s quoted instructions. However, the command was not working for me.
user@host:~$ echo kernel.unprivileged_userns_clone=0 | \ sudo tee /etc/sysctl.d/99-disable-unpriv-userns.conf
-bash: sudo: command not found
user@host:~$ sudo -i
[sudo] password for user:
root@host:~# echo kernel.unprivileged_userns_clone=0 | \ tee /etc/sysctl.d/99-disable-unpriv-userns.conf
-bash: tee: command not found
I do not know why it was not working. So I ran this command instead to disable it.
That command works. So if anyone wants to set kernel.unprivileged_userns_clone=0 instead of the current default of kernel.unprivileged_userns_clone=1, they can do it that way.
Without looking into the details… A sandbox is “usually” a security feature. --no-sandbox would disable the sandbox, i.e. would disable a security feature.
Yes, it would disable a security feature. Presumably, setting kernel.unprivileged_userns_clone=1 instead of 0 is also disabling a security feature. Anyways, I am not so much offering a recommendation as I am offering a potential way to make appimages work under kernel.unprivileged_userns_clone=0. This is because previous comments said that some appimages were not working under kernel.unprivileged_userns_clone=0.
TOR browser is focused on security. But by default, all scripts in noscript are not disabled - only most basic protection. If you want max protection - change settings. Here is a similar situation, OS should be convenient for new users