Skip to content

Commit

Permalink
Merge tag 'v2.24.1.windows.2' into vfs-2.24.1
Browse files Browse the repository at this point in the history
Git for Windows v2.24.1(2)

Changes since Git for Windows v2.24.0(2) (November 6th 2019)

This is a security bug release that fixes CVE-2019-1348, CVE-2019-1349,
CVE-2019-1350, CVE-2019-1351, CVE-2019-1352, CVE-2019-1353,
CVE-2019-1354, CVE-2019-1387, and CVE-2019-19604.

New Features

  * Comes with Git v2.24.1.
  * Comes with tig v2.5.0.
  * Comes with patch level 4 of the MSYS2 runtime (Git for Windows
    flavor) based on Cygwin 3.0.7.
  * The command-line options of git-bash.exe are now documented (call
    git help git-bash).
  * Comes with Git LFS v2.9.1.
  * Comes with cURL v7.67.0.
  * Comes with GNU Privacy Guard v2.2.18.

Bug Fixes

  * MinGit no longer overrides an installed Git for Windows' system
    gitconfig.
  * The "Check daily for updates" feature uses the Action Center again.
  * When associating .sh files with Git Bash to allow running them by
    double-clicking them in the Windows Explorer, shell scripts with
    non-ASCII characters in their file name are now supported.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
  • Loading branch information
derrickstolee committed Dec 11, 2019
2 parents be5e0bb + 992f077 commit 3cf6c75
Show file tree
Hide file tree
Showing 55 changed files with 1,300 additions and 216 deletions.
54 changes: 54 additions & 0 deletions Documentation/RelNotes/2.14.6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Git v2.14.6 Release Notes
=========================

This release addresses the security issues CVE-2019-1348,
CVE-2019-1349, CVE-2019-1350, CVE-2019-1351, CVE-2019-1352,
CVE-2019-1353, CVE-2019-1354, and CVE-2019-1387.

Fixes since v2.14.5
-------------------

* CVE-2019-1348:
The --export-marks option of git fast-import is exposed also via
the in-stream command feature export-marks=... and it allows
overwriting arbitrary paths.

* CVE-2019-1349:
When submodules are cloned recursively, under certain circumstances
Git could be fooled into using the same Git directory twice. We now
require the directory to be empty.

* CVE-2019-1350:
Incorrect quoting of command-line arguments allowed remote code
execution during a recursive clone in conjunction with SSH URLs.

* CVE-2019-1351:
While the only permitted drive letters for physical drives on
Windows are letters of the US-English alphabet, this restriction
does not apply to virtual drives assigned via subst <letter>:
<path>. Git mistook such paths for relative paths, allowing writing
outside of the worktree while cloning.

* CVE-2019-1352:
Git was unaware of NTFS Alternate Data Streams, allowing files
inside the .git/ directory to be overwritten during a clone.

* CVE-2019-1353:
When running Git in the Windows Subsystem for Linux (also known as
"WSL") while accessing a working directory on a regular Windows
drive, none of the NTFS protections were active.

* CVE-2019-1354:
Filenames on Linux/Unix can contain backslashes. On Windows,
backslashes are directory separators. Git did not use to refuse to
write out tracked files with such filenames.

* CVE-2019-1387:
Recursive clones are currently affected by a vulnerability that is
caused by too-lax validation of submodule names, allowing very
targeted attacks via remote code execution in recursive clones.

Credit for finding these vulnerabilities goes to Microsoft Security
Response Center, in particular to Nicolas Joly. The `fast-import`
fixes were provided by Jeff King, the other fixes by Johannes
Schindelin with help from Garima Singh.
11 changes: 11 additions & 0 deletions Documentation/RelNotes/2.15.4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Git v2.15.4 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6 to address
the security issues CVE-2019-1348, CVE-2019-1349, CVE-2019-1350,
CVE-2019-1351, CVE-2019-1352, CVE-2019-1353, CVE-2019-1354, and
CVE-2019-1387; see the release notes for that version for details.

In conjunction with a vulnerability that was fixed in v2.20.2,
`.gitmodules` is no longer allowed to contain entries of the form
`submodule.<name>.update=!command`.
8 changes: 8 additions & 0 deletions Documentation/RelNotes/2.16.6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Git v2.16.6 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6 and in
v2.15.4 addressing the security issues CVE-2019-1348, CVE-2019-1349,
CVE-2019-1350, CVE-2019-1351, CVE-2019-1352, CVE-2019-1353,
CVE-2019-1354, and CVE-2019-1387; see the release notes for those
versions for details.
12 changes: 12 additions & 0 deletions Documentation/RelNotes/2.17.3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Git v2.17.3 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6 and in
v2.15.4 addressing the security issues CVE-2019-1348, CVE-2019-1349,
CVE-2019-1350, CVE-2019-1351, CVE-2019-1352, CVE-2019-1353,
CVE-2019-1354, and CVE-2019-1387; see the release notes for those
versions for details.

