<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/test/libapt, branch 2.1.19</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.1.19</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.1.19'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2021-02-03T16:43:13Z</updated>
<entry>
<title>Avoid overstepping bounds in config file parsing</title>
<updated>2021-02-03T16:43:13Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-02-03T16:40:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c4da2ff42da55ffc38c77a9170dc151216d75962'/>
<id>urn:sha1:c4da2ff42da55ffc38c77a9170dc151216d75962</id>
<content type='text'>
Our configuration files are not security relevant, but having a parser
which avoids crashing on them even if they are seriously messed up is
not a bad idea anyway. It is also a good opportunity to brush up the
code a bit avoiding a few small string copies with our string_view.
</content>
</entry>
<entry>
<title>Forbid negative values in unsigned StrToNum explicitly</title>
<updated>2021-02-03T16:36:46Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-13T07:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e0743a85c5f5f2f83d91c305450e8ba192194cd8'/>
<id>urn:sha1:e0743a85c5f5f2f83d91c305450e8ba192194cd8</id>
<content type='text'>
strtoul(l) surprises us with parsing negative values which should not
exist in the places we use to parse them, so we can just downright
refuse them rather than trying to work with them by having them promoted
to huge positive values.
</content>
</entry>
<entry>
<title>Don't parse \x and \0 past the end in DeEscapeString</title>
<updated>2021-02-03T16:36:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-12-03T09:44:27Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ed192f410da36aedf5e54bb3f967e6613ab4bb51'/>
<id>urn:sha1:ed192f410da36aedf5e54bb3f967e6613ab4bb51</id>
<content type='text'>
This has no attack surface though as the loop is to end very soon anyhow
and the method only used while reading CD-ROM mountpoints which seems
like a very unlikely attack vector…
</content>
</entry>
<entry>
<title>Fix incorrect base64 encoding due to int promotion</title>
<updated>2021-02-03T16:36:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-12-03T09:41:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=10f13938bbf1474451fadcd62e1c31c4b5f5b3d7'/>
<id>urn:sha1:10f13938bbf1474451fadcd62e1c31c4b5f5b3d7</id>
<content type='text'>
For \xff and friends with the highest bit set and hence being a negative
value on signed char systems the wrong encoding is produced as we run
into undefined behaviour accessing negative array indexes.
We can avoid this problem simply by using an unsigned data type.
</content>
</entry>
<entry>
<title>Add a simple test for APT::String::DisplayLength</title>
<updated>2021-02-03T16:36:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-12-03T09:35:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1b3ad3891465f8b72bcedfb4edd513cb74eec7f3'/>
<id>urn:sha1:1b3ad3891465f8b72bcedfb4edd513cb74eec7f3</id>
<content type='text'>
References: 2497198e9599a6a8d4d0ad08627bcfc7ea49c644
Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>patterns: Terminate short pattern by ~ and !</title>
<updated>2020-12-07T14:11:20Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-07T14:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f9a621d335622a8909177f6d347e32e3876fde3f'/>
<id>urn:sha1:f9a621d335622a8909177f6d347e32e3876fde3f</id>
<content type='text'>
This allows patterns like ~nalpha~nbeta and ~nalpha!~nbeta to
work like they do in APT.

Also add a comment to remind readers that everything in START
should be in short too.

Cc: stable &gt;= 2.0
</content>
</entry>
<entry>
<title>Allow prefix to be a complete filename for GetTempFile</title>
<updated>2020-05-18T13:55:36Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-18T09:55:54Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c470d92366d7c3c239a689f0a10d6d0d9daafbff'/>
<id>urn:sha1:c470d92366d7c3c239a689f0a10d6d0d9daafbff</id>
<content type='text'>
Our testcases had their own implementation of GetTempFile with the
feature of a temporary file with a choosen suffix. Merging this into
GetTempFile lets us drop this duplicate and hence test more our code
rather than testing our helpers for test implementation.

And then hashsums_test had another implementation… and extracttar wasn't
even trying to use a real tempfile… one GetTempFile to rule them all!
That also ensures that these tempfiles are created in a temporary
directory rather than the current directory which is a nice touch and
tries a little harder to clean up those tempfiles.
</content>
</entry>
<entry>
<title>Parse records including empty tag names correctly</title>
<updated>2020-02-26T17:12:18Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-02-20T11:49:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=110078022a6c6103be8f557aef1e268c4b680d88'/>
<id>urn:sha1:110078022a6c6103be8f557aef1e268c4b680d88</id>
<content type='text'>
No sensible file should include these, but even insensible files do not
gain unfair advantages with it as this parser does not deal with
security critical files before they haven't passed other checks like
signatures or hashsums.

The problem is that the parser accepts and parses empty tag names
correctly, but does not store the data parsed which will effect later
passes over the data resulting e.g. in the following tag containing
the name and value of the previous (empty) tag, its own tagname and its
own value or a crash due to an attempt to access invalid memory
depending on who passes over the data and what is done with it.

This commit fixes both, the incidient of the crash reported by
Anatoly Trosinenko who reproduced it via apt-sortpkgs:
| $ cat /tmp/Packages-null
| 0:
| PACKAGE:0
|
| :
| PACKAGE:
|
| PACKAGE::
| $ apt-sortpkgs /tmp/Packages-null
and the deeper parsing issue shown by the included testcase.

Reported-By: Anatoly Trosinenko &lt;anatoly.trosinenko@gmail.com&gt;
References: 8710a36a01c0cb1648926792c2ad05185535558e
</content>
</entry>
<entry>
<title>Remove code tagged APT_PKG_590, add some missing includes</title>
<updated>2020-02-18T11:48:38Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-02-18T11:48:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e8016805b87bead8eb3dff0d0559c5d9590b721b'/>
<id>urn:sha1:e8016805b87bead8eb3dff0d0559c5d9590b721b</id>
<content type='text'>
Remove all code scheduled to be removed after 5.90, and fix
files to include files they previously got from hashes.h
including more headers.
</content>
</entry>
<entry>
<title>patterns: test for empty terms, reject them</title>
<updated>2020-02-03T11:55:54Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-02-03T11:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=404771d0ec11f26a0b631018719e2918a049455b'/>
<id>urn:sha1:404771d0ec11f26a0b631018719e2918a049455b</id>
<content type='text'>
</content>
</entry>
</feed>
