Commit graph

10129 commits

Author SHA1 Message Date
netblue30
80aaa8c806
Merge pull request #6498 from corsac-s/patch-1
profiles: signal-desktop - Add access to D-Bus freedesktop.org secret API
2024-10-01 10:46:22 -04: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
Kelvin M. Klann
0e7296bef3 RELNOTES: add build item
Added on commit ba00d135f ("fix for old compilers", 2023-04-06).

Relates to #5778.
2024-09-28 10:15:35 -03:00
Kelvin M. Klann
fd915d6c8f RELNOTES: add profile items
Relates to #5337 #5447 #5902 #6391 #6486.
2024-09-28 10:00:50 -03: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
92f4820256
Merge pull request #6486 from kmk3/browsers-improve-comments
profiles: browsers: centralize/sync/improve comments
2024-09-28 12:26:43 +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
1b2d18e7f4 RELNOTES: add profile items
Relates to #5816 #5877 #6002 #6477 #6478 #6479.
2024-09-19 11:40:16 -03:00
Kelvin M. Klann
bd8ed0b4ea
profiles: firecfg: disable text editors (#6477)
Disable common general-purpose text editors.

They are likely to be the default OS text editor and users may want to
use them for editing most/all files, which could include common
sensitive files such as ~/.bashrc and profiles in ~/.config/firejail.

Fixes #6002.

Relates to #924 #941 #1154.

Reported-by: @ilikenwf
2024-09-19 14:37:11 +00:00
Kelvin M. Klann
f833a492cd tests: partially disable private-home.exp to fix ci
This test started failing today with "TESTING ERROR 3".

Log from a CI re-run of test-fs on commit 897f12dd8 ("build(deps): bump
step-security/harden-runner from 2.9.0 to 2.9.1", 2024-09-01) /
PR #6455[1]:

    2024-09-19T13:39:04.5681290Z TESTING: private home (test/fs/private-home.exp)
    2024-09-19T13:39:04.5713434Z spawn /bin/bash
    2024-09-19T13:39:05.2772248Z touch ~/_firejail_test_file1
    2024-09-19T13:39:05.2773779Z runner@fv-az1247-944:~/work/firejail/firejail/test/fs$
    2024-09-19T13:39:05.2774475Z <jail/firejail/test/fs$ touch ~/_firejail_test_file1
    2024-09-19T13:39:05.2775175Z runner@fv-az1247-944:~/work/firejail/firejail/test/fs$
    2024-09-19T13:39:05.2776506Z <jail/firejail/test/fs$ touch ~/_firejail_test_file2
    2024-09-19T13:39:05.2777841Z runner@fv-az1247-944:~/work/firejail/firejail/test/fs$
    2024-09-19T13:39:05.2778918Z <ejail/firejail/test/fs$ mkdir ~/_firejail_test_dir1
    2024-09-19T13:39:05.2780080Z runner@fv-az1247-944:~/work/firejail/firejail/test/fs$
    2024-09-19T13:39:05.2780903Z <fs$ mkdir ~/_firejail_test_dir1/_firejail_test_dir2
    2024-09-19T13:39:05.2781613Z runner@fv-az1247-944:~/work/firejail/firejail/test/fs$
    2024-09-19T13:39:05.2782461Z <_test_dir1/_firejail_test_dir2/_firejail_test_file3
    2024-09-19T13:39:05.2783224Z runner@fv-az1247-944:~/work/firejail/firejail/test/fs$
    2024-09-19T13:39:05.2784047Z <firejail/test/fs$ ln -s /etc ~/_firejail_test_link1
    2024-09-19T13:39:05.2784851Z runner@fv-az1247-944:~/work/firejail/firejail/test/fs$
    2024-09-19T13:39:05.2785861Z < ln -s ~/_firejail_test_dir1 ~/_firejail_test_link2
    2024-09-19T13:39:05.2787008Z runner@fv-az1247-944:~/work/firejail/firejail/test/fs$
    2024-09-19T13:39:05.2788303Z <test_file1,_firejail_test_file2,_firejail_test_dir1
    [...]
    2024-09-19T13:39:05.4971716Z runner@fv-az1247-944:~$ find ~
    2024-09-19T13:39:05.4989255Z /home/runner
    2024-09-19T13:39:05.4990116Z /home/runner/_firejail_test_file1
    2024-09-19T13:39:05.4990768Z /home/runner/_firejail_test_file2
    2024-09-19T13:39:05.4991299Z /home/runner/_firejail_test_dir1
    2024-09-19T13:39:05.4992082Z /home/runner/_firejail_test_dir1/_firejail_test_dir2
    2024-09-19T13:39:05.4992760Z /home/runner/_firejail_test_dir1/_firejail_test_dir2/_firejail_test_file3
    [...]
    2024-09-19T13:39:15.4995765Z runner@fv-az1247-944:~$ TESTING ERROR 3
    2024-09-19T13:39:15.5000367Z

Misc: This was noticed on #6477.

[1] https://github.com/netblue30/firejail/actions/runs/10655583953/job/30378507249
2024-09-19 10:54:41 -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
009110a971 RELNOTES: improve removal items
Reword and add commit references.

Related commits:

* 0e48f9933 ("remove firemon --interface option - it is a duplication of
  firejail --net.print", 2023-03-08)
* db09546f2 ("remove LTS and FIRETUNNEL support", 2023-12-23)
2024-09-13 07:51:00 -03:00
Kelvin M. Klann
3acf9be6d0 RELNOTES: change modif item to removal
Added on commit 0e48f9933 ("remove firemon --interface option - it is a
duplication of firejail --net.print", 2023-03-08).
2024-09-13 07:44:13 -03:00
Kelvin M. Klann
0e5ec2ce46 RELNOTES: add docs and profile items
Relates to #6413 #6451 #6471 #6472 #6473 #6474.
2024-09-13 06:00:56 -03: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
Kelvin M. Klann
508394fbd8 docs: github: improve kernel headers item in build_issue.md
Relates to #6423 #6471.
2024-09-13 05:16:11 -03:00
Kelvin M. Klann
9bccccfa77
docs: github: streamline environment in issue templates (#6471)
Changes:

* Sync bug_report.md with build_issue.md (reword items and add Linux
  kernel item)
* Add a colon to the end of every item (to clarify where to add the
  information)
* Add the Environment section to feature_request.md

The last item is intended as a basic sanity check, as users using an
outdated version of firejail may request something that was already
implemented (for example, see #6461).

Relates to #4515 #6423.
2024-09-13 08:16:09 +00:00
Kelvin M. Klann
ef5ca496c6
docs: man: fix wrong escapes (#6474)
Remove extranous escape characters and fix bold escaping.

Command used to check for unusual escape sequences:

    $ git grep -E -e '\\f[^BR]' -e '\\[^ "\f-]' -- src/man/*.in

With this, the only escape sequences used are:

    $ git grep -E -ho -e '\\-' -e '\\[^-][^ ]?' -- src/man/*.in |
      LC_ALL=C sort | uniq -c
          9 \"
          1 \&.
       1194 \-
         23 \\
        507 \fB
        127 \fR

Related commits:

* 137985136 ("Baseline firejail 0.9.28", 2015-08-08)
* 1684c9ea7 ("Fixes for man firejail (#2628)", 2019-03-29)
* 73525015e ("Clarify that file globbing occurs only at start",
  2020-04-11) / PR #3347
* f54ee53b1 ("man text for --include command", 2021-03-05).

This is a follow-up to #6472.

Kind of relates to #5903.
2024-09-13 07:10:16 +00:00
Kelvin M. Klann
b3d693063a
docs: man: fix bold in command TPs (#6472)
Reset the bold right after each command/argument.

Command used to check for issues:

    git grep -E ' \\fR' -- src/man/*.in

Related commits:

* e91b9ff0f ("Deprecate --nodbus option", 2020-04-07) /
  PR #3265
* 5a612029b ("rename noautopulse to keep-config-pulse", 2021-05-13) /
  PR #4278
* d79547ca9 ("docs: warn about limitations of landlock", 2024-03-31) /
  PR #6302

This is a follow-up to #6451.

Relates to #6078.
2024-09-12 05:21:12 +00:00
glitsj16
780aea342a
docs: man: sort commands (firejail.1) (#6451)
Sort commands in firejail.1.in and sync the result with
firejail-profile.5.in.

* Commands: `--dbus-system.*`, `--dbus-user.*`, `--icmptrace`,
  `--ip=none`, `memory-deny-write-execute`, `--noinput`

Relates to #3190 #3406 #4209.
2024-09-10 11:03:23 +00:00
Kelvin M. Klann
05d7aaadc8 docs: man: sort FILE section (firecfg.1)
Move the "FILES" section to right before the "LICENSE" section in
firecfg.1.in, to match what is done in the other man pages.

This amends commit ef6cfb8a2 ("firecfg: add ignore command and docs",
2023-06-29) / PR #5876.

Relates to #6451.
2024-09-10 07:50:26 -03:00
glitsj16
4268a3130b docs: man: sort NAME VALIDATION section (firejail.1)
This amends commit 6489138a5 ("docs: document NAME VALIDATION in
firejail.txt", 2023-06-13) / PR #5856.

Relates to #6451.
2024-09-10 07:44:57 -03:00
glitsj16
a04bf5ae8d docs: man: sort LANDLOCK section (firejail.1)
Added on commit 13b2c566d ("feature: add Landlock support", 2023-10-24)
/ PR #6078.

Relates to #6451.
2024-09-10 07:44:52 -03:00
dependabot[bot]
897f12dd88 build(deps): bump step-security/harden-runner from 2.9.0 to 2.9.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.9.0 to 2.9.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](0d381219dd...5c7944e73c)

---
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-09-01 16:21:50 +00:00
dependabot[bot]
00fe9ce335 build(deps): bump github/codeql-action from 3.25.15 to 3.26.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.15 to 3.26.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](afb54ba388...4dd16135b6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-01 16:21:39 +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
4465df5dc3 RELNOTES: improve and merge build items (seccomp filters/man pages)
Related commits:

* 9e206b7f2 ("rework src/man Makefile", 2023-07-07)
* 2b34747db ("generate seccomp filters at install time", 2023-07-07)
* 1d5fff903 ("Makefile fix", 2023-07-10)
* 6fa19aab9 ("feature: use seccomp filters build at install time for
  --restrict-namespaces", 2023-07-12)
* a6172b725 ("build: remove extraneous blank lines in makefiles",
  2023-07-12)
* 80eb28483 ("build: restore seccomp filter targets", 2023-07-13) /
  PR #5898
* 76bd5ad0f ("build: simplify code related to man pages", 2023-07-12) /
  PR #5898
* 8e79f18cf ("build: add missing makefile dep", 2023-08-12) /
  PR #5956

Note: The issue with seccomp filters specifically was fixed on commit
80eb28483 ("build: restore seccomp filter targets", 2023-07-13) /
PR #5898.

Relates to #5156 #5898 #5956.
2024-08-24 06:17:47 -03: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
Kelvin M. Klann
16eefd9db8 RELNOTES: add feature and docs items
Relates to #6423 #6425 #6426 #6431.
2024-08-11 08:13:11 -03: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
Kelvin M. Klann
7299f832fb
docs: add build_issue.md issue template (#6423)
Based on `.github/ISSUE_TEMPLATE/bug_report.md`.

Relates to #6417.
2024-08-07 16:24:09 +00:00
glitsj16
5d68062f12
feature: fshaper.sh: support tc on NixOS (#6431)
Fixes #6426.
2024-08-07 02:56:46 +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
dependabot[bot]
7031de4f54 build(deps): bump step-security/harden-runner from 2.8.1 to 2.9.0
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.8.1 to 2.9.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](17d0e2bd7d...0d381219dd)

---
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-08-05 08:40:08 +00:00
dependabot[bot]
a9491c16a8 build(deps): bump github/codeql-action from 3.25.11 to 3.25.15
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b611370bb5...afb54ba388)

---
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-08-05 08:39:51 +00:00
glitsj16
886fb7d00d
docs: man: improve blacklist/whitelist examples with spaces (#6425)
Use the same examples with spaces and make the quotes more consistent
with the other examples.
2024-07-30 18:22:59 +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