<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src, branch v0.26.2</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>index: error out on unreasonable prefix-compressed path lengths</title>
<updated>2018-03-08T15:09:59+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-03-08T12:36:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=6f4d04b5276c93c26250fff1949f90ba67acee37'/>
<id>6f4d04b5276c93c26250fff1949f90ba67acee37</id>
<content type='text'>
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an unreasonable long
path name inside of the index. Git already enforces a maximum path
length of 4096 bytes. As we also have that enforcement ready in some
places, just make sure that the resulting path is smaller than
GIT_PATH_MAX.

Reported-by: Krishna Ram Prakash R &lt;krp@gtux.in&gt;
Reported-by: Vivek Parikh &lt;viv0411.parikh@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an unreasonable long
path name inside of the index. Git already enforces a maximum path
length of 4096 bytes. As we also have that enforcement ready in some
places, just make sure that the resulting path is smaller than
GIT_PATH_MAX.

Reported-by: Krishna Ram Prakash R &lt;krp@gtux.in&gt;
Reported-by: Vivek Parikh &lt;viv0411.parikh@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>index: fix out-of-bounds read with invalid index entry prefix length</title>
<updated>2018-03-08T12:21:55+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-03-08T12:00:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=6ddd286e9c1a80fc71885f66b605f3a3500ad5cb'/>
<id>6ddd286e9c1a80fc71885f66b605f3a3500ad5cb</id>
<content type='text'>
The index format in version 4 has prefix-compressed entries, where every
index entry can compress its path by using a path prefix of the previous
entry. Since implmenting support for this index format version in commit
5625d86b9 (index: support index v4, 2016-05-17), though, we do not
correctly verify that the prefix length that we want to reuse is
actually smaller or equal to the amount of characters than the length of
the previous index entry's path. This can lead to a an integer underflow
and subsequently to an out-of-bounds read.

Fix this by verifying that the prefix is actually smaller than the
previous entry's path length.

Reported-by: Krishna Ram Prakash R &lt;krp@gtux.in&gt;
Reported-by: Vivek Parikh &lt;viv0411.parikh@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The index format in version 4 has prefix-compressed entries, where every
index entry can compress its path by using a path prefix of the previous
entry. Since implmenting support for this index format version in commit
5625d86b9 (index: support index v4, 2016-05-17), though, we do not
correctly verify that the prefix length that we want to reuse is
actually smaller or equal to the amount of characters than the length of
the previous index entry's path. This can lead to a an integer underflow
and subsequently to an out-of-bounds read.

Fix this by verifying that the prefix is actually smaller than the
previous entry's path length.

Reported-by: Krishna Ram Prakash R &lt;krp@gtux.in&gt;
Reported-by: Vivek Parikh &lt;viv0411.parikh@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>index: convert `read_entry` to return entry size via an out-param</title>
<updated>2018-03-08T12:15:35+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-03-08T11:49:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=b6756821d9259cd5991caabd7835658572278051'/>
<id>b6756821d9259cd5991caabd7835658572278051</id>
<content type='text'>
The function `read_entry` does not conform to our usual coding style of
returning stuff via the out parameter and to use the return value for
reporting errors. Due to most of our code conforming to that pattern, it
has become quite natural for us to actually return `-1` in case there is
any error, which has also slipped in with commit 5625d86b9 (index:
support index v4, 2016-05-17). As the function returns an `size_t` only,
though, the return value is wrapped around, causing the caller of
`read_tree` to continue with an invalid index entry. Ultimately, this
can lead to a double-free.

Improve code and fix the bug by converting the function to return the
index entry size via an out parameter and only using the return value to
indicate errors.

Reported-by: Krishna Ram Prakash R &lt;krp@gtux.in&gt;
Reported-by: Vivek Parikh &lt;viv0411.parikh@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function `read_entry` does not conform to our usual coding style of
returning stuff via the out parameter and to use the return value for
reporting errors. Due to most of our code conforming to that pattern, it
has become quite natural for us to actually return `-1` in case there is
any error, which has also slipped in with commit 5625d86b9 (index:
support index v4, 2016-05-17). As the function returns an `size_t` only,
though, the return value is wrapped around, causing the caller of
`read_tree` to continue with an invalid index entry. Ultimately, this
can lead to a double-free.