In addition, `git fsck` was taught to identify `.gitmodules` entries
of the form `submodule.<name>.update=!command`, which have been
disallowed in v2.15.4.
8 changes: 8 additions & 0 deletions Documentation/RelNotes/2.18.2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Git v2.18.2 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6, v2.15.4
and in v2.17.3, addressing the security issues CVE-2019-1348,
CVE-2019-1349, CVE-2019-1350, CVE-2019-1351, CVE-2019-1352,
CVE-2019-1353, CVE-2019-1354, and CVE-2019-1387; see the release notes
for those versions for details.
8 changes: 8 additions & 0 deletions Documentation/RelNotes/2.19.3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Git v2.19.3 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6, v2.15.4
and in v2.17.3, addressing the security issues CVE-2019-1348,
CVE-2019-1349, CVE-2019-1350, CVE-2019-1351, CVE-2019-1352,
CVE-2019-1353, CVE-2019-1354, and CVE-2019-1387; see the release notes
for those versions for details.
18 changes: 18 additions & 0 deletions Documentation/RelNotes/2.20.2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Git v2.20.2 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6, v2.15.4
and in v2.17.3, addressing the security issues CVE-2019-1348,
CVE-2019-1349, CVE-2019-1350, CVE-2019-1351, CVE-2019-1352,
CVE-2019-1353, CVE-2019-1354, and CVE-2019-1387; see the release notes
for those versions for details.

The change to disallow `submodule.<name>.update=!command` entries in
`.gitmodules` which was introduced v2.15.4 (and for which v2.17.3
added explicit fsck checks) fixes the vulnerability in v2.20.x where a
recursive clone followed by a submodule update could execute code
contained within the repository without the user explicitly having
asked for that (CVE-2019-19604).

Credit for finding this vulnerability goes to Joern Schneeweisz,
credit for the fixes goes to Jonathan Nieder.
12 changes: 12 additions & 0 deletions Documentation/RelNotes/2.21.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Git v2.21.1 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6, v2.15.4,
v2.17.3 and in v2.20.2, addressing the security issues CVE-2019-1348,
CVE-2019-1349, CVE-2019-1350, CVE-2019-1351, CVE-2019-1352,
CVE-2019-1353, CVE-2019-1354, CVE-2019-1387, and CVE-2019-19604;
see the release notes for those versions for details.

Additionally, this version also includes a couple of fixes for the
Windows-specific quoting of command-line arguments when Git executes
a Unix shell on Windows.
8 changes: 8 additions & 0 deletions Documentation/RelNotes/2.22.2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Git v2.22.2 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6, v2.15.4,
v2.17.3, v2.20.2 and in v2.21.1, addressing the security issues
CVE-2019-1348, CVE-2019-1349, CVE-2019-1350, CVE-2019-1351,
CVE-2019-1352, CVE-2019-1353, CVE-2019-1354, CVE-2019-1387, and
CVE-2019-19604; see the release notes for those versions for details.
8 changes: 8 additions & 0 deletions Documentation/RelNotes/2.23.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Git v2.23.1 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6, v2.15.4,
v2.17.3, v2.20.2 and in v2.21.1, addressing the security issues
CVE-2019-1348, CVE-2019-1349, CVE-2019-1350, CVE-2019-1351,
CVE-2019-1352, CVE-2019-1353, CVE-2019-1354, CVE-2019-1387, and
CVE-2019-19604; see the release notes for those versions for details.
8 changes: 8 additions & 0 deletions Documentation/RelNotes/2.24.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Git v2.24.1 Release Notes
=========================

This release merges up the fixes that appear in v2.14.6, v2.15.4,
v2.17.3, v2.20.2 and in v2.21.1, addressing the security issues
CVE-2019-1348, CVE-2019-1349, CVE-2019-1350, CVE-2019-1351,
CVE-2019-1352, CVE-2019-1353, CVE-2019-1354, CVE-2019-1387, and
CVE-2019-19604; see the release notes for those versions for details.
15 changes: 15 additions & 0 deletions Documentation/git-fast-import.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ OPTIONS
memory used by fast-import during this run. Showing this output
is currently the default, but can be disabled with --quiet.

--allow-unsafe-features::
Many command-line options can be provided as part of the
fast-import stream itself by using the `feature` or `option`
commands. However, some of these options are unsafe (e.g.,
allowing fast-import to access the filesystem outside of the
repository). These options are disabled by default, but can be
allowed by providing this option on the command line. This
currently impacts only the `export-marks`, `import-marks`, and
`import-marks-if-exists` feature commands.
+
Only enable this option if you trust the program generating the
fast-import stream! This option is enabled automatically for
remote-helpers that use the `import` capability, as they are
already trusted to run their own code.

Options for Frontends
~~~~~~~~~~~~~~~~~~~~~

