summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.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 /builtin/commit-graph.c
parent150e6b0aedf57d224c3c49038c306477fa159886 (diff)
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 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions