Commit graph

10973 commits

Author SHA1 Message Date
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
netblue30
4b3ab56040 README.md 2026-03-14 08:54:39 -04:00
netblue30
59c9598a1b rel 0.9.81 start 2026-03-14 08:36:05 -04:00
netblue30
13604ce284 release 0.9.80 2026-03-14 08:20:32 -04:00
Kelvin M. Klann
cbff43bffe RELNOTES: add blobby profile item
Relates to #7102.
2026-03-13 23:51:52 -03: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
c62139cf9a RELNOTES: reword/sort modif items
Related commits:

* 6a6ff981b ("add a syscall header for the x32 ABI", 2026-03-05)
* 3db2e976e ("update: s390 syscall table is only for 64-bit now",
  2026-03-05)
* e9cccefe1 ("update all system call headers", 2026-03-05)
* 19224d8fb ("RELNOTES: add syscall headers update items", 2026-03-13)
2026-03-13 23:47:03 -03:00
pierretom
19224d8fb2 RELNOTES: add syscall headers update items 2026-03-13 12:51:22 +01:00
Kelvin M. Klann
fcb7860f2e RELNOTES: improve test and profile items
Reword, move and add missing item.

This amends commit 221981585 ("merges", 2026-03-12).

Relates to #7099 #7100.
2026-03-13 03:27:50 -03:00
netblue30
221981585c merges 2026-03-12 09:05:03 -04:00
netblue30
f71bc87868
Merge pull request #7100 from powerjungle/master
new profile: halloy IRC client
2026-03-12 09:02:11 -04:00
netblue30
fc1323db2a
Merge pull request #7099 from TheJJ/fix-strace-colors
tests: fix strace color probing in allow-debuggers & seccomp-ptrace
2026-03-12 08:59:23 -04: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
Kelvin M. Klann
11de349831 RELNOTES: remove issue reference
Remove `--keep-hostname` issue, as it was replaced with
`--hostname-randomize`.

Related commits:

* 09329b990 ("modif: replace --keep-hostname with new
  --hostname-randomize", 2026-03-0t7) / PR #7095

Relates to #7062 #7069 #7095.
2026-03-12 03:50:55 -03:00
Kelvin M. Klann
b67ea0a2a7 README: add bugfix item
Relates to #7098.
2026-03-12 03:41:27 -03:00
Kelvin M. Klann
1ffa5e5600 RELNOTES: add bugfix item
Relates to #7098.
2026-03-12 03:40:32 -03:00
pierretom
05e0d44288
bugfix: lib: fix memory leaks in syscall_in_list() (#7098)
`asprintf()` overwrites the value of `ptr->xxx` with the new pointer.
Result: the older allocation is never freed.
2026-03-12 06:39:38 +00:00
powerjungle
6755ec8aa0
profiles: new profile for halloy IRC client
https://halloy.chat
2026-03-11 20:18:15 +01:00
Jonas Jelten
92f7be5192 testing: fix strace color probing in allow-debuggers & seccomp-ptrace
if strace runs in a terminal, it probes the background color to select
its color palette. this probing expects a reply, but due to expect
intercepting the io, the answer isn't sent back to strace, so it never
starts printing the expected output.
2026-03-11 13:43:14 +01:00
netblue30
e01e2c1740
Merge pull request #7095 from kmk3/add-hostname-randomize
modif: replace --keep-hostname with new --hostname-randomize
2026-03-09 07:55:29 -04: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
Kelvin M. Klann
2e9a96bbdb RELNOTES: improve/move some ci items to test items
Fix formatting, reword, add commit reference and move.

The changes related to the items in question were made to not only the
CI files in .github/workflows, but also to the local test files and
scripts.

So use test items to clarify that their changes are not just strictly CI
changes.

Add a commit reference just to the "make test-compile" item because the
other items seem to relate to many commits.
2026-03-07 09:04:09 -03:00
Kelvin M. Klann
afa71cbf72 RELNOTES: add issue references for feature/modif items
Replace commit references with issue references.

Related commits:

* cbb7a3897 ("make Xephyr default for --x11 obption - currently Xpra is
  not available in Debian/Ubuntu and derivatives", 2026-01-17)
* c13331305 ("adding apparmor profiles for --nettrace option",
  2026-02-11)

Relates to #7093 #7094.
2026-03-07 09:04:09 -03:00
Kelvin M. Klann
3b55e6eb5e RELNOTES: add issue references for build items (removals)
Replace commit references with issue references.

Related commits:

* 5c7c58f6e ("rework make test-compile", 2026-01-20)
* a655b7d1b ("removed ./configure --disable-man option", 2026-01-21).
* f571fb5c7 ("tests: compile: remove leftover --disable-man test", 2026-01-25)

* b214d080e ("removed ./configure --disable-usertmpfs option",
  2026-01-21)

Relates to #7091 #7092.
2026-03-07 09:04:09 -03:00
pierretom
e7161010b8 fix the indentation 2026-03-07 09:00:15 +01: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