Ubuntu vs Fedora - security clarifications

I am not in IT so excuse me for my low knowledge.

I was thinking that most people would be attacked through the browser or through opening malicious files (pdf/office). If an attacker compromises the browser or a pdf opening app, then he already has user level access and can read the gnome keyring, can read other apps data (like password manager for example), take screenshots etc.

So then the extra security that Fedora has - Selinux, Kernel hardening never really kicks in. Most attackers won’t bother going futher to attack the kernel or gain persistence, they already stole my passwords, files, password manager vault etc.

As for browsers running them in a snap actually makes it better for security because the attacker must overcome the snap sandbox after a browser compromise. Snaps also update independently from the OS, so the slower patching of the OS is irelevant.

Am i right or i am missing something?

No, because browsers have their own sandboxes which only work if they can integrate more deeply with the OS, and they can’t do that when they are inside a snap or flatpak.

The reality is that Chromium and even Firefox have spent much more time on developing good sandboxing for their browsers than snap or flatpak have, so you should not replace their sandboxing with snap’s.

6 Likes

Since I am sceptical of your statements, I facted checked it with multiple AIs.

They say that:

These are about true:

This is false:

Its rather multiple layers of sandboxing.

I am not getting into details, because it is super complex. But I confirmed my own belief that additional sandboxing is good for security :slightly_smiling_face:

Yep, for example, I remove browser permissions further to a minimum needed to perform the tasks. Like browsers don’t have access to home directory full stop, only to downloads. I would think its good extra isolation.

The browser’s own sandbox works fine as a snap, as long as you don’t mess with the default permissions the browser’s snap ships with. It’s just the Flatpak versions which are problematic.

:grinning_face_with_smiling_eyes:

Snaps permissions are very simple. Few toggles on/off. You can’t go wrong I think.

But flatpak’s permissions are very complex, so there something can go wrong probably.

How you phrase this sort of question to an AI is key.
Large Language Models are terrible at contradicting or correcting the user so confirming something with an AI or even a search engine is generally bad practice.
Other than the errors and halucinations that creep in they’re also built to do something that looks corrrect, even when it isn’t.

The reality here is more complex. The browser relies on Sandboxing processes that require setup and integration with the system. This setup may or may not be present on your OS and differs in quality depending on your platform.

Flatpak and Snap do implement their own sandboxing but don’t always support the browser’s sandboxing correctly.
An example of this is the Tor Flatpak, which explicitly warned me that the AppArmour implementation wasn’t corrrect.

5 Likes

I was messing a lot with AI today about this and the AI stated that if i use Firefox on Fedora Workstation it would be more secure because Fedora ships Firefox in its repos with tighter secomp filter. Also it stated that the hardened kernel of Fedora makes some attacks of escaping the browser sandbox harder, while another AI told me that the kernel has no effect on the browser sandbox security… So which is it anyone knows?

Yea, @jonah might be right, because he is a real expert, rather than AI.

But I would also like to understand how my system works as well. AI can help with that.

I would like to understand, but I cannot be an expert in every little details, these things are complex. So AI is a little shortcut, which can explain quick in detail om whatever question one asks. Yea, its not the same as expert opinion, but it helps to understand.

Or what if there is a bug in chrome or firefox sandbox which I don’t know how it works, its better to have universal additional layer which I can understand, because less to understand.

Snap sandbox likewise is simpler to understand. One can trust 1 final sandbox one can know well, rather than unknowable sandboxes for a non expert that each apps may have themselves, and, as you say, which can vary in quality depending on platform.

But saying I should dump my snap sandbox is quite serious statement considering I rely on it so much. So, of course I consult with AI to determine who is on the right here. And I think that me and AI :smiley: is still correct that I should keep the snap sandbox layer :slight_smile: because it is more secure to have a simple final layer which I can understand a little better how it works and understand how much I can trust it, plus removing permissions to a minimum.

AI text generation only engages properly to your advantage if you have some domain specific knowledge. Since you claim you do not have domain specific knowledge with the topic on hand, namely sandbox and isolation, it may wiser to defer to the wisdom of the experts here.

Also, AI at this point is not a fact checking tool. Not yet. Thats for when we have AGI. Maybe in 4-5 years?

4 Likes

I agree with you on this, AI helps to learn, yes, but maybe we (I) should keep it private, and not argue with experts based on what AI says :+1:t2: :slight_smile:

You can.

Has nothing to do with that. Flatpak’s seccomp filter is the problem for browser’s sandboxing and that’s something you cannot change as an end user.

2 Likes

Is the seccomp filter more secure depending on the distro? An AI gave me answer that on Fedora - Firefox from the repo ships with tighter seccomp filter?

How? if you say so. I ask as a snap user who changes permissions.
I think one can’t. Those permissions seam to be real simple. There is nothing to mess up which I have noticed yet.

No

No. AI is terrible at answering such questions.

2 Likes

Ok thanks. So then on Fedora Firefox does not gain any security advantages, so the snap should be more secure i guess, because of the sandbox then.

https://snapcraft.io/docs/browser-support-interface needs to be set correctly for the browser’s sandbox to work. It should be by default and users should not mess with it.

True. I have this toggle “Browser support” always on, as it is self descriptive its important.

Documentation says its bypass snapd for browser sandbox to work:

A browser’s internal sandbox requires numerous privileged security policy rules to work and is typically considered trusted outside of snapd. For this reason, --allow-sandbox=true is limited to trusted publishers only.

So this sentence still seems to be incorrect:

That does not necessarily result from that quote.

Browser’s need access to seccomp, unprivileged user namespaces (and the namespaces under their user namespaces in control) and pivotroot inside it. These are not direct sandbox escapes. The first is unproblematic anyways, because it is a stackable LSM and only gets stricter, the others are not direct sandbox escape, but can make escapes easier because it gives access to capability code paths and exposes additional kernel attack surface. So it would theoretically still be possible for snap to confine browsers without trivial sandbox escapes