]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
remote: guard against symlinks in earlier path components
authorSimon Ruderich <simon@ruderich.org>
Tue, 1 Jun 2021 05:59:59 +0000 (07:59 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 1 Jun 2021 05:59:59 +0000 (07:59 +0200)
This was only an issue when syncing files to directories where other
users have write access to the parent directory. For example when
copying files to /home/user/.ssh/authorized_keys the user could replace
.ssh with a symlink which permitted overwriting authorized_keys anywhere
on the system.

Fix possible attacks by using *at syscalls and disallowing symlinks in
all path components except for the last of synced paths. Syncing
symlinks is obviously still permitted.


No differences found