Skip to content

Commit e5607c7

Browse files
committed
Update flatpak overrides
Signed-off-by: Tommy <[email protected]>
1 parent c817cfc commit e5607c7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

content/posts/linux/Desktop Linux Hardening.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,17 @@ Some sandboxing solutions for desktop Linux distributions do exist; however, the
102102
You can restrict applications further by setting [Flatpak overrides](https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-override). This can be done with the command&nbsp;line or by using [Flatseal](https://github.com/tchx84/Flatseal). To deny common dangerous Flatpak permissions globally, run the following commands:
103103

104104
```bash
105-
sudo flatpak override --system --nosocket=x11 --nosocket=fallback-x11 --nosocket=pulseaudio --unshare=network --unshare=ipc --nofilesystem=host:reset
106-
flatpak override --user --nosocket=x11 --nosocket=fallback-x11 --nosocket=pulseaudio --unshare=network --unshare=ipc --nofilesystem=host:reset
105+
sudo flatpak override --system --nosocket=x11 --nosocket=fallback-x11 --nosocket=pulseaudio --unshare=network --unshare=ipc --nofilesystem=host:reset --nodevice=input --nodevice=shm --nodevice=all
106+
flatpak override --user --nosocket=x11 --nosocket=fallback-x11 --nosocket=pulseaudio --unshare=network --unshare=ipc --nofilesystem=host:reset --nodevice=input --nodevice=shm --nodevice=all
107107
```
108108

109-
Note that this only helps with lax high&#8209;level default permissions and cannot solve the low&#8209;level issues like `/proc` and `/sys` access or an insufficient seccomp blacklist.
109+
To allow Flatseal to function after applying the overrides above, run the following command:
110+
111+
```bash
112+
flatpak --user override com.github.tchx84.Flatseal --filesystem=/var/lib/flatpak/app:ro --filesystem=xdg-data/flatpak/app:ro --filesystem=xdg-data/flatpak/overrides:create
113+
```
114+
115+
Note that this only helps with lax high&#8209;level default permissions and cannot solve the low&#8209;level issues like `/proc` and `/sys` access or an insufficient seccomp blacklist.
110116

111117
Some sensitive permissions of note:
112118

0 commit comments

Comments
 (0)