aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2021-07-28 08:30:43 -0400
committerLibravatar netblue30 <netblue30@protonmail.com>2021-07-28 08:30:43 -0400
commite7f3c2acde1b4a0f2f99426d57a50c1928ae2c77 (patch)
treed192dd8a45efceea6e543bab70ab00c9867ce6ed
parentintrusion detection system (diff)
parentkodi.profile: Add Lutris Kodi Addon note (diff)
downloadfirejail-e7f3c2acde1b4a0f2f99426d57a50c1928ae2c77.tar.gz
firejail-e7f3c2acde1b4a0f2f99426d57a50c1928ae2c77.tar.zst
firejail-e7f3c2acde1b4a0f2f99426d57a50c1928ae2c77.zip
Merge branch 'master' of ssh://github.com/netblue30/firejail
-rw-r--r--RELNOTES3
-rw-r--r--etc/profile-a-l/chromium-common-hardened.inc.profile3
-rw-r--r--etc/profile-a-l/code.profile39
-rw-r--r--etc/profile-a-l/kodi.profile6
-rw-r--r--etc/profile-m-z/minitube.profile2
-rw-r--r--etc/templates/syscalls.txt30
-rwxr-xr-xsrc/tools/profcleaner.sh8
7 files changed, 50 insertions, 41 deletions
diff --git a/RELNOTES b/RELNOTES
index 49b88ac08..405888cc4 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -2,7 +2,8 @@ firejail (0.9.67) baseline; urgency=low
2 * work in progress 2 * work in progress
3 * deprecated --disable-whitelist at compile time 3 * deprecated --disable-whitelist at compile time
4 * deprecated whitelist=yes/no in /etc/firejail/firejail.config 4 * deprecated whitelist=yes/no in /etc/firejail/firejail.config
5 * new profiles: microsoft-edge-beta 5 * new profiles: microsoft-edge-beta, clion-eap, lifeograph, zim
6 * new profiles: io.github.lainsce.Notejot, rednotebook
6 -- netblue30 <netblue30@yahoo.com> Mon, 28 Jun 2021 09:00:00 -0500 7 -- netblue30 <netblue30@yahoo.com> Mon, 28 Jun 2021 09:00:00 -0500
7 8
8firejail (0.9.66) baseline; urgency=low 9firejail (0.9.66) baseline; urgency=low
diff --git a/etc/profile-a-l/chromium-common-hardened.inc.profile b/etc/profile-a-l/chromium-common-hardened.inc.profile
index 87a0a0994..19addd285 100644
--- a/etc/profile-a-l/chromium-common-hardened.inc.profile
+++ b/etc/profile-a-l/chromium-common-hardened.inc.profile
@@ -6,5 +6,4 @@ caps.drop all
6nonewprivs 6nonewprivs
7noroot 7noroot
8protocol unix,inet,inet6,netlink 8protocol unix,inet,inet6,netlink
9# kcmp is required for ozone-platform=wayland, see #3783. 9seccomp !chroot
10seccomp !chroot,!kcmp
diff --git a/etc/profile-a-l/code.profile b/etc/profile-a-l/code.profile
index e19b78908..fdf94ec41 100644
--- a/etc/profile-a-l/code.profile
+++ b/etc/profile-a-l/code.profile
@@ -5,6 +5,21 @@ include code.local
5# Persistent global definitions 5# Persistent global definitions
6include globals.local 6include globals.local
7 7
8# Disabled until someone reported positive feedback
9ignore include disable-devel.inc
10ignore include disable-exec.inc
11ignore include disable-interpreters.inc
12ignore include disable-xdg.inc
13ignore whitelist ${DOWNLOADS}
14ignore include whitelist-common.inc
15ignore include whitelist-runuser-common.inc
16ignore include whitelist-usr-share-common.inc
17ignore include whitelist-var-common.inc
18ignore apparmor
19ignore disable-mnt
20ignore dbus-user none
21ignore dbus-system none
22
8noblacklist ${HOME}/.config/Code 23noblacklist ${HOME}/.config/Code
9noblacklist ${HOME}/.config/Code - OSS 24noblacklist ${HOME}/.config/Code - OSS
10noblacklist ${HOME}/.vscode 25noblacklist ${HOME}/.vscode
@@ -13,31 +28,13 @@ noblacklist ${HOME}/.vscode-oss
13# Allows files commonly used by IDEs 28# Allows files commonly used by IDEs
14include allow-common-devel.inc 29include allow-common-devel.inc
15 30
16include disable-common.inc
17include disable-passwdmgr.inc
18include disable-programs.inc
19
20caps.drop all
21netfilter
22nodvd
23nogroups
24noinput
25nonewprivs
26noroot
27nosound 31nosound
28notv
29nou2f
30novideo
31protocol unix,inet,inet6,netlink
32seccomp
33shell none
34
35private-cache
36private-dev
37private-tmp
38 32
39# Disabling noexec ${HOME} for now since it will 33# Disabling noexec ${HOME} for now since it will
40# probably interfere with running some programmes 34# probably interfere with running some programmes
41# in VS Code 35# in VS Code
42# noexec ${HOME} 36# noexec ${HOME}
43noexec /tmp 37noexec /tmp
38
39# Redirect
40include electron.profile
diff --git a/etc/profile-a-l/kodi.profile b/etc/profile-a-l/kodi.profile
index b7091f1fc..f909728a5 100644
--- a/etc/profile-a-l/kodi.profile
+++ b/etc/profile-a-l/kodi.profile
@@ -12,6 +12,12 @@ ignore noexec ${HOME}
12#ignore nogroups 12#ignore nogroups
13#ignore noroot 13#ignore noroot
14#ignore private-dev 14#ignore private-dev
15# Add the following to your kodi.local if you use the Lutris Kodi Addon
16#noblacklist /sbin
17#noblacklist /usr/sbin
18#noblacklist ${HOME}/.cache/lutris
19#noblacklist ${HOME}/.config/lutris
20#noblacklist ${HOME}/.local/share/lutris
15 21
16noblacklist ${HOME}/.kodi 22noblacklist ${HOME}/.kodi
17noblacklist ${MUSIC} 23noblacklist ${MUSIC}
diff --git a/etc/profile-m-z/minitube.profile b/etc/profile-m-z/minitube.profile
index 3fe3428d0..b8a551b6c 100644
--- a/etc/profile-m-z/minitube.profile
+++ b/etc/profile-m-z/minitube.profile
@@ -47,7 +47,7 @@ notv
47nou2f 47nou2f
48novideo 48novideo
49protocol unix,inet,inet6,netlink 49protocol unix,inet,inet6,netlink
50seccomp !kcmp 50seccomp
51shell none 51shell none
52tracelog 52tracelog
53 53
diff --git a/etc/templates/syscalls.txt b/etc/templates/syscalls.txt
index 3992c984a..38f789923 100644
--- a/etc/templates/syscalls.txt
+++ b/etc/templates/syscalls.txt
@@ -89,18 +89,24 @@ Inheritance of groups
89What to do if seccomp breaks a program 89What to do if seccomp breaks a program
90-------------------------------------- 90--------------------------------------
91 91
92Start `journalctl --grep=SECCOMP --follow` in a terminal and run
93`firejail --seccomp-error-action=log /path/to/program` in a second terminal.
94Now switch back to the first terminal (where `journalctl` is running) and look
95for the numbers of the blocked syscall(s) (`syscall=<NUMBER>`). As soon as you
96have found them, you can stop `journalctl` (^C) and execute
97`firejail --debug-syscalls | grep NUMBER` to get the name of the syscall.
98In the particular case that it is a 32bit syscall on a 64bit system, use `ausyscall i386 NUMBER`.
99Now you can add a seccomp exception using `seccomp !NAME`.
100
101If the blocked syscall is ptrace, consider to add allow-debuggers to the profile.
102
92``` 103```
93$ journalctl --grep=syscall --follow 104term1$ journalctl --grep=SECCOMP --follow
94<...> audit[…]: SECCOMP <...> syscall=161 <...> 105term2$ firejail --seccomp-error-action=log /usr/bin/signal-desktop
95$ firejail --debug-syscalls | grep 161 106term1$ (journalctl --grep=SECCOMP --follow)
96161 - chroot 107audit[1234]: SECCOMP ... comm="signal-desktop" exe="/usr/bin/signal-desktop" sig=31 arch=c000003e syscall=161 ...
108^C
109term1$ firejail --debug-syscalls | grep "^161[[:space:]]"
110161 - chroot
97``` 111```
98Profile: `seccomp -> seccomp !chroot` 112Profile: `seccomp -> seccomp !chroot`
99
100Start `journalctl --grep=syscall --follow` in a terminal, then start the broken
101program. Now you see one or more long lines containing `syscall=NUMBER` somewhere.
102Stop journalctl (^C) and execute `firejail --debug-syscalls | grep NUMBER`. You
103will see something like `NUMBER - NAME`, because you now know the name of the
104syscall, you can add an exception to seccomp by putting `!NAME` to seccomp.
105
106If the blocked syscall is ptrace, consider to add allow-debuggers to the profile.
diff --git a/src/tools/profcleaner.sh b/src/tools/profcleaner.sh
index 709008e08..96402aed6 100755
--- a/src/tools/profcleaner.sh
+++ b/src/tools/profcleaner.sh
@@ -38,8 +38,8 @@ else
38fi 38fi
39 39
40sed -i -E \ 40sed -i -E \
41 -e "s/^(# |#)?blacklist/\1deny/" \ 41 -e "s/^(# |#)?(ignore )?blacklist/\1\2deny/" \
42 -e "s/^(# |#)?noblacklist/\1nodeny/" \ 42 -e "s/^(# |#)?(ignore )?noblacklist/\1\2nodeny/" \
43 -e "s/^(# |#)?whitelist/\1allow/" \ 43 -e "s/^(# |#)?(ignore )?whitelist/\1\2allow/" \
44 -e "s/^(# |#)?nowhitelist/\1noallow/" \ 44 -e "s/^(# |#)?(ignore )?nowhitelist/\1\2noallow/" \
45 "${profiles[@]}" 45 "${profiles[@]}"