Name |
Last commit
|
Last update |
---|---|---|
.. | ||
binaryunicode.c | ||
checkout_helpers.c | ||
checkout_helpers.h | ||
conflict.c | ||
crlf.c | ||
head.c | ||
icase.c | ||
index.c | ||
nasty.c | ||
tree.c | ||
typechange.c |
A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed via `<file name>:<stream name>:<stream type>`. Directories, too, have Alternate Data Streams, and they even have a default stream type `$INDEX_ALLOCATION`. Which means that `abc/` and `abc::$INDEX_ALLOCATION/` are actually equivalent. This is of course another attack vector on the Git directory that we definitely want to prevent. On Windows, we already do this incidentally, by disallowing colons in file/directory names. While it looks as if files'/directories' Alternate Data Streams are not accessible in the Windows Subsystem for Linux, and neither via CIFS/SMB-mounted network shares in Linux, it _is_ possible to access them on SMB-mounted network shares on macOS. Therefore, let's go the extra mile and prevent this particular attack _everywhere_. To keep things simple, let's just disallow *any* Alternate Data Stream of `.git`. This is libgit2's variant of CVE-2019-1352. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
binaryunicode.c | Loading commit data... | |
checkout_helpers.c | Loading commit data... | |
checkout_helpers.h | Loading commit data... | |
conflict.c | Loading commit data... | |
crlf.c | Loading commit data... | |
head.c | Loading commit data... | |
icase.c | Loading commit data... | |
index.c | Loading commit data... | |
nasty.c | Loading commit data... | |
tree.c | Loading commit data... | |
typechange.c | Loading commit data... |