Skip to content

Commit 92ac04b

Browse files
committed
Sync with 2.23.4
* maint-2.23: Git 2.23.4 Git 2.22.5 Git 2.21.4 Git 2.20.5 Git 2.19.6 Git 2.18.5 Git 2.17.6 unpack_trees(): start with a fresh lstat cache run-command: invalidate lstat cache after a command finished checkout: fix bug that makes checkout follow symlinks in leading path
2 parents b86a4be + d60b6a9 commit 92ac04b

16 files changed

+242
-4
lines changed

Documentation/RelNotes/2.17.6.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Git v2.17.6 Release Notes
2+
=========================
3+
4+
This release addresses the security issues CVE-2021-21300.
5+
6+
Fixes since v2.17.5
7+
-------------------
8+
9+
* CVE-2021-21300:
10+
On case-insensitive file systems with support for symbolic links,
11+
if Git is configured globally to apply delay-capable clean/smudge
12+
filters (such as Git LFS), Git could be fooled into running
13+
remote code during a clone.
14+
15+
Credit for finding and fixing this vulnerability goes to Matheus
16+
Tavares, helped by Johannes Schindelin.

Documentation/RelNotes/2.18.5.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Git v2.18.5 Release Notes
2+
=========================
3+
4+
This release merges up the fixes that appear in v2.17.6 to address
5+
the security issue CVE-2021-21300; see the release notes for that
6+
version for details.

Documentation/RelNotes/2.19.6.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Git v2.19.6 Release Notes
2+
=========================
3+
4+
This release merges up the fixes that appear in v2.17.6 and
5+
v2.18.5 to address the security issue CVE-2021-21300; see the
6+
release notes for these versions for details.

Documentation/RelNotes/2.20.5.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Git v2.20.5 Release Notes
2+
=========================
3+
4+
This release merges up the fixes that appear in v2.17.6, v2.18.5
5+
and v2.19.6 to address the security issue CVE-2021-21300; see
6+
the release notes for these versions for details.

Documentation/RelNotes/2.21.4.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Git v2.21.4 Release Notes
2+
=========================
3+
4+
This release merges up the fixes that appear in v2.17.6, v2.18.5,
5+
v2.19.6 and v2.20.5 to address the security issue CVE-2021-21300;
6+
see the release notes for these versions for details.

Documentation/RelNotes/2.22.5.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.22.5 Release Notes
2+
=========================
3+
4+
This release merges up the fixes that appear in v2.17.6,
5+
v2.18.5, v2.19.6, v2.20.5 and v2.21.4 to address the security
6+
issue CVE-2021-21300; see the release notes for these versions
7+
for details.

Documentation/RelNotes/2.23.4.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.23.4 Release Notes
2+
=========================
3+
4+
This release merges up the fixes that appear in v2.17.6, v2.18.5,
5+
v2.19.6, v2.20.5, v2.21.4 and v2.22.5 to address the security
6+
issue CVE-2021-21300; see the release notes for these versions
7+
for details.

cache.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,7 @@ int has_symlink_leading_path(const char *name, int len);
16751675
int threaded_has_symlink_leading_path(struct cache_def *, const char *, int);
16761676
int check_leading_path(const char *name, int len);
16771677
int has_dirs_only_path(const char *name, int len, int prefix_len);
1678+
void invalidate_lstat_cache(void);
16781679
void schedule_dir_for_removal(const char *name, int len);
16791680
void remove_scheduled_dirs(void);
16801681

compat/mingw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ int mingw_rmdir(const char *pathname)
340340
ask_yes_no_if_possible("Deletion of directory '%s' failed. "
341341
"Should I try again?", pathname))
342342
ret = _wrmdir(wpathname);
343+
if (!ret)
344+
invalidate_lstat_cache();
343345
return ret;
344346
}
345347

git-compat-util.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,11 @@ static inline int noop_core_config(const char *var, const char *value, void *cb)
365365
#define platform_core_config noop_core_config
366366
#endif
367367

368+
int lstat_cache_aware_rmdir(const char *path);
369+
#if !defined(__MINGW32__) && !defined(_MSC_VER)
370+
#define rmdir lstat_cache_aware_rmdir
371+
#endif
372+
368373
#ifndef has_dos_drive_prefix
369374
static inline int git_has_dos_drive_prefix(const char *path)
370375
{

0 commit comments

Comments
 (0)