Commit graph

10949 commits

Author SHA1 Message Date
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
Kelvin M. Klann
7800a68196
Merge pull request #7151 from kmk3/improve-xdg-macros
feature: allow subpaths in xdg macros
2026-05-01 10:37:41 +00:00
Kelvin M. Klann
aff7cb630c feature: allow subpaths in xdg macros
Currently it is not possible to use XDG-related macros (such as
`${DOCUMENTS}`) with subpaths (such as `${DOCUMENTS}/foo`) and so
profiles just use `${HOME}` with a hardcoded path using the English
directory name and the subpath (such as `${HOME}/Documents/foo`).

Allow using subpaths after XDG macros, so that they automatically use
the auto-detected XDG path, just as when currently using the XDG macros
without subpaths.

Before:

    ${HOME}/Documents/foo

After:

    ${DOCUMENTS}/foo

This is a follow-up to #7147.

Closes #2359.

Relates to #4229.
2026-05-01 07:30:23 -03:00
Kelvin M. Klann
c2f12016f2 macros.c: sort macro array 2026-04-29 03:06:38 -03:00
Kelvin M. Klann
68d16bf9da macros.c: deduplicate code in expand_macros()
Use `goto` statements to reduce code duplication.
2026-04-29 03:06:38 -03:00
Kelvin M. Klann
8e1954d887 macros.c: remove redundant braces in expand_macros()
For consistency.
2026-04-29 03:06:38 -03:00
Kelvin M. Klann
1155e0da0f macros.c: fix whitespace after if in expand_macros() 2026-04-29 03:06:38 -03:00
Kelvin M. Klann
d9739c6d55 test/fs/macro.exp: increase timeout to 3s
The test is failing at multiple parts in CI due to timeouts.

From [1]:

    runner@runnervmrc6n4:~/work/firejail/firejail/test/fs$
    <=./macro-blacklist.profile ls ~/Videos; echo ret $?
    Reading profile ./macro-blacklist.profile
    firejail version 0.9.81

    Parent pid 6385, child pid 6386
    Base filesystem installed in 0.25 ms
    firejail ls /home/runner/Videos
    Child process initialized in 7.58 ms
    ls: cannot open directory '/home/runner/Videos': Permission denied

    Parent is shutting down, bye...
    ret 2
    runner@runnervmrc6n4:~/work/firejail/firejail/test/fs$
    <le touch ~/Desktop/_firejail_test_file; echo ret $?
    Reading profile ./macro-readonly.profile
    firejail version 0.9.81

    Parent pid 6390, child pid 6391
    Base filesystem installed in 3.23 ms
    TESTING ERROR 19

From [2]:

    runner@runnervmrc6n4:~/work/firejail/firejail/test/fs$
    <macro-blacklist.profile ls ~/Documents; echo ret $?
    Reading profile ./macro-blacklist.profile
    firejail version 0.9.81

    Parent pid 6382, child pid 6383
    Base filesystem installed in 0.26 ms
    firejail ls /home/runner/Documents
    Child process initialized in 7.84 ms
    ls: cannot open directory '/home/runner/Documents': Permission denied

    Parent is shutting down, bye...
    ret 2
    runner@runnervmrc6n4:~/work/firejail/firejail/test/fs$
    <macro-blacklist.profile ls ~/Downloads; echo ret $?
    Reading profile ./macro-blacklist.profile
    firejail version 0.9.81

    Parent pid 6387, child pid 6388
    Base filesystem installed in 0.25 ms
    firejail ls /home/runner/Downloads
    TESTING ERROR 11

