Skip to content

Commit

Permalink
profiles: blacklist i3 IPC socket & dir except for i3 itself (#6361)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
smheidrich authored Jun 8, 2024
1 parent be548c2 commit 533db20
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions etc/inc/disable-common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ blacklist ${RUNUSER}/gnome-session-leader-fifo
blacklist ${RUNUSER}/gnome-shell
blacklist ${RUNUSER}/gsconnect

# i3 IPC socket (allows arbitrary shell script execution)
blacklist ${RUNUSER}/i3/ipc-socket.*
blacklist /tmp/i3-*/ipc-socket.*

# systemd
blacklist ${HOME}/.config/systemd
blacklist ${HOME}/.local/share/systemd
Expand Down
2 changes: 2 additions & 0 deletions etc/inc/disable-programs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1251,11 +1251,13 @@ blacklist ${HOME}/yt-dlp.conf
blacklist ${HOME}/yt-dlp.conf.txt
blacklist ${RUNUSER}/*firefox*
blacklist ${RUNUSER}/akonadi
blacklist ${RUNUSER}/i3
blacklist ${RUNUSER}/psd/*firefox*
blacklist ${RUNUSER}/qutebrowser
blacklist /etc/ssmtp
blacklist /tmp/.wine-*
blacklist /tmp/akonadi-*
blacklist /tmp/i3-*
blacklist /tmp/lwjgl_*
blacklist /var/games/nethack
blacklist /var/games/slashem
Expand Down
4 changes: 4 additions & 0 deletions etc/profile-a-l/i3.profile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ include globals.local

# all applications started in i3 will run in this profile
noblacklist ${HOME}/.config/i3
noblacklist ${RUNUSER}/i3
noblacklist ${RUNUSER}/i3/ipc-socket.*
noblacklist /tmp/i3-*
noblacklist /tmp/i3-*/ipc-socket.*
include disable-common.inc

caps.drop all
Expand Down

0 comments on commit 533db20

Please sign in to comment.