aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kris7topher@gmail.com>2020-03-26 01:28:57 +0100
committerLibravatar Kristóf Marussy <kris7topher@gmail.com>2020-04-06 21:26:41 +0200
commit90facc19c2708b60eb81a2a29993a3f16596bab6 (patch)
treeef3da7dbfc720b266b1a2ce2b31ceae7cc72ab1a /src/include
parentxdg-dbus-proxy hardening (diff)
downloadfirejail-90facc19c2708b60eb81a2a29993a3f16596bab6.tar.gz
firejail-90facc19c2708b60eb81a2a29993a3f16596bab6.tar.zst
firejail-90facc19c2708b60eb81a2a29993a3f16596bab6.zip
xdg-dbus-proxy socket finding and mount hardening
To avoid race conditions, the proxy sockets from /run/firejail/dbus/ are bind-mounted to /run/firejail/mnt/dbus/, which is controlled by root. Instead of relying on the default locations of the DBus sockets, the environment variables DBUS_SESSION_BUS_ADDRESS and DBUS_SYSTEM_BUS_ADDRESS are set accordingly. User sockets are tried in the following order when starting the proxy: * DBUS_SESSION_BUS_ADDRES * /run/user/<pid>/bus * /run/user/<pid>/dbus/user_bus_socket These are all blocked (including DBUS_SESSION_BUS_ADDRESS if it points at a socket in the filesystem) when the filtering or blocking policy is active. System sockets are tried in the following order: * DBUS_SYSTEM_BUS_ADDRESS * /run/dbus/system_bus_socket These are all blocked (including DBUS_SYSTEM_BUS_ADDRESS if it points at a socket in the filesystem) when the filtering or blocking policy is active.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/rundefs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/rundefs.h b/src/include/rundefs.h
index 528d9e901..f8bcdec52 100644
--- a/src/include/rundefs.h
+++ b/src/include/rundefs.h
@@ -57,6 +57,9 @@
57#define RUN_DHCLIENT_4_LEASES_FILE RUN_DHCLIENT_DIR "/dhclient.leases" 57#define RUN_DHCLIENT_4_LEASES_FILE RUN_DHCLIENT_DIR "/dhclient.leases"
58#define RUN_DHCLIENT_4_PID_FILE RUN_DHCLIENT_DIR "/dhclient.pid" 58#define RUN_DHCLIENT_4_PID_FILE RUN_DHCLIENT_DIR "/dhclient.pid"
59#define RUN_DHCLIENT_6_PID_FILE RUN_DHCLIENT_DIR "/dhclient6.pid" 59#define RUN_DHCLIENT_6_PID_FILE RUN_DHCLIENT_DIR "/dhclient6.pid"
60#define RUN_DBUS_DIR RUN_MNT_DIR "/dbus"
61#define RUN_DBUS_USER_SOCKET RUN_DBUS_DIR "/user"
62#define RUN_DBUS_SYSTEM_SOCKET RUN_DBUS_DIR "/system"
60 63
61#define RUN_SECCOMP_DIR RUN_MNT_DIR "/seccomp" 64#define RUN_SECCOMP_DIR RUN_MNT_DIR "/seccomp"
62#define RUN_SECCOMP_LIST RUN_SECCOMP_DIR "/seccomp.list" // list of seccomp files installed 65#define RUN_SECCOMP_LIST RUN_SECCOMP_DIR "/seccomp.list" // list of seccomp files installed