Expand Down
5 changes: 2 additions & 3 deletions Documentation/gitmodules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ submodule.<name>.update::
submodule init` to initialize the configuration variable of
the same name. Allowed values here are 'checkout', 'rebase',
'merge' or 'none'. See description of 'update' command in
linkgit:git-submodule[1] for their meaning. Note that the
'!command' form is intentionally ignored here for security
reasons.
linkgit:git-submodule[1] for their meaning. For security
reasons, the '!command' form is not accepted here.

submodule.<name>.branch::
A remote branch name for tracking updates in the upstream submodule.
Expand Down
2 changes: 1 addition & 1 deletion GIT-VERSION-GEN
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

GVF=GIT-VERSION-FILE
DEF_VER=v2.24.0.vfs.1.1
DEF_VER=v2.24.1.vfs.1.1

LF='
'
Expand Down
2 changes: 1 addition & 1 deletion RelNotes
37 changes: 25 additions & 12 deletions add-interactive.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static ssize_t list_and_choose(struct add_i_state *s,
find_unique_prefixes(items);

for (;;) {
char *p, *endp;
char *p;

strbuf_reset(&input);

Expand Down Expand Up @@ -330,7 +330,16 @@ static ssize_t list_and_choose(struct add_i_state *s,
from = 0;
to = items->items.nr;
} else if (isdigit(*p)) {
/* A range can be specified like 5-7 or 5-. */
char *endp;
/*
* A range can be specified like 5-7 or 5-.
*
* Note: `from` is 0-based while the user input
* is 1-based, hence we have to decrement by
* one. We do not have to decrement `to` even
* if it is 0-based because it is an exclusive
* boundary.
*/
from = strtoul(p, &endp, 10) - 1;
if (endp == p + sep)
to = from + 1;
Expand All @@ -342,7 +351,8 @@ static ssize_t list_and_choose(struct add_i_state *s,
}
}

p[sep] = '\0';
if (p[sep])
p[sep++] = '\0';
if (from < 0) {
from = find_unique(p, items);
if (from >= 0)
Expand All @@ -368,7 +378,7 @@ static ssize_t list_and_choose(struct add_i_state *s,
res += choose ? +1 : -1;
}

p += sep + 1;
p += sep;
}

if ((immediate && res != LIST_AND_CHOOSE_ERROR) ||
Expand Down Expand Up @@ -417,7 +427,7 @@ static int pathname_entry_cmp(const void *unused_cmp_data,
}

struct collection_status {
enum { FROM_WORKTREE = 0, FROM_INDEX = 1 } phase;
enum { FROM_WORKTREE = 0, FROM_INDEX = 1 } mode;

const char *reference;

Expand Down Expand Up @@ -463,9 +473,9 @@ static void collect_changes_cb(struct diff_queue_struct *q,
}

file_item = entry->item;
adddel = s->phase == FROM_INDEX ?
adddel = s->mode == FROM_INDEX ?
&file_item->index : &file_item->worktree;
other_adddel = s->phase == FROM_INDEX ?
other_adddel = s->mode == FROM_INDEX ?
&file_item->worktree : &file_item->index;
adddel->seen = 1;
adddel->add = stat.files[i]->added;
Expand Down Expand Up @@ -500,7 +510,7 @@ static int get_modified_files(struct repository *r,
struct object_id head_oid;
int is_initial = !resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
&head_oid, NULL);
struct collection_status s = { FROM_WORKTREE };
struct collection_status s = { 0 };
int i;

if (discard_index(r->index) < 0 ||
Expand All @@ -516,9 +526,9 @@ static int get_modified_files(struct repository *r,
struct setup_revision_opt opt = { 0 };

if (filter == INDEX_ONLY)
s.phase = i ? FROM_WORKTREE : FROM_INDEX;
s.mode = (i == 0) ? FROM_INDEX : FROM_WORKTREE;
else
s.phase = i ? FROM_INDEX : FROM_WORKTREE;
s.mode = (i == 0) ? FROM_WORKTREE : FROM_INDEX;
s.skip_unseen = filter && i;

opt.def = is_initial ?
Expand All @@ -534,12 +544,15 @@ static int get_modified_files(struct repository *r,
if (ps)
copy_pathspec(&rev.prune_data, ps);

if (s.phase == FROM_INDEX)
if (s.mode == FROM_INDEX)
run_diff_index(&rev, 1);
else {
rev.diffopt.flags.ignore_dirty_submodules = 1;
run_diff_files(&rev, 0);
}

if (ps)
clear_pathspec(&rev.prune_data);
}
hashmap_free_entries(&s.file_map, struct pathname_entry, ent);
if (unmerged_count)
Expand Down Expand Up @@ -980,7 +993,7 @@ static int run_diff(struct add_i_state *s, const struct pathspec *ps,

static int run_help(struct add_i_state *s, const struct pathspec *unused_ps,
struct prefix_item_list *unused_files,
struct list_and_choose_options *opts)
struct list_and_choose_options *unused_opts)
{
color_fprintf_ln(stdout, s->help_color, "status - %s",
_("show paths with changes"));
Expand Down
Loading

0 comments on commit 3cf6c75

Please sign in to comment.