frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

When Flatpak's Sandbox Cracks

https://www.linuxjournal.com/content/when-flatpaks-sandbox-cracks-real-life-security-issues-beyond-ideal
20•dxs•11h ago

Comments

WesolyKubeczek•10h ago
Flatpak's "sandbox" is mostly theater, and it gives little when it comes to privacy. Apart from the obvious that packages sometimes come with overly broad permissions to be usable at all (but you are still given a marketing pitch about enhanced safety, granted, flatpak.org doesn't do it but flathub does), the fact that some paths are denied or some access is revoked is also a data point.

I'd like to have a system where I can choose to give any bitmap, movie, or blank screen when an application asks me for permission to use my camera. It shouldn't know that I have denied it. When it asks for my microphone, I should be able to choose to make it think I allowed it microphone access with dummy audio stream with no audio or audio of my choice. When it asks me to open a file, or a directory, it should invoke a system dialog that cannot be faked, and when I pick a file/directory for it, that directory or file should be bind-mounted into its mount namespace without giving it extra information about other files beside it, or indeed what's the full path of the file. When recording a screen, I should be able to pick which regions and which applications it should be able to see, and the system should make it think it's all there is.

All the while the application doesn't even have to cooperate. This is the important bit.

I think the pieces to do this are mostly there already (portals, Pipewire, namespaces), it's just a lot of faff to actually implement.

bestorworse•9h ago
I want that as well, but I don't think it's practical to do that on the Linux desktop ecosystem. Too slow, too much politics. The gist of it is done by Android though, but that required extensive re-engineering of the user space.

Risking getting down voted but I don't want to repeat myself: https://news.ycombinator.com/item?id=43255985

freedomben•9h ago
I would love the capabilities you describe, but I don't think it's fair to call flatpak "mostly theater." Yes plenty of flatpak apps require you to broaden their perms to the point where the sandbox starts to feel pretty weak, and there is plenty more to do on the system, but I think it's a good step forward.
AlienRobot•9h ago
Then it's never going to happen.

Linux desktop is a huge mountain of "why this basic obvious stuff just doesn't work?"

I mean just stop to consider this. It's 2025. You are still not guaranteed to be able to close an application by moving the mouse all the way to the top right and clicking, because sometimes the X button has a margin at the top. This is insane to me. This is like such a basic thing that I have no idea how do you even manage to get it wrong.

If Linux can't even get the X button right, do you seriously expect anything else to ever get fixed?

pstuart•8h ago
That's a desktop issue, not a linux issue.
AlienRobot•8h ago
I don't remember installing "desktop" on my computer.
pstuart•5h ago
A lack of awareness does not determine whether something is true or not.

While Linux, like everything else, is not perfect, it is technically just the kernel, and the version of linux you installed was called a "distribution", and they normally package one or more varieties of GUIs (Graphical User Interface), commonly known as a "Desktop Environment".

Here is a list for your edification: https://en.wikipedia.org/wiki/Desktop_environment

You may want to file a bug report for their respective project, or if you're up to it, fix the problem yourself instead of just complaining about it.

dangus•5h ago
Linux distributions have dozens of choices of desktop environments. You did choose a desktop to install you just didn’t read the basic information about your choice.

Frankly, if you don’t know this basic fact about Linux you aren’t a reliable source of opinion on whether the Linux desktop is a “huge mountain of obvious stuff that doesn’t work.”