This amends commit 574885778 ("test/fs/macro.exp: reduce timeout and
sleep", 2026-04-24) / PR #7147.

[1] https://github.com/netblue30/firejail/actions/runs/25076422708/job/73470137137
[2] https://github.com/netblue30/firejail/actions/runs/25076422708/job/73522630528
2026-04-29 02:58:06 -03:00
Kelvin M. Klann
6f4fb7e898
Merge pull request #7147 from kmk3/test-fs-improve-macros
test: improve tests related to macros
2026-04-27 11:06:34 +00:00
Kelvin M. Klann
96e66e1020 test/fs/macro.exp: check return value
Fail faster instead of waiting for the timeout.

See also commit a4e6495fd ("modif: do not follow symlinks to /dev/null
on disable (#7129)", 2026-04-17).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
574885778a test/fs/macro.exp: reduce timeout and sleep
* timeout: 10s -> 1s
* sleep: 1000ms -> 100ms
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
096aa0337f test/fs/macro.exp: use _firejail_test_file
Use `_firejail_test_file` instead of `blablabla`, as the former is a
more common filename in tests and is what is actually removed in
test/fs/fs.sh.

Related commits:

* 2155203b3 ("xdg macro testing", 2018-08-07)
* 188d5f16d ("--profile=FILE rework (#6896)", 2026-01-05)
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
217c96fab4 test/fs/fs.sh: move rm of xdg macro files after macro.exp
They are unrelated to private-whitelist.exp.

This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
af26a06dd9 test/fs/fs.sh: sort rm commands for xdg paths
This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
07fe21516a test/fs/fs.sh: fix typo of _firejail_test_file
This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
0d9a9327d5 test/fs: sort entries in xdg macro profiles
This amends commit 2155203b3 ("xdg macro testing", 2018-08-07).
2026-04-27 04:47:37 -03:00
Kelvin M. Klann
1511aab5fa test/fs/disable-devnull-symlink.exp: simplify error messages
This amends commit a4e6495fd ("modif: do not follow symlinks to
/dev/null on disable (#7129)", 2026-04-17).
2026-04-27 04:43:52 -03:00
Kelvin M. Klann
68427a2333
test: fix unescaped newlines in error messages (#7146)
Commands used to search and replace:

    $ git grep -IElz 'ERROR [0-9]+n"' -- test |
      xargs -0 perl -pi -e 's/(ERROR [0-9]+)n"/$1\\n"/'

Related commits:

* 63e16bfcd ("major cleanup and testing", 2016-11-13)
* 2155203b3 ("xdg macro testing", 2018-08-07)
2026-04-27 07:36:57 +00:00
wladmis
9a83128c69
profiles: firefox-common: allow auto light/dark theme switching (#7103) 2026-04-26 07:51:47 +00:00
Kelvin M. Klann
e0fa9b9cba
build: deb: add conflict with firejail-profiles (#7141)
Debian has a separate "firejail-profiles" package for the profiles
(besides the main "firejail" package), which conflicts with our package
when trying to install it[1]:

    $ sudo dpkg -i firejail_0.9.80_1_amd64.deb

    FAIL: (Reading database ... 238526 files and directories currently installed.)
    Preparing to unpack ./firejail_0.9.80_1_amd64.deb ...
    Unpacking firejail (0.9.80-1) over (0.9.74-1~0ubuntu22.04.0) ...
    dpkg: error processing archive ./firejail_0.9.80_1_amd64.deb (--install):
     trying to overwrite '/etc/firejail/0ad.profile', which is also in package firejail-
     	profiles 0.9.74-1~0ubuntu22.04.0
    dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    Errors were encountered while processing:
     ./firejail_0.9.80_1_amd64.deb

So add a `Conflicts:` line for "firejail-profiles".

Relates to #7110.

[1] https://github.com/netblue30/firejail/issues/7072#issuecomment-4273240052

Reported-by: @ginto37
2026-04-25 10:54:43 +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
pierretom
4a5ed8364c remove trailing spaces in etc/templates/new_syscalls.txt
Trailing spaces are added after the second column, even if the third column is empty,
let's fix it.
2026-04-20 20:13:35 +02:00
Kelvin M. Klann
a4e6495fd1
modif: do not follow symlinks to /dev/null on disable (#7129)
When trying to prevent a file or directory in the user home from being
written to, it is not uncommon to replace it with a symlink to
/dev/null.

If this path is also blacklisted (such as by disable-common.inc), the
symlink will be followed, resulting in /dev/null itself being
blacklisted, which can cause issues with (unrelated) programs that have
their output redirected to /dev/null (for example).

To avoid disabling /dev/null, when applying commands from
`disable_file()` (such as `blacklist` and `read-only`), if a file is a
symlink to /dev/null, avoid following the symlink and perform the
operation on the link itself instead.

Using these commands with "/dev/null" directly as the argument (that is,
without going through a symlink) should still work the same way.

It has been confirmed to work on Linux 3.8[1], so it should work on at
least 3.8 and later.

Closes #5803.

[1] https://github.com/netblue30/firejail/pull/7129#issuecomment-4233141574

Reported-by: @fgpietersz
Suggested-by: @Changaco
Tested-by: @Changaco
Tested-by: @Zopolis4
2026-04-17 18:30:28 +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
Kelvin M. Klann
2e359f2609 RELNOTES: reword/move bugfix to build item
The `bugfix` items are usually for user-visible program changes, as most
users are unlikely care about code refactorings and changes that only
affect the code in general.

`build` is usually used for:

* Build system fixes and changes (configure/make)
* Fixes for errors/warnings from compilers and static analysis tools
* As a catch-all for refactorings in the code and scripts (as the
  changes are usually similar to fixing compiler warnings)

Added on commit b993ce458 ("RELNOTES: add modif, build, profile and
bugfix items", 2026-04-16).
2026-04-17 04:01:32 -03:00
Kelvin M. Klann
6f91a18794 RELNOTES: reword build item
Remove commit reference for consistency with the other items and quote
`_` to improve the output when copying the text to a GitHub Release
(where it is treated as markdown).

This amends commit b993ce458 ("RELNOTES: add modif, build, profile and
bugfix items", 2026-04-16).

Relates to #7127.
2026-04-17 03:57:35 -03:00
Kelvin M. Klann
6570a145b1 README: add missing items
This amends commit b993ce458 ("RELNOTES: add modif, build, profile and
bugfix items", 2026-04-16).

Relates to #7120 #7124.
2026-04-16 16:12:18 -03:00
pierretom
b993ce4580 RELNOTES: add modif, build, profile and bugfix items 2026-04-16 18:34:42 +02:00
pierretom
156593d254 remove the unused variable remove_cnt in src/fsec-optimize/optimizer.c 2026-04-16 18:01:51 +02:00
Kelvin M. Klann
f2f099cd65 fnettrace_common.h: remove extraneous include of sys/ioctl.h
No build errors without it, so it should be fine to remove as well.

This amends commit 8af07d8a2 ("build: merge fnettrace headers into
`fnettrace_common.h` (#7127)", 2026-04-13).
2026-04-13 13:16:27 -03:00
pierretom
8af07d8a2d
build: merge fnettrace headers into fnettrace_common.h (#7127)
It's redundant, plus `fnettrace_icmp.h` and `fnettrace_sni.h` use the
same guard macro.
2026-04-13 16:10:03 +00:00
debugur
76c1c8539a
profiles: disable-common: add xfce clipman path (#7120)
Protect clipman files.
2026-04-06 20:00:39 +00:00
For compliance reasons, we're required
e07510100f
build: remove unused install.sh (#7124)
install.sh was used for AC_PROG_INSTALL, which was removed in
4421517c55 (corresponding PR #5133)

From the manual of GNU Autoconf (version 2.73):

>     Autoconf comes with a copy of ‘install-sh’ that you can use.  If
>     you use ‘AC_PROG_INSTALL’, you must include ‘install-sh’ in your
>     distribution; otherwise ‘autoreconf’ and ‘configure’ will produce
>     an error message saying they can’t find it—even if the system
>     you’re on has a good ‘install’ program.  This check is a safety
>     measure to prevent you from accidentally leaving that file out,
>     which would prevent your package from installing on systems that
>     don’t have a BSD-compatible ‘install’ program.

If install-sh wasn't found, configure would check for install.sh in
srcdir. install.sh is a placeholder that does nothing, without it
configure would abort.
2026-04-02 11:55:42 +00:00
dependabot[bot]
ca88d166da build(deps): bump step-security/harden-runner from 2.15.0 to 2.16.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.15.0 to 2.16.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](a90bcbc653...fe10465874)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.16.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 15:46:56 +00:00
dependabot[bot]
21d5bd728f build(deps): bump github/codeql-action from 4.32.4 to 4.35.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.4 to 4.35.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](89a39a4e59...c10b8064de)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 15:46:38 +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
Kelvin M. Klann
ae1858d1fa RELNOTES: add docs, build and profile items
Relates to #7083 #7084 #7106 #7108 #7109 #7110 #7112.
2026-03-26 14:43:34 -03:00
Kelvin M. Klann
cb12f77632
docs: recommend .deb or building from source on debian/ubuntu (#7110)
Most recent releases:

* firejail 0.9.72: 2023-01-16
* firejail 0.9.74: 2025-03-24
* firejail 0.9.76: 2025-07-30
* firejail 0.9.78: 2026-01-03
* firejail 0.9.80: 2026-03-14

firejail 0.9.76 was released over 6 months ago, but the packages from
both Debian stable (13 / Trixie) and the Ubuntu PPA appear to still be
on firejail 0.9.74, which is over 1 year old[1] [2].

As for installing firejail through Debian backports, it is unclear to me
if that is currently working and if so, which firejail version would be
installed on each Debian version.

Lastly, the packages on Ubuntu seem to still be on firejail 0.9.72,
which is over 3 years old, even on the latest Ubuntu 25.10 and on the
upcoming Ubuntu 26.04[3].

So to avoid bugs and bug reports caused by old firejail versions,
recommend either installing the release .deb file from GitHub or
building from source on Debian/Ubuntu.

Relates to #6842 #7060.

[1] https://tracker.debian.org/pkg/firejail
[2] https://launchpad.net/~deki/+archive/ubuntu/firejail
[3] https://launchpad.net/ubuntu/+source/firejail
2026-03-26 16:32:18 +00: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
240b602282
Merge pull request #7112 from pierretom/patch20
profiles: disable-exec: add mount points
2026-03-22 04:14:22 +01:00
Kelvin M. Klann
fc2b80ae7b
build: fix empty lists in syscall.c breaking compilation (#7109)
If no syscalls are defined (such as with an older kernel) inside of a
`.list` element, then compilation breaks due to a syntax error:

      .list =
    },

For example, `SYS_memfd_create` and `SYS_memfd_secret` are apparently
not defined on Linux 3.8, which is used on 32-bit x86 Chromebooks:

    $ make clean >/dev/null && make CFLAGS+='-march=i686 -m32'
    [...]
    gcc -ggdb -O2 -DVERSION='"0.9.81"' [...] -march=i686 -m32 -c ../../src/lib/syscall.c -o ../../src/lib/syscall.o
    ../../src/lib/syscall.c:907:9: error: expected expression before ‘}’ token
      907 |         },
          |         ^
    make[1]: *** [../../src/prog.mk:25: ../../src/lib/syscall.o] Error 1

Also, syscall lists cannot be empty (`""`), so ensure that
`__dummy_syscall__` appears in every list as the last element for
simplicity.

This makes every non-dummy syscall string in the source code end with
`,` (including the last item, which makes sorting them easier) and
removes the need for checking all syscall macros in each list before
adding `__dummy_syscall__`.

Related commits:

* 34ee8e03f ("Seccomp: system call grouping and call numbers",
  2017-08-06)
* 88a75a650 ("add a new option `--debug-syscall-groups` - part 1",
  2026-01-31) / PR #7049
* a3f352521 ("update system call groups - part 3", 2026-01-18) / PR
  #7034

Fixes #7108.

Reported-by: @Zopolis4
2026-03-20 12:52:06 +00: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
Fabian Foerg
ae2701ac2c
docs: man: fix typo in example (#7106)
The description of a command references the wrong network interface.
2026-03-16 07:59:00 +00:00
Kelvin M. Klann
811e0fb0a0 docs: update supported version to 0.9.80
Relates to #7016.
2026-03-15 03:06:35 -03:00