<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/acquire-method.cc, branch 2.7.12</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.7.12</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.7.12'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2024-02-20T12:49:04Z</updated>
<entry>
<title>Modernize standard library includes</title>
<updated>2024-02-20T12:49:04Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2024-02-20T12:43:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=40a75722c43ae24cb9a99d6730a3b25b65819c49'/>
<id>urn:sha1:40a75722c43ae24cb9a99d6730a3b25b65819c49</id>
<content type='text'>
This was automated with sed and git-clang-format, and then I had to
fix up the top of policy.cc by hand as git-clang-format accidentally
indented it by two spaces.
</content>
</entry>
<entry>
<title>Replace PrintStatus with SendMessage usage</title>
<updated>2021-02-04T10:00:00Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-06-28T18:52:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=96dc40b19623621a9cc2c5541fb3adbbceb553b1'/>
<id>urn:sha1:96dc40b19623621a9cc2c5541fb3adbbceb553b1</id>
<content type='text'>
varg API is a nightmare as the symbols seems different on ever other
arch, but more importantly SendMessage does a few checks on the content
of the message and it is all outputted via C++ iostreams and not mixed
in FILE* which is handy for overriding the streams.
</content>
</entry>
<entry>
<title>Keep URIs encoded in the acquire system</title>
<updated>2020-12-18T18:31:19Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-07-09T14:38:49Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e6c55283d235aa9404395d30f2db891f36995c49'/>
<id>urn:sha1:e6c55283d235aa9404395d30f2db891f36995c49</id>
<content type='text'>
We do not deal a lot with URIs which need encoding, but then we do it is
a pain that we store it decoded in the acquire system as it means we
have to decode and reencode URIs eventually which is potentially giving
us slightly different URIs.

We see that in our own testing framework while setting up redirects as
the config options are effectively double-encoded and decoded to pass
them around successfully as otherwise %2f and / in an URI are treated
the same.

This commit adds the infrastructure for methods to opt into getting URIs
send in encoded form (and returning them to us in encoded form, too) so
that we eventually do not have to touch the URIs which is how it should
be. This means though that we have to deal with methods who do not
support this yet (aka: all at the moment) for which we decode and encode
while communicating with them.
</content>
</entry>
<entry>
<title>acquire: Do not hide _errror messages in Fail()</title>
<updated>2020-08-11T06:57:47Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-08-11T06:56:39Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=626b7ccc8cec120f789ef89c2d5d28b8b6d67a04'/>
<id>urn:sha1:626b7ccc8cec120f789ef89c2d5d28b8b6d67a04</id>
<content type='text'>
If we have errors pending, always log them with our failure
message to provide more context.
</content>
</entry>
<entry>
<title>Remove includes of (md5|sha1|sha2).h headers</title>
<updated>2020-01-14T12:10:36Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-01-07T20:21:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8c1a37e12790a23f3b132899485e011f9134b483'/>
<id>urn:sha1:8c1a37e12790a23f3b132899485e011f9134b483</id>
<content type='text'>
Remove it everywhere, except where it is still needed.
</content>
</entry>
<entry>
<title>RFC1123StrToTime: Accept const std::string&amp; as first argument</title>
<updated>2019-06-17T16:28:52Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2019-06-17T16:28:52Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=97553e635d2265ec4aad96b00b1fd72d98437f15'/>
<id>urn:sha1:97553e635d2265ec4aad96b00b1fd72d98437f15</id>
<content type='text'>
We are converting to std::string anyway by passing to
istringstream, and this removes the need for .c_str()
in callers.
</content>
</entry>
<entry>
<title>Verify data being sent by methods in SendMessage()</title>
<updated>2019-01-30T12:33:24Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2019-01-23T12:57:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=711cda2302b0dfe5d4ab0588b245ae4a97863e5b'/>
<id>urn:sha1:711cda2302b0dfe5d4ab0588b245ae4a97863e5b</id>
<content type='text'>
As a follow-up for CVE-2019-3462, add checks similar to those
for redirect to the central SendMessage() function. The checks
are a bit more relaxed for values - they may include newlines
and unicode characters (newlines get rewritten, so are safe).

For keys and the message header, the checks are far more strict:
They may only contain alphanumerical characters, the hyphen-minus,
and the horizontal space.

In case the method tries to send anything else, we construct a
legal 400 URI Failed response, and send that. We specifically do
not include the item URI, in case it has been compromised (that
would cause infinite recursion).
</content>
</entry>
<entry>
<title>SECURITY UPDATE: content injection in http method (CVE-2019-3462)</title>
<updated>2019-01-22T11:50:59Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2019-01-18T08:13:52Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5eb01ec13f3ede4bae5e60eb16bd8cffb7c03e1b'/>
<id>urn:sha1:5eb01ec13f3ede4bae5e60eb16bd8cffb7c03e1b</id>
<content type='text'>
This fixes a security issue that can be exploited to inject arbritrary debs
or other files into a signed repository as followed:

(1) Server sends a redirect to somewhere%0a&lt;headers for the apt method&gt; (where %0a is
    \n encoded)
(2) apt method decodes the redirect (because the method encodes the URLs before
    sending them out), writting something like
    somewhere\n
    &lt;headers&gt;
    into its output
(3) apt then uses the headers injected for validation purposes.

Regression-Of: c34ea12ad509cb34c954ed574a301c3cbede55ec
LP: #1812353
</content>
</entry>
<entry>
<title>Remove obsolete RCS keywords</title>
<updated>2018-05-07T11:41:31Z</updated>
<author>
<name>Guillem Jover</name>
<email>guillem@debian.org</email>
</author>
<published>2018-05-06T20:32:41Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=164f1b78d1849a0f33df7352875f86e28f5de06a'/>
<id>urn:sha1:164f1b78d1849a0f33df7352875f86e28f5de06a</id>
<content type='text'>
Prompted-by: Jakub Wilk &lt;jwilk@debian.org&gt;
</content>
</entry>
<entry>
<title>require methods to request AuxRequest capability at startup</title>
<updated>2018-01-03T18:42:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-10-27T22:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=04ab37fecaf286f724bef2e0969d2b67ab5ac1b1'/>
<id>urn:sha1:04ab37fecaf286f724bef2e0969d2b67ab5ac1b1</id>
<content type='text'>
Allowing a method to request work from other methods is a powerful
capability which could be misused or exploited, so to slightly limited
the surface let method opt-in into this capability on startup.
</content>
</entry>
</feed>