Modified3019•9h ago
I believe this is part of what [Spectrum OS](https://spectrum-os.org/) is ultimately trying to do. That said, while it’s being actively developed, it’s not a trivial effort and is nowhere near “download the iso and daily drive it”.
CaliforniaKarl•8h ago
That reminds me of something iOS is doing (though I don't know when it was introduced).

An app wanted permission to my photos. In addition to the normal "Allow" and "Deny" options, I was also given the option to allow a subset of photos. I chose that option, and was given the normal photos UI, as if I was selecting a set of photos to share or delete. I guess in the back-end, iOS constructed a new photos library consisting of just the ones I selected.

It was cool! And it's good to see things at least one of the things you describe is being shown to a large number of folks. Hopefully that'll drive momentum to wider adoption.

dylan-m•8h ago
> When it asks me to open a file, or a directory, it should invoke a system dialog that cannot be faked, and when I pick a file/directory for it, that directory or file should be bind-mounted into its mount namespace without giving it extra information about other files beside it, or indeed what's the full path of the file. When recording a screen, I should be able to pick which regions and which applications it should be able to see, and the system should make it think it's all there is.

You've described exactly what flatpak is doing? I'm curious what gaps you see with its approach in particular.

dylan-m•4h ago
If it’s important to you that an application doesn’t need to cooperate, then that’s something Snap has an answer for. I don’t remember the name of it or if it got past the proposal stage, but it’s like “if an app opens a file, intercept the syscall and show a dialog.” I think it’s a disgusting solution to a non-problem (it was demoed with Firefox which has dutifully cooperated with our shit for decades). But it’s interesting :)
dylan-m•2h ago
Omg I keep finding myself back here. It was bugging me especially that I couldn’t remember, but I found it! This is the thing: https://discourse.ubuntu.com/t/ubuntu-desktop-s-24-10-dev-cy...
zzo38computer•4h ago
> I'd like to have a system where I can choose to give any bitmap, movie, or blank screen when an application asks me for permission to use my camera. When it asks for my microphone, I should be able to choose to make it think I allowed it microphone access with dummy audio stream with no audio or audio of my choice.

It is what I had thought too (you could also provide a filter, or the video and/or audio output of another program, or other stuff), and I have also seen others with similar ideas than that as well. (It also does not know whether or not you even have a camera or microphone; this way, you can use a program that expects a camera even if you do not have it.)

Although it could be made with Linux and existing systems, my idea was to redesign the entire operating system and computer to support this in order to work better. There is some issues which are not handled by the existing systems, including some fingerprinting, and date/time, and some others.

> When it asks me to open a file, or a directory, it should invoke a system dialog that cannot be faked, and when I pick a file/directory for it, that directory or file should be bind-mounted into its mount namespace without giving it extra information about other files beside it, or indeed what's the full path of the file.

This would be insufficient for many uses, e.g. if a file name is specified by command-line arguments or by configuration files, or if the program does care about other files with a similar name (which SQLite does, so many programs that use SQLite also will). (I had thought of how a sandbox library could be made to support some of these things could be made on Linux, although I had never actually designed or implemented it.)

> When recording a screen, I should be able to pick which regions and which applications it should be able to see, and the system should make it think it's all there is.

Yes, I agree, it is also a good idea. But, screen recording will also be video input, which the camera also is, so it might work in a similar way.

> I think the pieces to do this are mostly there already (portals, Pipewire, namespaces)

I also think there is problems with the ways some of these things are working. One is that the system will use ambient authority (which is one reason why I had suggested to make up a new operating system instead), and some of the protocols expect use of Unicode and do not support other character sets so well, and the existing sandboxing also does not work very well for user-specified commands to use with popen (many of my own programs do use user-specified commands with popen).

its-summertime•3h ago
> When recording a screen, I should be able to pick which regions and which applications it should be able to see, and the system should make it think it's all there is.

This is the norm under Flatpak + pipewire for single application captures. For full screen captures, Niri supports blanking specific windows from appearing in captures.

fake-name•8h ago
Flatpak, Snap, appimage, etc...

I have pretty fastidiously avoided ever using any of the "package everything into the image" projects, and my life has been considerably better off.

All these things serve to do is make the developer experience easier, at the cost of delivering a much worse user experience.

I can't think of any reason a user would ever prefer packaged variant of something.

jwrallie•7h ago
It is better when you cannot get a package otherwise, so if you use a distro with a big repo, it happens mostly with proprietary software.
xorcist•7h ago
Most proprietary software ships as tgz files which you can just unpack and run.

A few ships with "installers", which are mostly just bash scripts with the tgz embedded.

Simple enough.

ChocolateGod•7h ago
> package everything into the image" projects

But Flatpak does not do this. It consists of runtimes that usually contain the most of what applications needed, and are updated separately from the application itself.

yjftsjthsd-h•7h ago
Yes, flatpak does do that; its base images only have the basics, leaving apps to bring the rest of their own libraries/dependencies.
paulddraper•4h ago
Have you as a user never encountered dependency hell??

Who are you and how can we trade places?

tapoxi•2h ago
Because shipping the runtime with the software means you can get newer software on older distributions. It's also great for immutable/atomic systems where installing packages at the system level is an anti pattern.
ChocolateGod•7h ago
A lot of Flatpak applications ship with filesystem=home, and this is effectively opens up ways of indirectly getting root access (since you can override sudo by editing .bashrc) or overriding .desktop files (of say system settings) to point to your application instead which a user is more likely to enter their password when opening, or override environmental variables, you get the picture.

It's not as if non-Flatpak apps can't do this either, but the false sense of security from Flatpak may encourage people to download apps they wouldn't otherwise.

Unlike Android/iOS where Google/Apple can push developers to update their apps to use new apis, or say bye bye to those that don't, there's no motivation for Linux app devs to update their applications to use portals to avoid the need for filesystem=home, and as long as that exists people will just install them with a false sense of security.

Flatpak is not a security project, it's an app distribution one (which I think it does a generally better job than native packages, but the bar is low). The sandbox should be considered part of the separation from host dependencies, nothing else.

BrenBarn•18m ago
Personally I'd just as soon have something that is like Flatpak but without the security pretensions. The main advantage for me is just being able to update each program independently of an OS-level package repository.

Ladybird Browser July Update

https://ladybird.org/newsletter/2025-07-31/
17•net01•1h ago•0 comments

Cerebras Code

https://www.cerebras.ai/blog/introducing-cerebras-code
289•d3vr•9h ago•118 comments

Hardening mode for the compiler

https://discourse.llvm.org/t/rfc-hardening-mode-for-the-compiler/87660
82•vitaut•5h ago•10 comments

Coffeematic PC – A coffee maker computer that pumps hot coffee to the CPU

https://www.dougmacdowell.com/coffeematic-pc.html
175•dougdude3339•9h ago•40 comments

Weather Model based on ADS-B

https://obrhubr.org/adsb-weather-model
149•surprisetalk•2d ago•24 comments

JavaScript retro sound effects generator

https://github.grumdrig.com/jsfxr/
56•selvan•3d ago•12 comments

Robert Wilson has died

https://www.theartnewspaper.com/2025/08/01/robert-wilson-playwright-director-artist-obituary
44•paulpauper•4h ago•11 comments

At 17, Hannah Cairo solved a major math mystery

https://www.quantamagazine.org/at-17-hannah-cairo-solved-a-major-math-mystery-20250801/
297•baruchel•15h ago•133 comments

Ethersync: Peer-to-peer collaborative editing of local text files

https://github.com/ethersync/ethersync
108•blinry•3d ago•19 comments

I couldn't submit a PR, so I got hired and fixed it myself

https://www.skeptrune.com/posts/doing-the-little-things/
241•skeptrune•14h ago•139 comments

The Rickover Corpus: A digital archive of Admiral Rickover's speeches and memos

https://rickovercorpus.org/
45•stmw•6h ago•10 comments

Ask HN: Who is hiring? (August 2025)

180•whoishiring•16h ago•212 comments

Native Sparse Attention

https://aclanthology.org/2025.acl-long.1126/
109•CalmStorm•11h ago•15 comments

Yearly Organiser

https://neatnik.net/calendar/
19•anewhnaccount2•3d ago•7 comments

Does the Bitter Lesson Have Limits?

https://www.dbreunig.com/2025/08/01/does-the-bitter-lesson-have-limits.html
126•dbreunig•11h ago•63 comments

Why leather is best motorbike protection – whilst being dragged along concrete

https://www.youtube.com/watch?v=xwuRUcAGIEU
13•lifeisstillgood•1d ago•0 comments

Researchers map where solar energy delivers the biggest climate payoff

https://www.rutgers.edu/news/researchers-map-where-solar-energy-delivers-biggest-climate-payoff
89•rbanffy•11h ago•46 comments

Anthropic revokes OpenAI's access to Claude

https://www.wired.com/story/anthropic-revokes-openais-access-to-claude/
204•minimaxir•9h ago•66 comments

Launch HN: Societies.io (YC W25) – AI simulations of your target audience

92•p-sharpe•19h ago•49 comments

Sources of Truth

https://cutlefish.substack.com/p/tbm-369-sources-of-truth
6•kiyanwang•3d ago•0 comments

Show HN: Draw a fish and watch it swim with the others

https://drawafish.com
837•hallak•4d ago•216 comments

The tradeoff between human and AI context

https://softwaredoug.com/blog/2025/07/30/layers-of-ai-coding
16•softwaredoug•2d ago•0 comments

Replacing tmux in my dev workflow

https://bower.sh/you-might-not-need-tmux
263•elashri•22h ago•291 comments

Ergonomic keyboarding with the Svalboard: a half-year retrospective

https://twey.io/hci/svalboard/
96•Twey•15h ago•51 comments

Ask HN: Who wants to be hired? (August 2025)

79•whoishiring•16h ago•190 comments

Make Your Own Backup System – Part 2: Forging the FreeBSD Backup Stronghold

https://it-notes.dragas.net/2025/07/29/make-your-own-backup-system-part-2-forging-the-freebsd-backup-stronghold/
102•todsacerdoti•4d ago•4 comments

Our Farewell from Google Play

https://secuso.aifb.kit.edu/english/2809.php
261•shakna•22h ago•106 comments

Google shifts goo.gl policy: Inactive links deactivated, active links preserved

https://blog.google/technology/developers/googl-link-shortening-update/
219•shuuji3•14h ago•158 comments

Self-Signed JWTs

https://www.selfref.com/self-signed-jwts
100•danscan•13h ago•63 comments

Twentyseven 1.0

https://blog.poisson.chat/posts/2025-08-01-twentyseven.html
32•082349872349872•9h ago•3 comments