Skip to content

Commit

Permalink
disable-common.inc: read-only access to ~/.ssh/authorized_keys
Browse files Browse the repository at this point in the history
disable-common.inc blacklists whole .ssh, but some profiles (e.g. idea.sh)
unblacklists it to allow git over ssh with public key auth.

But this creates security hole, since firejailed app could modify
~/.ssh/authorized_keys and allow arbitrary code execution on the host with sshd
installed (e.g. ssh localhost and run any program) or even open backdoor for
remote attacker.

This commits disallows write access to ~/.ssh/authorized_keys even if .ssh was
unblacklisted.

Signed-off-by: Alexander GQ Gerasiov <[email protected]>
  • Loading branch information
Alexander GQ Gerasiov committed Dec 22, 2017
1 parent a51c369 commit b5542fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etc/disable-common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ read-only ${HOME}/.zshenv
read-only ${HOME}/.zshrc
read-only ${HOME}/.zshrc.local

# Remote access
read-only ${HOME}/.ssh/authorized_keys

# Initialization files that allow arbitrary command execution
read-only ${HOME}/.caffrc
read-only ${HOME}/.dotfiles
Expand Down

0 comments on commit b5542fc

Please sign in to comment.