Commit graph

4980 commits

Author SHA1 Message Date
Kelvin M. Klann
2f722c85da profiles: sort macros in profile.template
Some checks failed
Build-extra / build-gcc (push) Has been cancelled
Build-extra / build-clang (push) Has been cancelled
Build / build (push) Has been cancelled
Check-C / scan-build (push) Has been cancelled
Check-C / cppcheck (push) Has been cancelled
Check-C / codeql-cpp (push) Has been cancelled
Check-Profiles / profile-checks (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
Added on commit d4f824519 ("Mention macros in profile.template (#2759)",
2019-06-11).

Kind of relates to #7157.
2026-05-13 11:32:56 -03:00
Kelvin M. Klann
0298a7eba7
profiles: use xdg macros with subpaths (#7160)
Commands used to search and replace:

    $ git grep -IElz '\$\{HOME\}/(Desktop|Documents|Downloads|Music|Pictures|Projects|Videos)' -- etc |
      xargs -0 perl -pi -e '
        s/\$\{HOME\}\/Desktop/\${DESKTOP}/;
        s/\$\{HOME\}\/Documents/\${DOCUMENTS}/;
        s/\$\{HOME\}\/Downloads/\${DOWNLOADS}/;
        s/\$\{HOME\}\/Music/\${MUSIC}/;
        s/\$\{HOME\}\/Pictures/\${PICTURES}/;
        s/\$\{HOME\}\/Projects/\${PROJECTS}/;
        s/\$\{HOME\}\/Videos/\${VIDEOS}/;
      '

Note: The entries in the following profiles were sorted manually:

* etc/profile-m-z/Mathematica.profile
* etc/profile-m-z/prismlauncher.profile
* etc/profile-m-z/zoom.profile

This is a follow-up to #7151.
2026-05-11 14:07:42 +00:00
Kelvin M. Klann
3664750f8f profiles: zoom: sort noblacklist/whitelist sections
Some checks failed
Build-extra / build-gcc (push) Has been cancelled
Build-extra / build-clang (push) Has been cancelled
Build / build (push) Has been cancelled
Check-C / scan-build (push) Has been cancelled
Check-C / cppcheck (push) Has been cancelled
Check-C / codeql-cpp (push) Has been cancelled
Check-Profiles / profile-checks (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
2026-05-09 10:20:32 -03:00
Kelvin M. Klann
85962902a8 profiles: keepassxc: sort noblacklist section 2026-05-09 10:20:32 -03:00
Kelvin M. Klann
5abf0577a7
feature: add ${PROJECTS} macro (#7157)
Based on the new ~/Projects directory from version 0.20 of the
xdg-user-dirs specification[1]:

* `XDG_PROJECTS_DIR="$HOME/Projects"`

Relates to #7147 #7151.

[1] https://www.freedesktop.org/wiki/Software/xdg-user-dirs/
2026-05-09 13:19:42 +00:00
Kelvin M. Klann
f4170dd82e profiles: move llm-agent-common.inc to llm-agent-common.profile
Move it together with the other profiles used for redirecting in
`etc/profile*`.

Commands used to search and replace:

    git mv etc/inc/llm-agent-common.inc etc/profile-a-l/llm-agent-common.profile
    git grep -IElz llm-agent-common.inc | xargs -0 perl -pi -e '
      s/llm-agent-common.inc/llm-agent-common.profile/
    '

This amends commit c81777164 ("profiles: add llm-agent-common.inc
(#7158)", 2026-05-08).
2026-05-09 09:16:46 -03:00
Kelvin M. Klann
0959f0f653 profiles: nodejs-common: sort whitelist section
Some checks are pending
Build / build (push) Waiting to run
Check-Profiles / profile-checks (push) Waiting to run
Codespell / codespell (push) Waiting to run
Added on commit 699a803f1 ("Node.js stack refactoring (#4255)",
2021-05-08).
2026-05-08 13:27:32 -03:00
Kelvin M. Klann
8391ff7cbb profiles: yarn: fix comment header
Note: The missing line is already present in the other includers of
`nodejs-common.inc`:

    $ git grep -Il 'include nodejs-common.profile'
    etc/profile-m-z/node-gyp.profile
    etc/profile-m-z/node.profile
    etc/profile-m-z/npm.profile
    etc/profile-m-z/npx.profile
    etc/profile-m-z/pnpm.profile
    etc/profile-m-z/pnpx.profile
    etc/profile-m-z/semver.profile
    etc/profile-m-z/yarn.profile

This amends commit 37452ef1a ("refactor nodejs applications (npm & yarn)
(#3876)", 2021-01-11).
2026-05-08 13:25:14 -03:00
Amin Vakil
c81777164c
profiles: add llm-agent-common.inc (#7158)
Some checks are pending
Build / build (push) Waiting to run
Check-Profiles / profile-checks (push) Waiting to run
Codespell / codespell (push) Waiting to run
Note: This also sets `env NO_BROWSER=true` in pi.profile.
2026-05-08 11:08:49 +00:00
StellariusOrion592
45c9e2e7c1
new profile: ephoto (#7153)
Ephoto is a lightweight, user-friendly image viewer and editor built 
on the Enlightenment Foundation Libraries (EFL). It combines simplicity 
with performance, delivering a fast and efficient experience without 
unnecessary overhead.

https://www.enlightenment.org/about-ephoto
2026-05-01 11:33:36 +00:00
Amin Vakil
938bd0cd62
new profile: pi (#7136)
https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent
2026-05-01 11:15:35 +00:00
Amin Vakil
84b6ebfc93
new profile: opencode (#7135)
https://github.com/anomalyco/opencode
2026-05-01 11:13:53 +00:00
Amin Vakil
3469e5de60
new profile: gemini (#6936)
https://github.com/google-gemini/gemini-cli
2026-05-01 11:09:54 +00:00
cobratbq
3cb8bb1a3d
profiles: torbrowser-launcher: add no3d (#7143) 2026-05-01 10:48:31 +00:00
Kelvin M. Klann
12d7e15a77
profiles: steam: allow more 3d cache paths (#7149)
Add the mesa path and the old nvidia path:

* `~/.cache/mesa_shader_cache`
* `~/.nv`

This is a follow-up to commit 263f576d2 ("profiles: steam: whitelist
.cache/nvidia (#7114)", 2026-04-23).
2026-05-01 10:44:12 +00:00
wladmis
9a83128c69
profiles: firefox-common: allow auto light/dark theme switching (#7103) 2026-04-26 07:51:47 +00:00
acuifex
263f576d25
profiles: steam: whitelist .cache/nvidia (#7114)
Improves launch performance for Team Fortress 2 on legacy OpenGL launch option
and possibly other games.

Went from 100 seconds to launch the game and ~8% cpu usage during launch (~1
core on my machine?) to 60 seconds and ~16% cpu usage (~2 cores).

Apparently the path was changed on 460.27.04 (from `~/.nv/GLCache` to
`~/.cache/nvidia/GLCache`):

* https://download.nvidia.com/XFree86/Linux-x86_64/455.45.01/README/openglenvvariables.html
* https://download.nvidia.com/XFree86/Linux-x86_64/460.27.04/README/openglenvvariables.html
2026-04-23 07:56:58 +00:00
Kelvin M. Klann
a7a66c5e6e new_syscalls.txt: fix trailing whitespace
This amends commit e9cccefe1 ("update all system call headers",
2026-03-05).
2026-04-17 15:29:25 -03:00
debugur
76c1c8539a
profiles: disable-common: add xfce clipman path (#7120)
Protect clipman files.
2026-04-06 20:00:39 +00:00
pierretom
9d90daff22 create a new syscall group: @program-keep
`@default-keep` should be used for syscalls used by Firejail itself only.
We are moving some syscalls from `@default-keep` that do not meet this condition into the new group `@program-keep`.
Syscalls in `@program-keep` are not forced to whitelist (we let users decide), but should never be present in `@default` and its sub-groups.

Also move `execv` into `@obsolete` (sparc only, replaced by `execve`).
2026-04-01 14:26:38 +02:00
sofoxe1
7cb4c6034b
profiles: mumble: include whitelist-runuser-common (#7084) 2026-03-25 13:49:42 +00:00
Kelvin M. Klann
fb4dc873de profiles: disable-exec: split mount paths
The mount paths in disable-exec.inc are the exact same ones as in
disable-write-mnt.inc, so split them into their own list and add a note
above each list to keep them in sync with each other.

This amends commit 98c3b41bc ("disable-exec: add mount points",
2026-03-20) / PR #7112.
2026-03-22 07:29:57 -03:00
pierretom
98c3b41bc9 disable-exec: add mount points
Example case: you want to access the photos and have scripts or binaries on the same USB flash drive.
Let's set mount points not executable in disable-exec.inc.
2026-03-20 09:33:34 +01:00
sofoxe1
eed8f78fd9
profiles: disable-programs: add lact paths (#7083)
https://github.com/ilya-zlobintsev/LACT
2026-03-16 08:05:57 +00:00
dogknowsnx
b07e47ea59
profiles: blobby: allow lua (#7102)
Environment: `firejail version 0.9.79`.

Fixes error:

    $ firejail blobby
    Reading profile /etc/firejail/blobby.profile
    blobby: error while loading shared libraries: liblua5.2.so.5.2: cannot open shared object file: Permission denied
2026-03-14 02:49:57 +00:00
Kelvin M. Klann
09edc29b36
profiles: halloy: sort misc 2026-03-12 07:07:06 +00:00
Kelvin M. Klann
06a42773da
profiles: halloy: format misc 2026-03-12 07:05:52 +00:00
powerjungle
6755ec8aa0
profiles: new profile for halloy IRC client
https://halloy.chat
2026-03-11 20:18:15 +01:00
Kelvin M. Klann
09329b990f modif: replace --keep-hostname with new --hostname-randomize
Changes:

* Keep hostname by default (same as using `--keep-hostname`)
* Add  `--hostname-randomize` command to randomize the hostname
* Ignore `--keep-hostname` command and print a warning if it is used

Setting a different hostname inside of the sandbox may prevent X11
programs from authenticating to the X server and displaying windows at
all (see #7062).

To avoid breakage, keep the hostname as is by default and only set it to
a random value if a new `hostname-randomize` command is used.

This also avoids potentially surprising behavior, as the user might not
expect the hostname to be changed inside of the sandbox, considering
that usually the protections that are applied firejail involve
restricting access to resources (like file paths), rather than modifying
their values inside of the sandbox.

Fixes #7062

Relates to #7048 #7069.
2026-03-08 02:12:26 -03:00
pierretom
0a786af928 include the syscall header for the x32 ABI
Also add the new syscall `rseq_slice_yield` to the `@process` group.
2026-03-05 15:40:49 +01:00
pierretom
e9cccefe1d update all system call headers 2026-03-05 14:49:33 +01:00
pierretom
4d14e1da4b update for the gettimeofday syscall
- src/lib/syscall.c
  - Update the comment to also match `gettimeofday`
  - Sort the content of `@default-keep` by alphabetical order
- etc/templates/syscalls.txt
  - Update the Definition of groups
2026-03-02 09:40:12 +01:00
Kelvin M. Klann
c8a67075bf profiles: disable-common: sort list of terminal emulators
This amends commit cbf43089f ("update the list of terminal emulators
that can be used for sandbox escape", 2026-01-19).
2026-02-27 09:49:39 -03:00
Kelvin M. Klann
167a0ea74a Fix misc whitespace
Command used to check for whitespace errors:

    $ git diff --check 0.9.78..
2026-02-23 13:20:38 -03:00
Kelvin M. Klann
df75e45cfd profiles: add keep-hostname to noprofile.profile
Related to this, trying to open xorg programs stopped working on Arch
recently (even with `--profile=noprofile`), producing the following
error[1]:

    $ /usr/local/bin/thunderbird
    [...]
    Authorization required, but no authorization protocol specified

    Error: cannot open display: :0

    Parent is shutting down, bye...

The programs work if `--keep-hostname` is used.

The workaround was found quickly, but mostly by luck and guesswork, as
needing to use a profile command when even `--profile=noprofile` does
not work is counterintuitive and unexpected.

Related commits:

* cc8b019b5 ("--keep-hostname part 1 (#7048)", 2026-02-03)
* e31d872a5 ("profiles: add keep-hostname to profile.template",
  2026-02-11)

Relates to #7062.

[1] https://github.com/netblue30/firejail/issues/7062#issue-3943568845
2026-02-19 03:14:47 -03:00
Kelvin M. Klann
88652cdb38
profiles: firefox: add new ~/.config/mozilla dir (#7061)
Default directories in Firefox 146 and earlier:

* ~/.cache/mozilla  # cache files
* ~/.mozilla        # config and data

In Firefox 147[1]:

* ~/.cache/mozilla  # cache files
* ~/.config/mozilla # config and data

Note that the new location apparently contains the same files as in the
former location (including settings, bookmarks, extensions, etc).
That is, even though the new directory resides in `$XDG_CONFIG_HOME` /
~/.config, it is not solely used for program configuration as described
in the XDG Base Directory specification[2] and `$XDG_DATA_HOME` /
~/.local/share/mozilla is seemingly not used at all (see also the
discussion in the bug tracker[3]).

Commands used to search and replace:

    $ perl -pi -e 's/(.* )(\${HOME}\/\.mozilla)(.*)/$1\${HOME}\/.config\/mozilla$3\n$1$2$3/' \
      -- \
      etc/inc/*.inc \
      etc/profile*/*.profile \

Note: The entries in the following profiles were sorted manually:

* etc/inc/disable-common.inc
* etc/inc/disable-programs.inc
* etc/profile-a-l/keepassxc.profile
* etc/profile-a-l/krunner.profile
* etc/profile-m-z/seamonkey.profile

Relates to #7040.

[1] https://www.firefox.com/en-US/firefox/147.0/releasenotes/
[2] https://specifications.freedesktop.org/basedir/latest/
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=259356
2026-02-15 08:49:28 +00:00
Kelvin M. Klann
e46d9adcf1
profiles: fix allowing netcat (#7059)
disable-common.inc has these lines:

    blacklist ${PATH}/nc
    blacklist ${PATH}/nc.openbsd
    blacklist ${PATH}/nc.traditional
    blacklist ${PATH}/ncat

With openbsd-netcat on Artix, `/usr/bin/nc.openbsd` is symlinked to
`/usr/bin/nc`:

    $ pacman -Fl gnu-netcat openbsd-netcat | grep bin/nc
    gnu-netcat usr/bin/nc
    openbsd-netcat usr/bin/nc
    openbsd-netcat usr/bin/nc.openbsd
    $ realpath /usr/bin/nc.openbsd
    /usr/bin/nc

So `noblacklist ${PATH}/nc` is not enough, as
`blacklist ${PATH}/nc.openbsd` will follow the symlink to `/usr/bin/nc`
and still blacklist it.

To prevent `/usr/bin/nc` from being blacklisted,
`noblacklist ${PATH}/nc.openbsd` is also needed in this case.

To ensure that netcat is allowed, always `noblacklist` all netcat paths.

Fixes #6911.
2026-02-11 19:14:21 +00:00
Kelvin M. Klann
e31d872a51 profiles: add keep-hostname to profile.template
Put it together with the other `keep-` commands.

And move it to the allow section in libreoffice.profile.

Related commits:

* cc8b019b5 ("--keep-hostname part 1 (#7048)", 2026-02-03)
* fbc94070e ("adding keep-hostname to libreoffice.profile", 2026-02-11).

Relates to #7048.
2026-02-11 16:10:47 -03:00
netblue30
fbc94070ef adding keep-hostname to libreoffice.profile 2026-02-11 10:31:58 -05:00
netblue30
c13331305c adding apparmor profiles for --nettrace option 2026-02-11 09:17:22 -05:00
netblue30
46134f6972 added link-local addresses to 'nolocal' firewall configs (#7054) 2026-02-06 20:40:02 -05:00
netblue30
ca934a2ccd disable by default some of the systemd tools, more cleanup, and more testing 2026-02-04 07:34:07 -05:00
pierretom
f281d76f24 move other syscalls considered deprecated into @obsolete
`futimesat`, `gettimeofday`, `remap_file_pages`, `settimeofday`, `tkill` and `utime`.
2026-01-28 16:09:05 +01:00
pierretom
825fb24ff1 place some syscalls with access to a clock, used for time reading, theoretical resolution and sleep functions into @default-keep
Also move `stime` into `@obsolete`, see `man 2 stime`.
2026-01-28 13:11:23 +01:00
netblue30
3c44462b85
Merge pull request #7039 from pierretom/patch12
update system call groups - part 4
2026-01-27 10:33:29 -05:00
sofoxe1
b59005ccf0
profiles: vesktop: fix screen sharing (#7043) 2026-01-27 07:26:11 +00:00
pierretom
85625e46e6 add missing syscalls in groups 2026-01-24 15:11:49 +01:00
pierretom
f5e01fcc56 update system call groups - part 4
- Remove extra empty lines
- Definition of groups:
  - Add the two new groups `@memfd` and `@sandbox`
  - Add new syscalls
- Inheritance of groups:
  - Redraw it in a clearer form of groups and subgroups
  - Add the two new groups
  - Sort `@mount` and `@obsolete` groups by alphabetical order

This is the last part.
2026-01-22 16:21:01 +01:00
netblue30
cbf43089fb update the list of terminal emulators that can be used for sandbox escape 2026-01-19 09:35:08 -05:00
Kelvin M. Klann
2ba2f2d7a1 profiles: add deno paths
Add paths in the same places as nodejs/npm paths.

Deno is a javascript runtime and development tool similar to nodejs.

The following paths seem to be intended for downloading and caching
dependencies (and apparently also artifacts from .ts to .js compilation)
globally during development (as can be done with ~/.npm):

* ~/.cache/deno
* ~/.deno

Note that this commit makes these paths read-only (as npm dependencies
are usually executable code), which may potentially affect users of the
runtime (like yt-dlp).

Related commits:

* f2de86464 ("tentative fix for yt-dlp/javaScript deno profile (#6999)",
  2026-01-13)
2026-01-14 04:07:21 -03:00