Skip to content

Commit 1562897

Browse files
committed
Sync with 2.38.5
* maint-2.38: (32 commits) Git 2.38.5 Git 2.37.7 Git 2.36.6 Git 2.35.8 Git 2.34.8 Git 2.33.8 Git 2.32.7 Git 2.31.8 tests: avoid using `test_i18ncmp` Git 2.30.9 gettext: avoid using gettext if the locale dir is not present apply --reject: overwrite existing `.rej` symlink if it exists http.c: clear the 'finished' member once we are done with it clone.c: avoid "exceeds maximum object size" error with GCC v12.x range-diff: use ssize_t for parsed "len" in read_patches() range-diff: handle unterminated lines in read_patches() range-diff: drop useless "offset" variable from read_patches() t5604: GETTEXT_POISON fix, conclusion t5604: GETTEXT_POISON fix, part 1 t5619: GETTEXT_POISON fix t0003: GETTEXT_POISON fix, conclusion ...
2 parents 768bb23 + ec58344 commit 1562897

File tree

15 files changed

+191
-13
lines changed

15 files changed

+191
-13
lines changed

Documentation/RelNotes/2.30.9.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Git v2.30.9 Release Notes
2+
=========================
3+
4+
This release addresses the security issues CVE-2023-25652,
5+
CVE-2023-25815, and CVE-2023-29007.
6+
7+
8+
Fixes since v2.30.8
9+
-------------------
10+
11+
* CVE-2023-25652:
12+
13+
By feeding specially crafted input to `git apply --reject`, a
14+
path outside the working tree can be overwritten with partially
15+
controlled contents (corresponding to the rejected hunk(s) from
16+
the given patch).
17+
18+
* CVE-2023-25815:
19+
20+
When Git is compiled with runtime prefix support and runs without
21+
translated messages, it still used the gettext machinery to
22+
display messages, which subsequently potentially looked for
23+
translated messages in unexpected places. This allowed for
24+
malicious placement of crafted messages.
25+
26+
* CVE-2023-29007:
27+
28+
When renaming or deleting a section from a configuration file,
29+
certain malicious configuration values may be misinterpreted as
30+
the beginning of a new configuration section, leading to arbitrary
31+
configuration injection.
32+
33+
Credit for finding CVE-2023-25652 goes to Ry0taK, and the fix was
34+
developed by Taylor Blau, Junio C Hamano and Johannes Schindelin,
35+
with the help of Linus Torvalds.
36+
37+
Credit for finding CVE-2023-25815 goes to Maxime Escourbiac and
38+
Yassine BENGANA of Michelin, and the fix was developed by Johannes
39+
Schindelin.
40+
41+
Credit for finding CVE-2023-29007 goes to André Baptista and Vítor Pinho
42+
of Ethiack, and the fix was developed by Taylor Blau, and Johannes
43+
Schindelin, with help from Jeff King, and Patrick Steinhardt.

Documentation/RelNotes/2.31.8.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Git v2.31.8 Release Notes
2+
=========================
3+
4+
This release merges the fixes that appear in v2.30.9 to address the
5+
security issues CVE-2023-25652, CVE-2023-25815, and CVE-2023-29007;
6+
see the release notes for that version for details.

Documentation/RelNotes/2.32.7.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.32.7 Release Notes
2+
=========================
3+
4+
This release merges the fixes that appear in v2.30.9 and v2.31.8 to
5+
address the security issues CVE-2023-25652, CVE-2023-25815, and
6+
CVE-2023-29007; see the release notes for these versions for
7+
details.

Documentation/RelNotes/2.33.8.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.33.8 Release Notes
2+
=========================
3+
4+
This release merges the fixes that appear in v2.30.9, v2.31.8 and
5+
v2.32.7 to address the security issues CVE-2023-25652,
6+
CVE-2023-25815, and CVE-2023-29007; see the release notes for these
7+
versions for details.

Documentation/RelNotes/2.34.8.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.34.8 Release Notes
2+
=========================
3+
4+
This release merges the fixes that appear in v2.30.9, v2.31.8,
5+
v2.32.7 and v2.33.8 to address the security issues CVE-2023-25652,
6+
CVE-2023-25815, and CVE-2023-29007; see the release notes for these
7+
versions for details.

Documentation/RelNotes/2.35.8.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.35.8 Release Notes
2+
=========================
3+
4+
This release merges the fixes that appear in v2.30.9, v2.31.8,
5+
v2.32.7, v2.33.8 and v2.34.8 to address the security issues
6+
CVE-2023-25652, CVE-2023-25815, and CVE-2023-29007; see the release
7+
notes for these versions for details.

Documentation/RelNotes/2.36.6.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.36.6 Release Notes
2+
=========================
3+
4+
This release merges the fixes that appear in v2.30.9, v2.31.8,
5+
v2.32.7, v2.33.8, v2.34.8 and v2.35.8 to address the security issues
6+
CVE-2023-25652, CVS-2023-25815, and CVE-2023-29007; see the release
7+
notes for these versions for details.

Documentation/RelNotes/2.37.7.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Git v2.37.7 Release Notes
2+
=========================
3+
4+
This release merges up the fix that appears in v2.30.9, v2.31.8,
5+
v2.32.7, v2.33.8, v2.34.8, v2.35.8 and v2.36.6 to address the
6+
security issues CVE-2023-25652, CVE-2023-25815, and CVE-2023-29007;
7+
see the release notes for these versions for details.

Documentation/RelNotes/2.38.5.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Git v2.38.5 Release Notes
2+
=========================
3+
4+
This release merges up the fix that appears in v2.30.9, v2.31.8,
5+
v2.32.7, v2.33.8, v2.34.8, v2.35.8, v2.36.6 and v2.37.7 to address
6+
the security issues CVE-2023-25652, CVE-2023-25815, and
7+
CVE-2023-29007; see the release notes for these versions for
8+
details.

apply.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4576,7 +4576,7 @@ static int write_out_one_reject(struct apply_state *state, struct patch *patch)
45764576
FILE *rej;
45774577
char namebuf[PATH_MAX];
45784578
struct fragment *frag;
4579-
int cnt = 0;
4579+
int fd, cnt = 0;
45804580
struct strbuf sb = STRBUF_INIT;
45814581

45824582
for (cnt = 0, frag = patch->fragments; frag; frag = frag->next) {
@@ -4616,7 +4616,17 @@ static int write_out_one_reject(struct apply_state *state, struct patch *patch)
46164616
memcpy(namebuf, patch->new_name, cnt);
46174617
memcpy(namebuf + cnt, ".rej", 5);
46184618

4619-
rej = fopen(namebuf, "w");
4619+
fd = open(namebuf, O_CREAT | O_EXCL | O_WRONLY, 0666);
4620+
if (fd < 0) {
4621+
if (errno != EEXIST)
4622+
return error_errno(_("cannot open %s"), namebuf);
4623+
if (unlink(namebuf))
4624+
return error_errno(_("cannot unlink '%s'"), namebuf);
4625+
fd = open(namebuf, O_CREAT | O_EXCL | O_WRONLY, 0666);
4626+
if (fd < 0)
4627+
return error_errno(_("cannot open %s"), namebuf);
4628+
}
4629+
rej = fdopen(fd, "w");
46204630
if (!rej)
46214631
return error_errno(_("cannot open %s"), namebuf);
46224632

0 commit comments

Comments
 (0)