Skip to content

Commit 8cd052e

Browse files
committed
Sync with 2.34.8
* maint-2.34: (28 commits) 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 t0003: GETTEXT_POISON fix, part 1 t0033: GETTEXT_POISON fix http: support CURLOPT_PROTOCOLS_STR http: prefer CURLOPT_SEEKFUNCTION to CURLOPT_IOCTLFUNCTION ...
2 parents 8453685 + abcb63f commit 8cd052e

File tree

19 files changed

+221
-35
lines changed

19 files changed

+221
-35
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,12 @@ jobs:
232232
- jobname: linux-gcc
233233
cc: gcc
234234
cc_package: gcc-8
235-
pool: ubuntu-latest
235+
pool: ubuntu-20.04
236236
- jobname: linux-TEST-vars
237237
cc: gcc
238238
os: ubuntu
239239
cc_package: gcc-8
240-
pool: ubuntu-latest
240+
pool: ubuntu-20.04
241241
- jobname: osx-clang
242242
cc: clang
243243
pool: macos-latest
@@ -305,7 +305,7 @@ jobs:
305305
if: needs.ci-config.outputs.enabled == 'yes'
306306
env:
307307
jobname: StaticAnalysis
308-
runs-on: ubuntu-18.04
308+
runs-on: ubuntu-22.04
309309
steps:
310310
- uses: actions/checkout@v2
311311
- run: ci/install-dependencies.sh

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.

apply.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4584,7 +4584,7 @@ static int write_out_one_reject(struct apply_state *state, struct patch *patch)
45844584
FILE *rej;
45854585
char namebuf[PATH_MAX];
45864586
struct fragment *frag;
4587-
int cnt = 0;
4587+
int fd, cnt = 0;
45884588
struct strbuf sb = STRBUF_INIT;
45894589

45904590
for (cnt = 0, frag = patch->fragments; frag; frag = frag->next) {
@@ -4624,7 +4624,17 @@ static int write_out_one_reject(struct apply_state *state, struct patch *patch)
46244624
memcpy(namebuf, patch->new_name, cnt);
46254625
memcpy(namebuf + cnt, ".rej", 5);
46264626

4627-
rej = fopen(namebuf, "w");
4627+
fd = open(namebuf, O_CREAT | O_EXCL | O_WRONLY, 0666);
4628+
if (fd < 0) {
4629+
if (errno != EEXIST)
4630+
return error_errno(_("cannot open %s"), namebuf);
4631+
if (unlink(namebuf))
4632+
return error_errno(_("cannot unlink '%s'"), namebuf);
4633+
fd = open(namebuf, O_CREAT | O_EXCL | O_WRONLY, 0666);
4634+
if (fd < 0)
4635+
return error_errno(_("cannot open %s"), namebuf);
4636+
}
4637+
rej = fdopen(fd, "w");
46284638
if (!rej)
46294639
return error_errno(_("cannot open %s"), namebuf);
46304640

ci/install-dependencies.sh

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55

66
. ${0%/*}/lib.sh
77

8-
P4WHENCE=http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION
8+
P4WHENCE=https://cdist2.perforce.com/perforce/r21.2
99
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
1010
UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev
1111
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl
1212
libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl"
1313

1414
case "$runs_on_pool" in
15-
ubuntu-latest)
15+
ubuntu-*)
1616
sudo apt-get -q update
1717
sudo apt-get -q -y install language-pack-is libsvn-perl apache2 \
18-
$UBUNTU_COMMON_PKGS $CC_PACKAGE
18+
$UBUNTU_COMMON_PKGS $PYTHON_PACKAGE
1919
mkdir --parents "$P4_PATH"
2020
pushd "$P4_PATH"
2121
wget --quiet "$P4WHENCE/bin.linux26x86_64/p4d"
@@ -37,13 +37,15 @@ macos-latest)
3737
test -z "$BREW_INSTALL_PACKAGES" ||
3838
brew install $BREW_INSTALL_PACKAGES
3939
brew link --force gettext
40-
brew install --cask --no-quarantine perforce || {
41-
# Update the definitions and try again
42-
cask_repo="$(brew --repository)"/Library/Taps/homebrew/homebrew-cask &&
43-
git -C "$cask_repo" pull --no-stat --ff-only &&
44-
brew install --cask --no-quarantine perforce
45-
} ||
46-
brew install homebrew/cask/perforce
40+
mkdir -p $HOME/bin
41+
(
42+
cd $HOME/bin
43+
wget -q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" &&
44+
tar -xf helix-core-server.tgz &&
45+
sudo xattr -d com.apple.quarantine p4 p4d 2>/dev/null || true
46+
)
47+
PATH="$PATH:${HOME}/bin"
48+
export PATH
4749

4850
if test -n "$CC_PACKAGE"
4951
then
@@ -81,9 +83,9 @@ esac
8183
if type p4d >/dev/null && type p4 >/dev/null
8284
then
8385
echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
84-
p4d -V | grep Rev.
86+
p4d -V
8587
echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
86-
p4 -V | grep Rev.
88+
p4 -V
8789
fi
8890
if type git-lfs >/dev/null
8991
then

ci/lib.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,18 @@ export GIT_TEST_CLONE_2GB=true
157157
export SKIP_DASHED_BUILT_INS=YesPlease
158158

159159
case "$runs_on_pool" in
160-
ubuntu-latest)
160+
ubuntu-*)
161161
if test "$jobname" = "linux-gcc-default"
162162
then
163163
break
164164
fi
165165

166+
PYTHON_PACKAGE=python2
166167
if [ "$jobname" = linux-gcc ]
167168
then
168-
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python3"
169-
else
170-
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python2"
169+
PYTHON_PACKAGE=python3
171170
fi
171+
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE"
172172

173173
export GIT_TEST_HTTPD=true
174174

@@ -177,7 +177,6 @@ ubuntu-latest)
177177
# were recorded in the Homebrew database upon creating the OS X
178178
# image.
179179
# Keep that in mind when you encounter a broken OS X build!
180-
export LINUX_P4_VERSION="16.2"
181180
export LINUX_GIT_LFS_VERSION="1.5.2"
182181

183182
P4_PATH="$HOME/custom/p4"

compat/nedmalloc/nedmalloc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ static NOINLINE void RemoveCacheEntries(nedpool *p, threadcache *tc, unsigned in
323323
}
324324
static void DestroyCaches(nedpool *p) THROWSPEC
325325
{
326-
if(p->caches)
327326
{
328327
threadcache *tc;
329328
int n;

0 commit comments

Comments
 (0)