HomePhabricator

subrepo: extend path auditing test to include more weird patterns (SEC)

Authored by yuja.

Description

subrepo: extend path auditing test to include more weird patterns (SEC)

While reviewing patches for the issue 5739, "$foo in repository path
expanded", I realized that subrepo paths can also be cheated. This patch
includes various subrepo paths which are potentially unsafe.

Since an expanded subrepo path isn't audited, this bug allows symlink check
bypass. As a result, a malicious subrepository could be checked out to a
sub tree of e.g. $HOME directory. The good news is that the destination
directory must be empty or nonexistent, so the existing ~/.bashrc wouldn't
be overwritten. See the last part of the tests for details.

Details

Committed
yujaJan 8 2019, 7:51 AM
Parents
rHG8427fea04017: copyright: update to 2019
Branches
Unknown
Tags
Unknown