<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/checkout, branch ethomson/diff_enum</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>implement GIT_CHECKOUT_DRY_RUN to allow notifications without touching the working directory</title>
<updated>2021-04-14T20:05:47+00:00</updated>
<author>
<name>Jochen Hunz</name>
<email>j.hunz@anchorpoint.app</email>
</author>
<published>2021-04-14T20:05:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=958205a33d9e9d078f41a9a3ac04dc7c657840c7'/>
<id>958205a33d9e9d078f41a9a3ac04dc7c657840c7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the tests pass cleanly with MemorySanitizer</title>
<updated>2020-06-30T13:25:10+00:00</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2020-06-27T19:33:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=3a197ea7ead1bc1b018eb809e92f418a00e5c3f8'/>
<id>3a197ea7ead1bc1b018eb809e92f418a00e5c3f8</id>
<content type='text'>
This change:

* Initializes a few variables that were being read before being
  initialized.
* Includes https://github.com/madler/zlib/pull/393. As such,
  it only works reliably with `-DUSE_BUNDLED_ZLIB=ON`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change:

* Initializes a few variables that were being read before being
  initialized.
* Includes https://github.com/madler/zlib/pull/393. As such,
  it only works reliably with `-DUSE_BUNDLED_ZLIB=ON`.
</pre>
</div>
</content>
</entry>
<entry>
<title>clar: include the function name</title>
<updated>2020-06-05T07:49:07+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-06-05T07:42:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=cad7a1bad40c302fef02306708f6ce6279680cb4'/>
<id>cad7a1bad40c302fef02306708f6ce6279680cb4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>checkout::index: free the index</title>
<updated>2020-05-23T08:35:53+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-05-23T08:35:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=f88e12dbe3982ce9364754198d4cdea79ff575ae'/>
<id>f88e12dbe3982ce9364754198d4cdea79ff575ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: checkout: fix stylistic issues and static variable</title>
<updated>2020-05-16T12:02:42+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-05-16T12:00:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=915f88609a6685fbad1f5ad6fa7a5bb320f03138'/>
<id>915f88609a6685fbad1f5ad6fa7a5bb320f03138</id>
<content type='text'>
The test case checkout::index::can_disable_pathspec_match has some
shortcomings when it comes to coding style, which didn't fit our own
coding style. Furthermore, it had an unnecessary static local variable.

The test has been refactored to address these issues.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test case checkout::index::can_disable_pathspec_match has some
shortcomings when it comes to coding style, which didn't fit our own
coding style. Furthermore, it had an unnecessary static local variable.

The test has been refactored to address these issues.
</pre>
</div>
</content>
</entry>
<entry>
<title>checkout: Fix removing untracked files by path in subdirectories</title>
<updated>2020-05-10T23:15:06+00:00</updated>
<author>
<name>Segev Finer</name>
<email>segev@codeocean.com</email>
</author>
<published>2019-06-03T15:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=d62e44cb8218840a0291fb5fbb7c5106e1e35a12'/>
<id>d62e44cb8218840a0291fb5fbb7c5106e1e35a12</id>
<content type='text'>
The checkout code didn't iterate into a subdir if it didn't match the
pathspec, but since the pathspec might match files in the subdir we
should recurse into it (In contrast to gitignore handling).

Fixes #5089
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The checkout code didn't iterate into a subdir if it didn't match the
pathspec, but since the pathspec might match files in the subdir we
should recurse into it (In contrast to gitignore handling).

Fixes #5089
</pre>
</div>
</content>
</entry>
<entry>
<title>tests::checkout: only examine test10 and test11.txt</title>
<updated>2020-05-10T22:47:20+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-02-02T18:01:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=8731e1f4a10a29fe819e3d3011077737e3c7df43'/>
<id>8731e1f4a10a29fe819e3d3011077737e3c7df43</id>
<content type='text'>
The checkout::index::can_disable_pathspec_match test attempts to set a
path filter of `test11.txt` and `test12.txt`, but then validates that
`test10.txt` and `test11.txt` were left unmodified.  Update the test's
path filter to match the expectation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The checkout::index::can_disable_pathspec_match test attempts to set a
path filter of `test11.txt` and `test12.txt`, but then validates that
`test10.txt` and `test11.txt` were left unmodified.  Update the test's
path filter to match the expectation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Create test case demonstrating checkout bug w/ pathspec match disabled</title>
<updated>2020-05-10T22:47:20+00:00</updated>
<author>
<name>Felix Lapalme</name>
<email>lapfelix@users.noreply.github.com</email>
</author>
<published>2020-02-02T06:00:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=24bd12c4f91f841b70bd65252aa25b221bf63eb5'/>
<id>24bd12c4f91f841b70bd65252aa25b221bf63eb5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS</title>
<updated>2019-12-10T08:01:06+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2019-09-18T12:32:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=3f7851eadca36a99627ad78cbe56a40d3776ed01'/>
<id>3f7851eadca36a99627ad78cbe56a40d3776ed01</id>
<content type='text'>
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 `&lt;file name&gt;:&lt;stream
name&gt;:&lt;stream type&gt;`.

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 &lt;johannes.schindelin@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 `&lt;file name&gt;:&lt;stream
name&gt;:&lt;stream type&gt;`.

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 &lt;johannes.schindelin@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Protect against 8.3 "short name" attacks also on Linux/macOS</title>
<updated>2019-12-10T08:01:06+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2019-09-18T13:25:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=64c612cc3e25eff5fb02c59ef5a66ba7a14751e4'/>
<id>64c612cc3e25eff5fb02c59ef5a66ba7a14751e4</id>
<content type='text'>
The Windows Subsystem for Linux (WSL) is getting increasingly popular,
in particular because it makes it _so_ easy to run Linux software on
Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to
`/mnt/c/`, no need to set that up manually).

Unfortunately, files/directories on the Windows drives can be accessed
via their _short names_, if that feature is enabled (which it is on the
`C:` drive by default).

Which means that we have to safeguard even our Linux users against the
short name attacks.

Further, while the default options of CIFS/SMB-mounts seem to disallow
accessing files on network shares via their short names on Linux/macOS,
it _is_ possible to do so with the right options.

So let's just safe-guard against short name attacks _everywhere_.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Windows Subsystem for Linux (WSL) is getting increasingly popular,
in particular because it makes it _so_ easy to run Linux software on
Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to
`/mnt/c/`, no need to set that up manually).

Unfortunately, files/directories on the Windows drives can be accessed
via their _short names_, if that feature is enabled (which it is on the
`C:` drive by default).

Which means that we have to safeguard even our Linux users against the
short name attacks.

Further, while the default options of CIFS/SMB-mounts seem to disallow
accessing files on network shares via their short names on Linux/macOS,
it _is_ possible to do so with the right options.

So let's just safe-guard against short name attacks _everywhere_.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