Improve code and fix the bug by converting the function to return the
index entry size via an out parameter and only using the return value to
indicate errors.

Reported-by: Krishna Ram Prakash R &lt;krp@gtux.in&gt;
Reported-by: Vivek Parikh &lt;viv0411.parikh@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Adding git_filter_init for initializing `git_filter` struct + unit test </title>
<updated>2017-06-13T18:05:40+00:00</updated>
<author>
<name>Mohseen Mukaddam</name>
<email>mohseenmukaddam6@gmail.com</email>
</author>
<published>2017-06-13T18:05:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a78441bc467f964261f24b2a1d011cc84fc96708'/>
<id>a78441bc467f964261f24b2a1d011cc84fc96708</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4263 from libgit2/ethomson/config_for_inmemory_repo</title>
<updated>2017-06-12T20:23:44+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-06-12T20:23:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=99e40a67c7ef84defc7d2a32b0e0f09466fa48f9'/>
<id>99e40a67c7ef84defc7d2a32b0e0f09466fa48f9</id>
<content type='text'>
Allow creation of a configuration object in an in-memory repository</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow creation of a configuration object in an in-memory repository</pre>
</div>
</content>
</entry>
<entry>
<title>repository: don't fail to create config option in inmemory repo</title>
<updated>2017-06-12T15:51:04+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-06-12T11:02:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=2d486781df0828eae716937b23d2df0a9c1817f9'/>
<id>2d486781df0828eae716937b23d2df0a9c1817f9</id>
<content type='text'>
When in an in-memory repository - without a configuration file - do not
fail to create a configuration object.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When in an in-memory repository - without a configuration file - do not
fail to create a configuration object.
</pre>
</div>
</content>
</entry>
<entry>
<title>repository_item_path: return ENOTFOUND when appropriate</title>
<updated>2017-06-12T15:51:04+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-06-12T11:01:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9d49a43c718d0749231ac54adf4b72775cc40354'/>
<id>9d49a43c718d0749231ac54adf4b72775cc40354</id>
<content type='text'>
Disambiguate error values: return `GIT_ENOTFOUND` when the item cannot
exist in the repository (perhaps because the repository is inmemory or
otherwise not backed by a filesystem), return `-1` when there is a hard
failure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disambiguate error values: return `GIT_ENOTFOUND` when the item cannot
exist in the repository (perhaps because the repository is inmemory or
otherwise not backed by a filesystem), return `-1` when there is a hard
failure.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4261 from RogerGee/fix_wait_while_ack</title>
<updated>2017-06-12T15:01:22+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-06-12T15:01:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9927e9587aff31c85916028ae9bee2a21a413a8f'/>
<id>9927e9587aff31c85916028ae9bee2a21a413a8f</id>
<content type='text'>
smart_protocol: fix parsing of server ACK responses</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
smart_protocol: fix parsing of server ACK responses</pre>
</div>
</content>
</entry>
<entry>
<title>odb_read_prefix: reset error in backends loop</title>
<updated>2017-06-12T11:56:40+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-06-12T11:56:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=cb3010c54a4b35e8799a157bdff4eae0378eb8db'/>
<id>cb3010c54a4b35e8799a157bdff4eae0378eb8db</id>
<content type='text'>
When looking for an object by prefix, we query all the backends so that
we can ensure that there is no ambiguity.  We need to reset the `error`
value between backends; otherwise the first backend may find an object
by prefix, but subsequent backends may not.  If we do not reset the
`error` value then it will remain at `GIT_ENOTFOUND` and `read_prefix_1`
will fail, despite having actually found an object.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When looking for an object by prefix, we query all the backends so that
we can ensure that there is no ambiguity.  We need to reset the `error`
value between backends; otherwise the first backend may find an object
by prefix, but subsequent backends may not.  If we do not reset the
`error` value then it will remain at `GIT_ENOTFOUND` and `read_prefix_1`
will fail, despite having actually found an object.
</pre>
</div>
</content>
</entry>
<entry>
<title>repository_item_path: error messages lowercased</title>
<updated>2017-06-12T10:45:09+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-06-12T10:45:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=fb3fc837c6e35075a7060d5702cf122f998d3aea'/>
<id>fb3fc837c6e35075a7060d5702cf122f998d3aea</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
