Commit graph

10310 commits

Author SHA1 Message Date
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
Kelvin M. Klann
6da6817f53 RELNOTES: add feature, bugfix and build items
Relates to #6401 #6403 #6404 #6414 #6415.
2024-07-26 19:31:00 -03:00
Kelvin M. Klann
4ad26b3fcb
profiles: firecfg.config: disable spectacle (#6412)
There are various reports in #5127 that the current profile is broken on
wayland (and at least one report that it is broken on xorg as well).

Relates to #6268.
2024-07-26 13:18:11 +00:00
Kelvin M. Klann
60ea22080a
bugfix: firemon: skip coredump if unsupported (#6415)
The coredump-related code fails to build on Linux kernel version 3.8 as
apparently it only exists on Linux since version 3.10:

    docker run --platform linux/386 --rm -it satmandu/crewbuild:386
    [...]
    ./configure && make
    [...]
    gcc -ggdb -O2 -DVERSION='"0.9.73"' [...] -march=i686  -c ../../src/firemon/procevent.c -o ../../src/firemon/procevent.o
    ../../src/firemon/procevent.c: In function ‘procevent_monitor’:
    ../../src/firemon/procevent.c:399:38: error: ‘PROC_EVENT_COREDUMP’ undeclared (first use in this function); did you mean ‘PROC_EVENT_COMM’?
      399 |                                 case PROC_EVENT_COREDUMP:
          |                                      ^~~~~~~~~~~~~~~~~~~
          |                                      PROC_EVENT_COMM
    ../../src/firemon/procevent.c:399:38: note: each undeclared identifier is reported only once for each function it appears in
    ../../src/firemon/procevent.c:400:66: error: ‘union <anonymous>’ has no member named ‘coredump’
      400 |                                         pid = proc_ev->event_data.coredump.process_tgid;
          |                                                                  ^
    make[1]: *** [../../src/prog.mk:25: ../../src/firemon/procevent.o] Error 1
    make[1]: Leaving directory '/home/chronos/user/firejail/src/firemon'
    make: *** [Makefile:72: src/firemon/firemon] Error 2

Environment: gcc 14.1.0, glibc 2.23 and linuxheaders 3.8 on ChromeOS
M58.

Misc: @Zopolis4 also reports that "All i686 chromebooks have a kernel
version of 3.8".

This amends commit e11949a71 ("add support for comm, coredump, and prctl
procevents in firemon", 2024-04-30).

Fixes #6414.

Reported-by: @Zopolis4
2024-07-25 21:41:23 +00:00
Kelvin M. Klann
969e29b756
build: improve reliability/portability of date command usage (#6404)
Changes:

* Use the exact same source date string for all `date` invocations
* Use `-d` instead of `--date=`
* Fallback to `-r` and then to no argument

Some `date` implementations only support BSD `-r` instead of GNU `-d` /
`--date=` and others may not support any of them since neither option is
in POSIX.

For example, if zoneinfo is installed by chromebrew on ChromeOS, it
provides a date program that only supports `-r` and overrides the system
one (which supports `-d`) [1]:

    ./mkman.sh 0.9.72 src/man/firejail.man firejail.1
    date: invalid option -- '-'
    date: usage: date [-u] [-c] [-r seconds] [+format]
    make: *** [Makefile:42: firejail.1] Error 1

Environment: zoneinfo 2024a on ChromeOS M125.

Note: The changes are based on what is suggested by
reproducible-builds.org [2].

Relates to #193.

Fixes #6403.

[1] https://github.com/netblue30/firejail/issues/6403#issue-2402292506
[2] https://reproducible-builds.org/docs/source-date-epoch/

Reported-by: @Zopolis4
2024-07-20 14:11:21 +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
Kelvin M. Klann
bba4af3f01 docs: clarify that other tools may not be in PPA
Relates to #6406.

Reported-by: @Lidoca
2024-07-15 08:25:52 -03:00
Kelvin M. Klann
43be683782 RELNOTES: remove and sort duplicate items
Remove the newer #6390 item as it is already on the list, remove the
older #6307 item (modif) and sort the new #6307 item (bugfix).

This amends commit 9ebecd00d ("readme/relnotes update", 2024-07-13).
2024-07-15 03:30:20 -03:00
Gabriel
c8f9a60085
add irssi 2024-07-14 13:50:29 -07:00
netblue30
9ebecd00dc readme/relnotes update 2024-07-13 07:29:23 -04:00
Kelvin M. Klann
6c8b104214
modif: remove --noautopulse from --help and zsh comp (#6401)
This command is deprecated and may be confused for a hardening option.

This amends commit 5a612029b ("rename noautopulse to keep-config-pulse",
2021-05-13) / PR #4278.

This is a follow-up to #6390.
2024-07-11 03:18:20 +00:00
Kelvin M. Klann
aed94a395c RELNOTES: add feature, modif and docs items
Relates to #6372 #6379 #6380 #6382 #6387 #6390 #6398.
2024-07-08 22:48:46 -03: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
glitsj16
ad0e8c1272
docs: man: format and sort some private- items (#6398)
Format and sort items in the private-bin, private-dev and private-etc
sections.
2024-07-07 19:30:14 +00:00
Kelvin M. Klann
81c1c40df9 private-etc: add pipewire dir to @sound group
The `@sound` group currently only contains paths related to alsa and
pulseaudio.

This amends commit 02d37680c ("private-etc rework: file groups moved to
src/include/etc_groups.h, new groups added", 2023-01-25).

Relates to #5610 #6400.
2024-07-07 02:19:13 -03:00
dependabot[bot]
b69b3361f0 build(deps): bump step-security/harden-runner from 2.8.0 to 2.8.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](f086349bfa...17d0e2bd7d)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 16:59:37 +00:00
dependabot[bot]
466ea299d0 build(deps): bump github/codeql-action from 3.25.7 to 3.25.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.7 to 3.25.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f079b84933...b611370bb5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 16:59:29 +00:00
dependabot[bot]
53986d247b build(deps): bump actions/checkout from 4.1.6 to 4.1.7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...692973e3d9)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-03 16:59:21 +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
Kelvin M. Klann
af44e33b19
modif: keep /sys/module/nvidia* if prop driver and no no3d (#6387)
It has been reported in #6372 that after upgrading the nvidia
proprietary driver from version 550.78 to 550.90.07, programs using
hardware acceleration fail unless paths in `/sys/module/nvidia*` are
accessible.  Example:

    $ firejail --noprofile prime-run /bin/glxdemo
    [...]
    X Error of failed request:  BadValue (integer parameter out of range for operation)
      Major opcode of failed request:  150 (GLX)
      Minor opcode of failed request:  3 (X_GLXCreateContext)
      Value in failed request:  0x0
      Serial number of failed request:  22
      Current serial number in output stream:  23
    [...]

Meanwhile, the AMD proprietary driver (AMDGPU Pro) seems to depend on
`/sys/module/amdgpu` for OpenCL (though it is unclear how to detect that
driver).  See commit 95c8e284d ("Allow accessing /sys/module directory",
2018-05-08) and commit 9dd581d25 ("Allow AMD GPU usage by Blender",
2018-05-08) from PR #1932.

So whitelist `/sys/module/nvidia*` by default if the nvidia proprietary
driver is detected and `no3d` is not used.

Note: The driver check is copied from src/firejail/util.c (see #841).

To keep the current behavior (that is, block all modules), add
`blacklist /sys/module` to globals.local.

Fixes #6372.

Reported-by: @GreatBigWhiteWorld
Reported-by: @orzogc
Reported-by: @krop
Reported-by: @michelesr
Suggested-by: @glitsj16
Tested-by: @flyxyz123
2024-06-25 22:52:05 +00:00
Kelvin M. Klann
b89ec81892
modif: private-dev: keep /dev/kfd unless no3d is used (#6380)
Apparently hashcat needs access to this device for hardware acceleration
on AMD gpus and `private-dev` currently breaks that (see #6364).

It seems to be used by the "amdgpu" and "amdkfd" Linux kernel drivers
and as with /dev/dri/renderD128, this file is owned by the "render"
group.

Relevant udev rules from /usr/lib/udev/rules.d/50-udev-default.rules:

    SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="0666"
    SUBSYSTEM=="kfd", GROUP="render", MODE="0666"
    SUBSYSTEM=="accel", GROUP="render", MODE="0666"

Environment: udev 255.6-1 on Artix Linux.

Reported-by: @schrotthaufen
2024-06-15 15:58:33 +00:00
Dieter Plaetinck
0fb4753986
profiles: claws-mail: note no3d issue with "fancy" plugin (#6383)
Fixes #6377.
2024-06-14 18:04:10 +00:00
Dieter Plaetinck
7343429cb6 profiles: email-common: fix trailing whitespace
Added on commit 2453f0ecf ("email-common.profile: allow clamav plugin
for claws-mail", 2023-03-07) / PR #5719.
2024-06-14 14:12:02 -03:00
glitsj16
386ee003d2
docs: bug_report.md: use absolute path in 'steps to reproduce' (#6382)
We still see lots of issue reports where the user runs `firejail foo`
and ends up running foo's sandbox twice (due to firecfg's symlink
precedence). Try to improve the situation by explicitly using absolute
paths in the 'steps to reproduce' section.
2024-06-14 08:59:38 +00:00
glitsj16
4a91052a1f
profiles: hashcat: support newer configuration paths (#6376)
Relates to #6364.
2024-06-11 10:45:08 +00:00
Kelvin M. Klann
42bdb78800 RELNOTES: add many items
Relates to #6352 #6353 #6354 #6358 #6359 #6361 #6366 #6367 #6369.
2024-06-10 03:21:40 -03:00
Kelvin M. Klann
fa8e2f1415
Merge pull request #6366 from kmk3/build-standardize-install
build: standardize install commands
2024-06-10 06:07:04 +00:00
Shahriar Heidrich
630972d473
docs: add precedence info to manpage & fix noblacklist example (#6359)
Fixes #6358.
2024-06-10 06:06:15 +00:00
Shahriar Heidrich
533db20e99
profiles: blacklist i3 IPC socket & dir except for i3 itself (#6361)
This closes the escape route discussed in #6357.

It's left open for i3's own profile, so that people who run i3 itself
sandboxed still have the option to use IPC with it at all.

Reference for file paths:
https://i3wm.org/docs/userguide.html#_interprocess_communication
2024-06-08 08:52:17 +00:00
glitsj16
be548c2828
New profile: armcord (#6365)
Description: Standalone Discord client.

https://armcord.app/
https://github.com/NextWork123/ArmCord

Requested in https://github.com/netblue30/firejail/issues/1139#issuecomment-2140174880.
2024-06-06 19:26:38 +00:00
Ilya Pankratov
89820958eb
bugfix: profstats: fix restrict-namespaces max count (#6369)
Signed-off-by: Ilya Pankratov <i.pankratov.main@gmail.com>
2024-06-05 17:16:17 +00:00
Ilya Pankratov
03ea436e1c
bugfix: fix various resource leaks (#6367)
Fix memory and descriptor leaks.

Signed-off-by: Ilya Pankratov <i.pankratov.main@gmail.com>
2024-06-05 17:16:01 +00:00
Kelvin M. Klann
68d06a1359 build: sort/split some install commands
For increased consistency and readability.
2024-06-02 12:08:41 -03:00
Kelvin M. Klann
e30c57eebf build: use -t in applicable install commands
For increased consistency and readability.
2024-06-02 12:08:41 -03:00
Kelvin M. Klann
5430535a27 build: stop checking for dir existence on install
Just try to install them, as is done in the other `$(INSTALL) -d`
commands.
2024-06-02 12:08:41 -03:00
Kelvin M. Klann
afdb371f27 build: fix some inconsistencies in install commands
Changes:

* Remove / after `$(DESTDIR)`
* Remove useless -c
* Use 0755 instead of 755
* Use -d after -m

See also commit dae3933bc ("rework make realinstall and uninstall
(#3435)", 2020-06-04).
2024-06-02 12:08:41 -03:00
Kelvin M. Klann
6b35ed7997 build: remove redundant parent dir install
The command below already installs it.

Added on commit 926790411 ("add basic Firejail support to AppArmor base
abstraction (#3226)", 2021-10-21) / PR #4628.
2024-06-02 12:08:36 -03:00
Kelvin M. Klann
c633ba3ead build: line-break sh install commands
And remove the extraneous semicolon at the end of the command string.

See also commit dae3933bc ("rework make realinstall and uninstall
(#3435)", 2020-06-04).
2024-06-02 12:02:23 -03:00
dependabot[bot]
53ad8d7912 build(deps): bump step-security/harden-runner from 2.7.1 to 2.8.0
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.7.1 to 2.8.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](a4aa98b93c...f086349bfa)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-01 14:09:12 +00:00
dependabot[bot]
70519058ae build(deps): bump github/codeql-action from 3.25.5 to 3.25.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.5 to 3.25.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b7cec75265...f079b84933)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-01 14:09:03 +00:00
Kelvin M. Klann
abc6996cc5
Merge pull request #6354 from kmk3/build-tool-vars
build: allow overriding common tools
2024-05-29 21:27:50 +00:00
Kelvin M. Klann
fb11081bec build: allow overriding common tools
Tools:

* gzip
* install
* rm
* strip
* tar

For the programs not checked in configure.ac:

From the manual of GNU Autoconf (version 2.71):

> If you use `AC_PROG_INSTALL`, you must include `install-sh` in your
> distribution

So set `install` just in the Makefile.  Use `$(RM)` to ensure that `-f`
is always used and to make it easier to spot when `-r` is used.

See commit 93d623fdf ("build: allow overriding certain tools",
2024-02-23) / PR #6222.
2024-05-29 17:35:35 -03:00
glitsj16
e25596bfb7
profiles: libreoffice: support signing documents with GPG (#6353)
Based on the entries in etc/profile-m-z/makepkg.profile.

This fixes #6352.
2024-05-24 14:39:55 +00:00
Kelvin M. Klann
5e2f4c3662 build: define CC/GAWK if undefined
Just in case the value is not defined in config.mk and `make` is first
executed from another directory (such as in src/man) instead of the root
directory.

This amends commit 93d623fdf ("build: allow overriding certain tools",
2024-02-23) / PR #6222.
2024-05-24 10:10:41 -03:00
glitsj16
ea104190df
profiles: streamline Firefox URL opening support (#6348)
Changes:

* Improve Firefox D-Bus comment
* Add missing/standardize related comments
* Include allow-bin-sh.inc in relevant profiles
* Use Firefox URL open section in relevant profiles
2024-05-20 05:06:41 +00:00
glitsj16
02576d7e19
profiles: yelp: add Firefox URL open support (#6349) 2024-05-20 04:13:54 +00:00
Kelvin M. Klann
646a28d88c RELNOTES: add ci item
Relates to #6338.
2024-05-20 00:52:30 -03:00
Kelvin M. Klann
afcd16a57e RELNOTES: add build items
Relates to #6339 #6342 #6343.
2024-05-20 00:46:14 -03:00