Curiosity regarding Flatpak security vs. Traditional Antivirus

How much do you trust Flatpak and Flatseal? I mean from a security perspective.

I know that Linux doesn’t have traditional antiviruses for desktop distributions, which is why I want to rely on Flatpak. How would a Flatpak compare to, say, one of the best Windows antiviruses like Bitdefender or ESET?

I know the comparison isn’t entirely fair, comparing proactive protection (Flatpak) to reactive protection, but I’d like to know which of the two has a higher chance of failure from your perspective.

Thanks.

One is a package management and deployment software and the other is an Antivirus software. There is no comparism possible as both tools serves completely different purposes.

3 Likes

Flatpak apps are sandboxed, or correct me if I’m wrong. That’s why I wanted to compare proactive with reactive protection

Sandbox and antivirus are also not comparable.

Basic Google search for definition:

An antivirus (AV) is a security program that scans, detects, blocks, and removes known or suspicious malware by comparing files against threat databases and heuristic rules. A sandbox is an isolated, controlled virtual environment where a file or program can be safely executed (“detonated”) to observe its live behavior without risking damage to the rest of the system.

So you expect that others do a basic google search for you? This question was already asked countless times in the www. There are many explanations all over the web between the different purposes and pros and cons of both applications. What are your expectations?

@spring-time Hi, you probably need to give an example?

Say using bottles and it installed an infected file in the bottle, depending on Flatseal settings it’s not going anywhere (assuming user installed).

I guess one could run clamav or such on the ~/.var directory.

Can’t say I’ve seen the need for AV on linux, well perhaps a mail server…

Hi @malcolmlewis ,

That’s exactly what I was wondering. Because theoretically, malware shouldn’t be able to break out of Flatpak, but in reality, it has happened many times that malware escaped Flatpak’s sandboxing. That’s also what I wanted to find out: how much trust do users place in the Bubblewrap utility used by Flatpak? What are the chances of malware escaping Bubblewrap compared to a strong Windows antivirus failing to detect malware?

Containers are containers, have you read here https://github.com/containers/bubblewrap?

Saying containers are containers is a dangerous oversimplification.

Containers share the host kernel and rely on namespaces, cgroups, and seccomp filters rather than hardware virtualization. History has repeatedly shown that when either the container runtime or the underlying kernel has a flaw, the sandbox fails.

Look at CVE-2019-5736, where a process inside a container could overwrite the host runc binary and gain full root access to the entire host machine. Or CVE-2024-21626, where a file descriptor leak allowed containers to break out directly into the host filesystem.

Flatpak and Distrobox are mostly convenience.

Both add attack surface but bwrap can also reduce risks compared to traditional packages. Generally, Flatpak applications are better isolated than traditional applications.

Vetting Flatpaks and keeping SELinux/AppArmor enabled and properly configured helps keep risks low. If you care about security those are better to invest time in mastering.

Linked vulns are about runc, which Flatpak doesn’t use.

At least you have the opportunity with Linux to investigate and mitigate for your use case. Old CVE’s are water under the bridge so to speak, kernel lockdown is there, hardening systemd services, immutable file system etc.

You can always roll your own packages (and flatpaks) on the Open Build Service… :wink:

You can run OpenBSD on a castaway island talking X11 protocol to a coconut and a parrot :coconut: :parrot:and run TWM in the original nice, pink theme.:rofl:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.