forked from xiaolai/git
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* maint-2.18: Git 2.18.1 Git 2.17.2 fsck: detect submodule paths starting with dash fsck: detect submodule urls starting with dash Git 2.16.5 Git 2.15.3 Git 2.14.5 submodule-config: ban submodule paths that start with a dash submodule-config: ban submodule urls that start with dash submodule--helper: use "--" to signal end of clone options
- Loading branch information
Showing
10 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Git v2.14.5 Release Notes | ||
========================= | ||
|
||
This release is to address the recently reported CVE-2018-17456. | ||
|
||
Fixes since v2.14.4 | ||
------------------- | ||
|
||
* Submodules' "URL"s come from the untrusted .gitmodules file, but | ||
we blindly gave it to "git clone" to clone submodules when "git | ||
clone --recurse-submodules" was used to clone a project that has | ||
such a submodule. The code has been hardened to reject such | ||
malformed URLs (e.g. one that begins with a dash). | ||
|
||
Credit for finding and fixing this vulnerability goes to joernchen | ||
and Jeff King, respectively. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Git v2.15.3 Release Notes | ||
========================= | ||
|
||
This release merges up the fixes that appear in v2.14.5 to address | ||
the recently reported CVE-2018-17456; see the release notes for that | ||
version for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Git v2.16.5 Release Notes | ||
========================= | ||
|
||
This release merges up the fixes that appear in v2.14.5 to address | ||
the recently reported CVE-2018-17456; see the release notes for that | ||
version for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Git v2.17.2 Release Notes | ||
========================= | ||
|
||
This release merges up the fixes that appear in v2.14.5 to address | ||
the recently reported CVE-2018-17456; see the release notes for that | ||
version for details. | ||
|
||
In addition, this release also teaches "fsck" and the server side | ||
logic to reject pushes to repositories that attempt to create such a | ||
problematic ".gitmodules" file as tracked contents, to help hosting | ||
sites protect their customers by preventing malicious contents from | ||
spreading. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Git v2.18.1 Release Notes | ||
========================= | ||
|
||
This release merges up the fixes that appear in v2.14.5 and in | ||
v2.17.2 to address the recently reported CVE-2018-17456; see the | ||
release notes for those versions for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/sh | ||
|
||
test_description='check handling of .gitmodule url with dash' | ||
. ./test-lib.sh | ||
|
||
test_expect_success 'create submodule with protected dash in url' ' | ||
git init upstream && | ||
git -C upstream commit --allow-empty -m base && | ||
mv upstream ./-upstream && | ||
git submodule add ./-upstream sub && | ||
git add sub .gitmodules && | ||
git commit -m submodule | ||
' | ||
|
||
test_expect_success 'clone can recurse submodule' ' | ||
test_when_finished "rm -rf dst" && | ||
git clone --recurse-submodules . dst && | ||
echo base >expect && | ||
git -C dst/sub log -1 --format=%s >actual && | ||
test_cmp expect actual | ||
' | ||
|
||
test_expect_success 'fsck accepts protected dash' ' | ||
test_when_finished "rm -rf dst" && | ||
git init --bare dst && | ||
git -C dst config transfer.fsckObjects true && | ||
git push dst HEAD | ||
' | ||
|
||
test_expect_success 'remove ./ protection from .gitmodules url' ' | ||
perl -i -pe "s{\./}{}" .gitmodules && | ||
git commit -am "drop protection" | ||
' | ||
|
||
test_expect_success 'clone rejects unprotected dash' ' | ||
test_when_finished "rm -rf dst" && | ||
test_must_fail git clone --recurse-submodules . dst 2>err && | ||
test_i18ngrep ignoring err | ||
' | ||
|
||
test_expect_success 'fsck rejects unprotected dash' ' | ||
test_when_finished "rm -rf dst" && | ||
git init --bare dst && | ||
git -C dst config transfer.fsckObjects true && | ||
test_must_fail git push dst HEAD 2>err && | ||
grep gitmodulesUrl err | ||
' | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
test_description='check handling of .gitmodule path with dash' | ||
. ./test-lib.sh | ||
|
||
test_expect_success 'create submodule with dash in path' ' | ||
git init upstream && | ||
git -C upstream commit --allow-empty -m base && | ||
git submodule add ./upstream sub && | ||
git mv sub ./-sub && | ||
git commit -m submodule | ||
' | ||
|
||
test_expect_success 'clone rejects unprotected dash' ' | ||
test_when_finished "rm -rf dst" && | ||
git clone --recurse-submodules . dst 2>err && | ||
test_i18ngrep ignoring err | ||
' | ||
|
||
test_expect_success 'fsck rejects unprotected dash' ' | ||
test_when_finished "rm -rf dst" && | ||
git init --bare dst && | ||
git -C dst config transfer.fsckObjects true && | ||
test_must_fail git push dst HEAD 2>err && | ||
grep gitmodulesPath err | ||
' | ||
|
||
test_done |