]> git.ipfire.org Git - thirdparty/git.git/commit
Merge branch 'disallow-dotgit-via-ntfs-alternate-data-streams'
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 16 Sep 2019 11:26:40 +0000 (13:26 +0200)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 5 Dec 2019 14:37:07 +0000 (15:37 +0100)
commit7f3551dd686e2237490c17946335a675c4f59881
tree00b0bb3ed0584501a3638e7eaaf28d29bc792cf6
parent4778452597027f6033db9f3ba6709913eadc3c8c
parent91bd46588e6959e6903e275f78b10bd07830d547
Merge branch 'disallow-dotgit-via-ntfs-alternate-data-streams'

This patch series plugs an attack vector we had overlooked in our
December 2014 work on `core.protectNTFS`.

Essentially, the path `.git::$INDEX_ALLOCATION/config` is interpreted as
`.git/config` when NTFS Alternate Data Streams are available (which they
are on Windows, and at least on network shares that are SMB-mounted on
macOS).

Needless to say: we don't want that.

In fact, we want to stay on the very safe side and not even special-case
the `$INDEX_ALLOCATION` stream type: let's just prevent Git from
touching _any_ explicitly specified Alternate Data Stream of `.git`.

In essence, we'll prevent Git from tracking, or writing to, any path
with a segment of the form `.git:<anything>`.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>