aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-cache-tree.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-04-15 13:30:31 +0200
committerJohannes Schindelin <johannes.schindelin@gmx.de>2024-04-17 00:01:25 +0200
commitd1bb66a546b4bb46005d17ba711caaad26f26c1e (patch)
treecfa3c90be2598a17fbbe09fd3caadb9aee6aacbd /t/helper/test-cache-tree.c
parentbuiltin/clone: stop resolving symlinks when copying files (diff)
downloadgit-d1bb66a546b4bb46005d17ba711caaad26f26c1e.tar.gz
git-d1bb66a546b4bb46005d17ba711caaad26f26c1e.zip
builtin/clone: abort when hardlinked source and target file differ
When performing local clones with hardlinks we refuse to copy source files which are symlinks as a mitigation for CVE-2022-39253. This check can be raced by an adversary though by changing the file to a symlink after we have checked it. Fix the issue by checking whether the hardlinked destination file matches the source file and abort in case it doesn't. This addresses CVE-2024-32021. Reported-by: Apple Product Security <product-security@apple.com> Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 't/helper/test-cache-tree.c')
0 files changed, 0 insertions, 0 deletions