Commit graph

4716 commits

Author SHA1 Message Date
Syed Muhammad Shuja Haider
33f1c1669d
Update etc/profile-m-z/prismlauncher.profile to add a local file
Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
2024-12-02 15:21:03 +03:00
Syed Muhammad Shuja Haider
ecbb52b7c4
Add seccomp.block-secondary 2024-12-02 15:19:56 +03:00
Syed Muhammad Shuja Haider
0e038f8217
Make it like the template, also harden it 2024-12-01 19:19:13 +03:00
Syed Muhammad Shuja Haider
d0ab6e19fc
Create prismlauncher.profile 2024-11-30 19:50:47 +03:00
Kelvin M. Klann
c8614b329a private-etc: add gnutls dir to @network group
This is currently only present in `private-etc` in mutt.profile, though
it may also be used by other programs that use GNU TLS.

This was added to mutt.profile on commit a8a8e33bc ("Add whitelisting to
mutt; improve geary, new profile for neomutt", 2020-12-28) / PR #3849.

Relates to #6400.
2024-11-29 19:56:14 -03:00
Kelvin M. Klann
e4ebbfafea
profiles: ensure allow-lua where mpv is allowed (#6555)
mpv crashes if luajit is blocked:

    $ firejail --quiet --noprofile \
      --include=/etc/firejail/disable-interpreters.inc /usr/bin/mpv
    /usr/bin/mpv: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: Permission denied

So make sure that allow-lua.inc is always included when mpv paths (such
as ~/.config/mpv) are allowed.

Environment: luajit 2.1.1727870382-1, mpv 1:0.39.0-3 on Artix Linux.

Related commits:

* db2bdaadd ("add lua support for mpv (#3243)", 2020-02-24) /
  PR #3243
* d6a6fb905 ("Allow Lua for mpv in dolphin.profile", 2020-04-18) /
  issue #3363
* f3585e539 ("fixes, closes, enhances, improvements, and so on",
  2020-11-09) /
  issue #3686
* 3ec523f11 ("profiles: anki: allow lua", 2024-11-14) /
  PR #6545
2024-11-29 06:10:46 +00:00
Kelvin M. Klann
e99d10f2b8
profiles: tesseract: disable private-tmp to fix ocrmypdf (#6552)
As reported by @kmille[1]:

The current `tesseract` profile breaks `ocrmypdf`:

    kmille@linbox:scans ocrmypdf C.pdf del.pdf
    Scanning contents     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1 0:00:00
        1  Error, could not create hOCR output file: No such file or directory                             tesseract.py:253
        1  Error, could not create TXT output file: No such file or directory                              tesseract.py:253
    OCR                   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% 0/1 -:--:--
    An exception occurred while executing the pipeline                                                       _common.py:294
    Traceback (most recent call last):
      File "/usr/lib/python3.12/site-packages/ocrmypdf/_pipelines/_common.py", line 259, in
    cli_exception_handler
        return fn(options, plugin_manager)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [...]
      File "/usr/lib/python3.12/pathlib.py", line 840, in stat
        return os.stat(self, follow_symlinks=follow_symlinks)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ocrmypdf.io.0od81kk5/000001_ocr_hocr.hocr'

These are some of the commands that run in background:

    [...]
    2024/11/23 22:13:53 PID=403915 UID=0     CMD=/usr/bin/firejail /usr/bin/tesseract --list-langs
    2024/11/23 22:13:53 PID=403917 UID=0     CMD=/run/firejail/lib/fcopy /usr/bin/text2image /run/firejail/mnt/bin
    2024/11/23 22:13:53 PID=403939 UID=1000  CMD=gs -dQUIET [...] -f /tmp/ocrmypdf.io.0od81kk5/origin.pdf
    [...]
    2024/11/23 22:14:03 PID=403953 UID=0     CMD=tesseract -l eng /tmp/ocrmypdf.io.0od81kk5/000001_ocr.png [...]

Fixes #6550.

[1] https://github.com/netblue30/firejail/issues/6550#issue-2686607038

Reported-by: @kmille
Suggested-by: @kmille
2024-11-25 20:14:10 +00:00
Kelvin M. Klann
650405ebab
profiles: wget: unify wget2 into wget profile (#6551)
According to @rusty-snake[1]:

> Distributions started to replace wget with wget2 (I.e. `wget` and
> `wget2` are the same binary where one of them is a symlink to the
> other).

So move all custom entries (other than `private-bin`) from wget2.profile
into wget.profile and turn wget2.profile into more of a redirect to
wget.profile.

[1] https://github.com/netblue30/firejail/pull/6542#pullrequestreview-2426287045
2024-11-25 20:13:58 +00:00
celenityy
66a281875a
profiles: wget: allow ~/.local/share/wget (#6542)
wget appears to require access to this directory for HSTS & HPKP.

Without access to this directory, I get the following error when running
wget:

    Failed to read HSTS data
    Failed to read HPKP data
    Failed to write HSTS file

This fixes it.
2024-11-24 18:25:26 +00:00
Kelvin M. Klann
5804bb69a7 profiles: chatterino: fix include comments
Make them match the comments in profile.template.

Command used to search for potential issues:

    $ git grep -E '# Allow [A-Z][A-Za-z]+ .* \(blacklisted'

Added on commit 3af6c4068 ("Add Chatterino profile", 2022-12-24) /
PR #5556.
2024-11-19 16:23:36 -03:00
Fidel Ramos
024f421e30 profiles: anki: allow sound
Anki needs sound access for recording and playing media.
2024-11-19 14:44:59 -03:00
Fidel Ramos
3ec523f110 profiles: anki: allow lua
Anki uses mpv to play media, which requires the lua interpreter.

Without this, anki displays this error in the console and falls back to
mplayer:

    mpv: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: Permission denied
    Traceback (most recent call last):
    File "/usr/lib/python3.12/site-packages/aqt/sound.py", line 854, in setup_audio
    mpvManager = MpvManager(base_folder, media_folder)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/aqt/sound.py", line 408, in __init__
    super().__init__(window_id=None, debug=False)
    File "/usr/lib/python3.12/site-packages/aqt/mpv.py", line 442, in __init__
    super().__init__(*args, **kwargs)
    File "/usr/lib/python3.12/site-packages/aqt/mpv.py", line 104, in __init__
    self._start_socket()
    File "/usr/lib/python3.12/site-packages/aqt/mpv.py", line 194, in _start_socket
    raise MPVProcessError("unable to start process")
    aqt.mpv.MPVProcessError: unable to start process

    mpv too old or failed to open, reverting to mplayer
2024-11-19 14:44:40 -03:00
Kelvin M. Klann
3a03bcd513 profiles: anki: allow mpv/mplayer
Anki relies on mpv/mplayer for playing audio and video files.
2024-11-19 14:44:33 -03:00
Fidel Ramos
c974e17361 profiles: anki: add mpv/mplayer to private-bin
Without this change, Anki fails to start.

Fixes #6544.
2024-11-19 13:31:54 -03:00
Kelvin M. Klann
26be7180fa
profiles: game-launchers: disable nou2f (#6534)
While gamepads apparently work fine in the Steam client itself, `nou2f`
appears to make gamepads unresponsive inside certain games while using
"Steam Input" (possibly due to `nou2f` blocking access to `/dev/hidraw*`
devices).

This issue reportedly affects at least the following games on Steam:
"Undertale", "Persona 4 Golden" and "Persona 5 Royal".

Disable nou2f to ensure that gamepads can be used.

Relates to #6523.

Reported-by: @opqriu
2024-11-08 10:34:00 +00:00
Kelvin M. Klann
9a3dc2c0c3
keepassxc: allow access to ssh-agent socket (#6531)
Fixes #3314.

Relates to #6529.
2024-11-07 02:30:28 +00:00
Kelvin M. Klann
040c42c54c
profiles: firefox-esr: allow /etc/firefox-esr (#6515)
This path is apparently used on Debian.

Relates to #5518 #6400 #6435.

Reported-by: @Boruch-Baum
2024-10-25 14:20:27 +00:00
celenityy
bfa00e385e
profiles: thunderbird: allow /etc/thunderbird (#6514)
This fixes access to Thunderbird system policies, which can be set
system-wide via `/etc/thunderbird/policies/policies.json`.

Users can also use this directory to set different default preferences.

Relates to #6400 #6435.
2024-10-23 21:05:58 +00:00
Foxreef
07ff98385f
profiles: steam: add ~/.config/UNDERTALE (#6503)
Whitelist ~/.config/UNDERTALE to allow the game to save.
2024-10-11 06:55:13 +00:00
Kelvin M. Klann
aa6b08ffd0
profiles: firefox-common: allow org.freedesktop.portal.Documents (#6499)
This fixes drag and drop for at least Dolphin.

Fixes #6444.

Reported-by: @Utini2000
Suggested-by: @rusty-snake
2024-10-04 21:11:04 +00:00
Kelvin M. Klann
ff2c7bd10d profiles: kube: sort dbus entries
This amends commit 7df28c1ed ("New profiles for balsa,trojita,kube
(#3603)", 2020-09-03).
2024-10-01 12:06:48 -03:00
Kelvin M. Klann
3470a3721e profiles: signal-desktop: sort dbus entries
This amends commit 047d86f46 ("Add access to D-Bus freedesktop.org
secret API", 2024-10-01) / PR #6498.
2024-10-01 11:54:42 -03:00
Yves-Alexis Perez
047d86f46e
Add access to D-Bus freedesktop.org secret API
Signal recently started storing a local key in the freedesktop.org secret API so allow access in the profile
2024-10-01 12:08:06 +02:00
qdii
c2cd8b72c6
profiles: keepassxc: add new socket location (#6391)
The KeePassXC browser extension looks for the KeePassXC socket at
`${RUNUSER}/app/org.keepassxc.KeePassXC`[1].

But `${RUNUSER}/app` seems to be blacklisted in disable-common.inc under the
flatpak section[2], so the KeePassXC extension cannot connect to it.

Fixes #5447.

Relates to #3984.

[1] 6b1ab1a5ed/src/browser/BrowserShared.cpp (L41)
[2] b89ec81892/etc/inc/disable-common.inc (L667)
2024-09-28 12:54:24 +00:00
Kelvin M. Klann
49d21b0740 profiles: browsers: format and improve comments 2024-09-28 05:34:28 -03:00
Kelvin M. Klann
21a5775b30 profiles: firefox-common: centralize dbus comments
Relates to #3326 #6285 #6444.
2024-09-28 05:34:20 -03:00
Kelvin M. Klann
4fb5189a0d profiles: firefox-common: centralize migration wizard comment
Relates to #3014.
2024-09-24 21:05:25 -03:00
Kelvin M. Klann
b787548b1d profiles: browsers: centralize/sync keepassxc extension comment
Centralize it on firefox-common and copy it to chromium-common.

Relates to #3984 #6391.
2024-09-24 21:05:14 -03:00
Kelvin M. Klann
98e81eab8f profiles: browsers: sort blacklist entries
See etc/templates/profile.template.

Added on commit f3d126bf1 ("disable curl and wget in browsers based on
firefox and chromium", 2021-12-18).

Relates to #4852.
2024-09-24 20:59:07 -03:00
Kelvin M. Klann
271fb1bfc7
profiles: ssh: add ${RUNUSER}/gvfsd-sftp (#6479)
Based on the report by @Saren-Arterius[1]:

Since GNOME gvfs 1.53+, the ssh client options `ControlMaster=auto` and
`ControlPath=/run/user/$UID/gvfsd-sftp/%C` are used to mount sftp.

Since `/run/user/$UID/gvfsd-sftp` is not whitelisted, gvfs sftp mount
with nautilus will fail with a meaningless error message shown in the
UI.

Steps to reproduce[1]:

Prepare ssh server or localhost, then run:

    ssh -o"ForwardX11 no" -o"ForwardAgent no" \
        -o"PermitLocalCommand no" -o"ClearAllForwardings yes" \
        -o"NoHostAuthenticationForLocalhost yes" \
        -o"ControlMaster auto" \
        -o"ControlPath=/run/user/${UID}/gvfsd-sftp/test" \
        -s {SSH_HOST} sftp

stderr shows:

    unix_listener: cannot bind to path /run/user/$UID/gvfsd-sftp/test.{RANDOM_STRING}: No such file or directory

And ssh exits with error code 255.

Fixes #5816.

[1] https://github.com/netblue30/firejail/issues/5816#issue-1695295931

Reported-by: @Saren-Arterius
Suggested-by: @Saren-Arterius
Reported-by: @Alex-Farol
Reported-by: @mirko
2024-09-19 10:55:35 +00:00
Kelvin M. Klann
3bbc6b59e1 profiles: ssh: sort entries
Related commits:

* 4747e0ed7 ("Whitelist runuser common (#3286)", 2020-03-31)
* ebd4b3eea ("profiles: ssh: allow gpgagent socket for custom homedir
  (#6419)", 2024-08-07)
2024-09-16 11:03:12 -03:00
Kelvin M. Klann
4f7cc368f8
profiles: nextcloud: fix access to ~/Nextcloud (#6478)
Related commits:

* 7c481eb43 ("Add QOwnNotes profile", 2018-10-20)
* 49a381c70 ("Add nextcloud-desktop", 2021-02-20) / PR #3997

Fixes #5877.

Reported-by: @Sadoon-AlBader
2024-09-16 13:22:57 +00:00
Kelvin M. Klann
f9ddf2f037 profiles: nextcloud: sort entries
Relates to #3997.
2024-09-14 07:38:55 -03:00
Kelvin M. Klann
eba4a1c090
profiles: wesnoth: allow lua (#6476)
Fixes the following error:

    $ LC_ALL=C firejail /usr/bin/wesnoth
    [...]
    /usr/bin/wesnoth: error while loading shared libraries: liblua++.so.5.4: cannot open shared object file: Permission denied

Environment: lua 5.4.7-1, wesnoth 1:1.18.2-2 on Arch Linux.

Fixes #6475.

Reported-by: @marek22k
2024-09-14 09:36:12 +00:00
Kelvin M. Klann
4280cf4873
profiles: librewolf: add new dbus name (io.gitlab.firefox) (#6473)
It appears that LibreWolf 129 uses `io.gitlab.firefox.*` as the dbus
name.

Commands used to check the dbus name:

    $ busctl --user --no-legend | grep -v '^:' | grep librewolf |
      sed -E 's/(^[^ ]+\.)[^. ]+ .*/\1/'
    io.gitlab.firefox.

Commands used to test dbus communication:

    # Open a new browser instance:
    $ firejail --name=lwtest --ignore=name --ignore='dbus-user none' \
      --dbus-user=filter --dbus-user.own='io.gitlab.firefox.*' \
      --private --net=none --ignore=net /usr/bin/librewolf
    # In another shell, try to open a new tab:
    $ firejail --join=lwtest /usr/bin/librewolf --new-tab about:blank
    # Check that the new tab was opened

Related commits:

* c3f299620 ("Let programs outside librewolf sandbox open new tabs in
  librewolf (#4546)", 2021-09-19)
* a8ad9cad1 ("Update librewolf.profile: use new message bus",
  2022-02-03) / PR #4897
* 4211ee323 ("merges", 2022-02-04)

Fixes #6413.

Misc: This was noticed on #6444.

Reported-by: @Lonniebiz
2024-09-13 08:56:04 +00:00
Kelvin M. Klann
1c059149c3
profiles: evolution: add /tmp/evolution-* & disable private-tmp (#6469)
These paths are apparently used for attachments.

Disable private-tmp to make it easier to open attachments with external
programs.

Relates to #5101.

Reported-by: @githlp
Suggested-by: @rusty-snake
2024-09-13 08:50:32 +00:00
Kelvin M. Klann
26f3e9bf5d
profiles: video: add ~/.dvdcss (#6468)
It's used by libdvdcss (which is used to play copy-restricted dvds).

It seems to be just a cache directory, so just allow without mkdir.

Relates to #5391.

Suggested-by: @reinerh
2024-09-13 08:50:02 +00:00
glitsj16
5edddc918e
profiles: bitwarden: improvements and new bitwarden-desktop redirect (#6443)
Changes:

- Allow shell access (bitwarden-desktop may be a shell script)
- Enable whitelist-usr-share-common.inc
- Introduce a new redirect for bitwarden-desktop
- Add the new redirect to firecfg

Relates to #6442.
2024-08-27 05:25:08 +00:00
Caleb McCombs
fecd25d699
profiles: zoom: allow ~/Documents/Zoom (#4290)
By default, Zoom records meetings to ~/Documents/Zoom. Add that folder
to the whitelist so that future users don't lose their meeting
recordings upon shutting Zoom down.

Fixes #4006.
2024-08-25 16:53:41 +00:00
Kelvin M. Klann
e8b693c814
profiles: firefox-common: fix private-etc in includers (#6435)
It was enabled in firefox-common.inc on commit 34d004892 ("private-etc:
corss-distro test for curl, gimp, inkscape, firefox, warzone2100",
2023-01-28), but not in the profiles that include it.

Enable it in the including profiles as well.

Note: This was already done for firefox.profile on commit 76249284f
("firefox: fix private-etc firefox", 2023-06-02) / PR #5844.

Relates to #6400.
2024-08-19 02:49:17 +00:00
ayham
ebd4b3eea6
profiles: ssh: allow gpgagent socket for custom homedir (#6419)
If a custom GPG homedir is used, a hash of its path is used in the path
of the gpg agent socket[1].

For example, when running:

    gpgconf --list-dirs agent-ssh-socket

With a custom homedir it returns:

    /run/user/1000/gnupg/<hashed homedir>/S.gpg-agent.ssh

Environment: gnupg 2.4.5-4 on Arch Linux.

[1] 91532dc3f4/common/homedir.c (L1342)
2024-08-07 21:10:05 +00:00
Felix Pehla
de85522248
profiles: blacklist sway IPC socket (#6429)
Much like the i3 IPC socket (#6361), the sway IPC socket also allows
arbitrary code execution via the `exec` subcommand. Access should only
be permitted to sway itself by default.

The location of the IPC socket is set in sway/ipc-server.c:

7e74a49142/sway/ipc-server.c (L126)
2024-08-07 01:26:04 +00:00
Kelvin M. Klann
c9eb10b5d1
profiles: element-desktop: allow /usr/share/element (#6424)
This path is apparently needed on openSUSE Tumbleweed[1]:

    $ LC_ALL=C firejail /usr/bin/element-desktop
    [...]
    Error launching app
    Unable to find Electron app at /usr/share/element/app

    Cannot find module '/usr/share/element/app'

    Parent is shutting down, bye...

Fixes #6421.

[1] https://software.opensuse.org/package/element-desktop

Reported-by: @leukimi
2024-07-29 21:35:46 +00:00
glitsj16
cf89d0cd94
New profile: dtui (#6422)
Description: TUI for introspecting the state of the system/session dbus.

https://github.com/Troels51/dtui
https://aur.archlinux.org/packages/dtui

Relates to #6420.
2024-07-28 01:01:24 +00:00
glitsj16
86bc5bd602
profiles: refactor dbus debugger profiles (#6420)
There are a lot of common options in the `d-feet` and `d-spy` profiles.

Create a new common include file and refactor the existing profiles as
redirects.

Relates to #2492 #6328.
2024-07-27 22:38:07 +00:00
glitsj16
601aa5c6aa
profiles: bijiben: update webkit var and disable in firecfg (#6418)
The current `bijiben.profile` sets an environment variable to disable
its internal webkit/bubblewrap sandbox but now a different variable
needs to be set[1]:

    WEBKIT_FORCE_SANDBOX no longer allows disabling the sandbox. Use WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1 instead.

This may be needed to make the profile work, but disabling the sandbox
affects the security in webkit[2], so update the variable and disable
bijiben by default in firecfg.config.

Note: Upstream replaced bijiben by gnome-notes[3] [4].

Relates to #2995.

[1] 0678a98c86/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp (L117)
[2] https://github.com/netblue30/firejail/issues/2995
[3] https://archlinux.org/packages/extra/x86_64/gnome-notes/
[4] https://wiki.gnome.org/Apps/Notes
2024-07-27 22:36:46 +00:00
Gabriel
8a5e53efa7
profiles: okular: fix "Print to PDF" (#6408)
Add `ps2pdf` to private-bin.

Fixes #6402.
2024-07-20 13:58:15 +00:00
qdii
001320226c
feature: add notpm command & keep tpm devices in private-dev (#6390)
An ssh private key may be stored in a Trusted Platform Module (TPM)
device and `private-dev` in ssh.profile currently breaks this use-case,
as it does not keep tpm devices (see #6379).

So add a new `notpm` command and keep tpm devices in /dev by default
with `private-dev` unless `notpm` is used.
2024-07-09 01:43:55 +00:00
Felix Pehla
de5946235b
profiles: fractal: add ~/.local/share/fractal (#6392)
Fractal 7 (and possibly earlier) stores messages and key material in
${XDG_DATA_DIR}/fractal which defaults to ~/.local/share/fractal.
Lack of access causes it to be unable to load messages offline and
de- or encrypt messages even when online without sharing keys again.
2024-06-29 18:11:51 +00:00
glitsj16
c908c0fb2d
profiles: claws-mail: add ~/.cache/claws-mail (#6378)
It is apparently used by the (widely used) "Fancy" plugin, which
"Renders HTML e-mail using the WebKit library".

https://www.claws-mail.org/plugins.php

Relates to #6377.

Note: etc/profile-a-l/email-common.profile contains `private-cache`.
2024-06-27 03:32:54 +00:00