65 points · by zdw · 5y ago · 81 comments
My dad was always a windows guy, but recently I got him using linux mint for some of his ham radio stuff. Flatpak and flathub are perfect for people like him. And that's good enough.
[citation needed]
Alex Larsson speaks to the "security model" in his blog posts. [0],[1],[2]
Without a strong security/sandboxing story, there is no flathub or general confidence in running binaries received directly from developers vs. the traditional distro model.
Distros have historically served as trusted arbiters. One of Flatpak's stated goals is to bypass distros in the interests of enabling end-users to more closely track developer releases of software.
This exposes end-users to substantial risks, and Flatpak relies on sandboxing to mitigate those risks.
I find it obviously inconsistent with Alex's posts for Flatpak's GUI to claim apps are sandboxed, when they're directly accessing the host filesystem and/or user's home directory, and don't utilize portals.
[0] https://blogs.gnome.org/alexl/2017/01/18/the-flatpak-securit...
[1] https://blogs.gnome.org/alexl/2017/01/20/the-flatpak-securit...
[2] https://blogs.gnome.org/alexl/2017/01/24/the-flatpak-securit...
The other thing I didn't get about the flatkill rant was why it didn't put flatpak in context. It makes much more sense compare the security of flatpak to that of appimage and snap than to look at flatpak as an isolated thing.
For me the advantage of flatpak is that it makes things a lot easier to install, abstracting away all the detail between different Linux distros.
The layering is good + because of immutability, you have a system that is a lot closer to the one the devs actually used.
There is a little more security, which is a bonus too, but that's not the main draw.
Without dedicated parties to maintain updates... like a distro, most of the packages distributed with these tools just make Linux less secure even if the tools themselves are useful in right context.
The docs and authors of these tools are trying to bring to Linux the "go on the internet and get a random .exe" model of Windows which is a proven security nightmare.
[0] https://appfs.rkeene.org/ [1] https://cernvm.cern.ch/fs/
Especially if the result is, that it would break or make unusable the package.
No, the intent is to have evolution: provide a mechanism for some scenarios, update apps where possible, provide for more scenarios, update additional apps, and improve continuously, till you achieve the securing aspect.
Treating it as if it was a flip of the switch, and then badmouthing it when it turns out it is not, is not a good faith contribution.
> Sandboxes
> Flatpak isolates apps from the host OS as well as from other applications. This provides security for users and a predictable environment for developers.
> (Some of these features are work in progress)
But seriously, there's nothing inconsistent here. All the major headings on that page are about distro-agnostic app distribution, build environments, and portability. The fact that flatpak has mechanisms for sandboxing that go largely unused on flathub doesn't mean that flatpak misrepresented itself as secure.
In an alternative universe, on a private flatpak repository, flatpak (as a technology) facilitates secure sandboxed desktop applications. It just didn't turn out that way in our universe, or at least, not yet.
> (Some of these features are work in progress)
I left it off because it doesn't change anything when talking about the announced goals ?
> But seriously, there's nothing inconsistent here. All the major headings on that page are about distro-agnostic app distribution, build environments, and portability. The fact that flatpak has mechanisms for sandboxing that go largely unused on flathub doesn't mean that flatpak misrepresented itself as secure.
https://docs.flatpak.org/en/latest/sandbox-permissions.html
> One of Flatpak’s main goals is to increase the security of desktop systems by isolating applications from one another. This is achieved using sandboxing and means that, by default, applications that are run with Flatpak have extremely limited access to the host environment.
how can it be written more clearly ?
hell, the first press release has "security first" as headline:
the really clever thing would be to embrace static linking
Unless you intend to break services NSS, that is. Even golang runtime checks for NSS config before ignoring glibc.
"A valid point. Since the Flatpak developers were fully aware of this problem, they came up with an acceptable and easy solution: flatpak-external-data-checker (f-e-d-c). f-e-d-c is a tool that automatically checks for external sources, such as dependencies and binaries. When an update is found, flathubbot automatically submits a merge request. Here are some concrete examples: [1] [2]."
At this point, it's getting more complex and harder to deploy than dynamically linked binaries, is it not?
Is it though? My point of view is that it is the worst of both worlds. On one side application developers have to deal with changing Flatpak features like portals and the complexities of making their app work sandboxed, and on the other side users get no actual security whatsoever since there are still giant holes like bashrc.
It would probably be better to disable security features entirely, so that apps can be packaged easily, until they provide actual security for the users. Since app developers will have to re-package anyway, make them do it then. In the meantime everyone is just alpha-testing features that don't provide value.
> Although it comes with an unpatched libssh2, Gitg does not use the part that contains the vulnerability.
This conclusion is plain false. The maintainer comment he quotes only says that gitg doesn't directly use libssh2 (so they can't enforce a version constraint on it), not that it doesn't use it all. It's very likely that gitg does actually use the vulnerable libssh2 if you use it to clone a repository over SSH (which it can do).
The Flatpak documentation he then links to contradicts his rather controversial idea that a sandboxed application have access to the host file system.
"With Flatpak, each application is built and run in an isolated environment, which is called the ‘sandbox’. Each sandbox contains an application and its runtime. By default, the application can only access the contents of its sandbox. Access to user files, network, graphics sockets, subsystems on the bus and devices have to be explicitly granted. Access to other things, such as other processes, is deliberately not possible."
I also hate snaps, apt get install whatever you need, and be done with it.
Why the need to be so aggressive toward open-source contributor ? And most product become good through iterative refinement. Ship it and listen to feedback to make it better is a perfectly valid way to do things, especially for open-source project.
> I also hate snaps, apt get install whatever you need, and be done with it.
Then you are not the target demographic for snap or flatpack. I personally had to often install application that where not available on my distro repo, and the plurality of way to install application, plus manage their own dependencies, was a nightmare.
Now if you have some weird application which isn't built for your distro AND is closed source , you may run into problems .
You know it would be great if they shipped default Ubuntu with a big flyer that said "don't like snaps? you're not the target demographic"
Maintaining one package that works on all distros is a lot easier.
Absolutely none of those justify fat apps as they are already fat apps in themselves! I don't even...
Flatpack allows it to work on all distro, isn't that the point?
Often enough if you don't use Debian/Ubuntu/Fedora. Similarly, the package might be out of date.
That eventually more of the software can be sandboxed is nice as well.
Also, you have to think from the distributor as well, if you want to make an app for linux, how do you go about having it packaged and distributed for all distros? You need to manage so many different package manager, its a lot of overhead.
And as a developer who wants to release software myself instead of dealing with distros, this is also a vastly better experience. It fits smoothly into a development workflow, and I can just release my thing and have binaries for people to install right away, in a place I control. Distros can still package the thing if they want to for some reason (and Flatpak does a good job encouraging you to use a real build system), but as the developer of the app I get to provide a one click install that actually works (and gets updates, and doesn't pollute your sources.list or give me root access to your system via postinstall scripts).
[1] https://wiki.gnome.org/Apps/Builder
[2] Flatpak deduplicates things quite well, but it doesn't care if you already have a particular library on the host, and it treats version 1.0.4 of something as completely, entirely different from version 1.0.3, so if you look really closely you'll notice both are on your disk somewhere. But this is the price we pay for reproducible builds, and they're definitely worth it. (See also, Buildstream: https://www.buildstream.build/).
Very often. Or I just want a updated version. There is a lot of small/obscure open-source tool available on github (for example) to do X or Y. Most of them don't have a package, and if they have, it is often not really maintained and very outdated. The same apply if you need to use closed-source / not entirely open-source software.
I remember all the time I had to figure out what kind of build system the app was using, running cmake/make/some weird build sys, only to figure out that I was missing some lib, and that the repo version was not compatible so I had to also deal with dependency manually, and then figure out the different build option, ...
On Debian, Flatpak can still be useful to get the latest version of some apps too.
I'm not a big fan however. At work, I'm using the Kate Flatpak package on Debian Buster (to have syntax highlighting for the programming language I use), but the open and save dialogs are a bit buggy and you cannot open another file in a new tab from the terminal or the file manager (it will open a new window). Integration is not great, I often just use the native Kate and do without the syntax highlight.
I get the point of flatpak and I see its value. Personally I just don't need yet another channel through which I need to get stuff. Ubuntu has already obnoxiously fragmented [1], this is just another fragmentation I don't want
[1] chunky@mills:~$ erl
Command 'erl' not found, but can be installed with:
sudo snap install erlang # version 22.3.4.1, or
sudo apt install erlang-base # version 1:22.2.7+dfsg-1 $ sudo apt install cpufreq
No apt package "cpufreq", but there is a snap with that name.
Try "snap install cpufreq"
Can't say I'm getting the point of either snap or flatpak when the whole point of using a distro is that's a trusted/curated set of software. Moreover, snaps frequently just don't seem to work for me whereas the regular .deb does.I still prefer to install from the OS repos where possible, but I like having choices.
I'd rather be able to install something untrusted through a package manager where I can then at least have it installed in a standardized manner than download a binary and trust myself to remember what I did with it, but that may just be because I'm stupid :) .
[0] Also, it not creating a bunch of loop devices is nice.
If I need the latest-greatest on a stable release OS, I use habitat.
Care to elaborate on that? Curious where your position on this is coming from.
IMO Flatpak solves several real problems: 1.) allowing third parties distribute applications in a distro-agnostic manner; 2.) allowing easy installation of packages as a user (rather than requiring root); 3.) a way to install applications on top of an immutable base OS; 4.) sandboxing of applications, or at least packaging applications such that they can move to proper sandboxing over time.
Unfortunately, the development of application bundles follow the prototypical path that we are oh so familiar with as Linux users. Rather than sitting together and making one standard, Canonical (Snap) and Red Hat (Flatpak) made their own application bundle formats, in addition to an already existing format (AppImage). And now vendors have to build bundles in three different formats, like they had to build for at least two package managers before. So, the problem actually got worse.
To Red Hat's credit, Flatpak was initially developed as part of freedesktop.org (initially as xdg-app).
We can always hope that Canonical will give up on Snaps for desktop applications I guess (like they dropped Unity and Upstart).
If you want isolated software, use something like Qubes (Xen with virtualized containers), not Docker and not flatpak, snap, or anything similar.
Inventing "new" things rather than fixing what already exists is rarely ever a good solution.
Docker doesn't work anything remotely like a hypervisor. It doesn't provide the much greater assurance of security, scalability, isolation, resource metering, accounting, or flexibility that a hypervisor does. Docker is a security disaster and it only runs Linux. Xen/Qubes runs Windows, BSDs, or any other OS. Docker seems "easy" but with many subtle costs that come later at scale. You can't live migrate a Docker container from one host to another, where you usually can with Xen using shared storage. There are many other gotchas in the lifecycle of Docker containers that are eliminated or mitigated by using hypervisor guests instead.
flatpak and snap are basically filesystem overlays. They're gross, poorly-managed, incompatible duplications of package management.
As a critic, I'm in the privileged position of being able
to critique someone's lifes work
And I think that sentiment could be felt more often. It's so easy to be on the outside looking in and critique everything that is wrong with something. But making things is hard, and trying to fix things that weren't necessarily a priority during a projects inceptions is even harder. I just wish more people would support each other when they share their projects to the worldThe AppImage philosophy seems to be much more robust here (and not coincidentally more in-line with the Unix philosophy): focus strictly on the packaging/distribution aspect and defer the sandboxing to separate tools (e.g. Firejail).
Which is possible, specifically by deferring to something like Firejail that can handle any application rather than expecting every application format to bake in its own subtly-different mechanism. That is:
> I don't think it's fine to just say "security doesn't concern us" in the year 2021.
That ain't what's being said. What these folks are actually saying is that security and packaging are separate concerns, and that said security should be enforced in one place in a way that's applicable to all programs, no matter their packaging.
The thing about updating SSH doesn't really feel like a flaw in Flatpak to me. It's just a trade-off. Lying about sandboxing is inexcusable though.