<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git, branch v3.8.14</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>Python 3.8.14</title>
<updated>2022-09-06T20:59:22+00:00</updated>
<author>
<name>Łukasz Langa</name>
<email>lukasz@langa.pl</email>
</author>
<published>2022-09-06T18:54:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f43e7678a1443b2583fc9bfba091b8ca7e38f075'/>
<id>f43e7678a1443b2583fc9bfba091b8ca7e38f075</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[3.8] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96503)</title>
<updated>2022-09-05T20:26:09+00:00</updated>
<author>
<name>Gregory P. Smith</name>
<email>greg@krypto.org</email>
</author>
<published>2022-09-05T20:26:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b5e331fdb38684808ffc540d53e8595bdc408b89'/>
<id>b5e331fdb38684808ffc540d53e8595bdc408b89</id>
<content type='text'>
* Correctly pre-check for int-to-str conversion

Converting a large enough `int` to a decimal string raises `ValueError` as expected. However, the raise comes _after_ the quadratic-time base-conversion algorithm has run to completion. For effective DOS prevention, we need some kind of check before entering the quadratic-time loop. Oops! =)

The quick fix: essentially we catch _most_ values that exceed the threshold up front. Those that slip through will still be on the small side (read: sufficiently fast), and will get caught by the existing check so that the limit remains exact.

The justification for the current check. The C code check is:
```c
max_str_digits / (3 * PyLong_SHIFT) &lt;= (size_a - 11) / 10
```

In GitHub markdown math-speak, writing $M$ for `max_str_digits`, $L$ for `PyLong_SHIFT` and $s$ for `size_a`, that check is:
$$\left\lfloor\frac{M}{3L}\right\rfloor \le \left\lfloor\frac{s - 11}{10}\right\rfloor$$

From this it follows that
$$\frac{M}{3L} &lt; \frac{s-1}{10}$$
hence that
$$\frac{L(s-1)}{M} &gt; \frac{10}{3} &gt; \log_2(10).$$
So
$$2^{L(s-1)} &gt; 10^M.$$
But our input integer $a$ satisfies $|a| \ge 2^{L(s-1)}$, so $|a|$ is larger than $10^M$. This shows that we don't accidentally capture anything _below_ the intended limit in the check.

&lt;!-- gh-issue-number: gh-95778 --&gt;
* Issue: gh-95778
&lt;!-- /gh-issue-number --&gt;

Co-authored-by: Gregory P. Smith [Google LLC] &lt;greg@krypto.org&gt;
Co-authored-by: Christian Heimes &lt;christian@python.org&gt;
Co-authored-by: Mark Dickinson &lt;dickinsm@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Correctly pre-check for int-to-str conversion

Converting a large enough `int` to a decimal string raises `ValueError` as expected. However, the raise comes _after_ the quadratic-time base-conversion algorithm has run to completion. For effective DOS prevention, we need some kind of check before entering the quadratic-time loop. Oops! =)

The quick fix: essentially we catch _most_ values that exceed the threshold up front. Those that slip through will still be on the small side (read: sufficiently fast), and will get caught by the existing check so that the limit remains exact.

The justification for the current check. The C code check is:
```c
max_str_digits / (3 * PyLong_SHIFT) &lt;= (size_a - 11) / 10
```

In GitHub markdown math-speak, writing $M$ for `max_str_digits`, $L$ for `PyLong_SHIFT` and $s$ for `size_a`, that check is:
$$\left\lfloor\frac{M}{3L}\right\rfloor \le \left\lfloor\frac{s - 11}{10}\right\rfloor$$

From this it follows that
$$\frac{M}{3L} &lt; \frac{s-1}{10}$$
hence that
$$\frac{L(s-1)}{M} &gt; \frac{10}{3} &gt; \log_2(10).$$
So
$$2^{L(s-1)} &gt; 10^M.$$
But our input integer $a$ satisfies $|a| \ge 2^{L(s-1)}$, so $|a|$ is larger than $10^M$. This shows that we don't accidentally capture anything _below_ the intended limit in the check.

&lt;!-- gh-issue-number: gh-95778 --&gt;
* Issue: gh-95778
&lt;!-- /gh-issue-number --&gt;

Co-authored-by: Gregory P. Smith [Google LLC] &lt;greg@krypto.org&gt;
Co-authored-by: Christian Heimes &lt;christian@python.org&gt;
Co-authored-by: Mark Dickinson &lt;dickinsm@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.8] gh-90359: Update documentation to follow PEP 495. (gh-94800). (GH-94834)</title>
<updated>2022-07-28T19:30:13+00:00</updated>
<author>
<name>Dong-hee Na</name>
<email>donghee.na@python.org</email>
</author>
<published>2022-07-28T19:30:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4f100fe9f1c691145e3fa959ef324646e303cdf3'/>
<id>4f100fe9f1c691145e3fa959ef324646e303cdf3</id>
<content type='text'>
(cherry picked from commit 07374cce52abb7fd39729dc1b646ca3029b64c64)

Co-authored-by: Dong-hee Na &lt;donghee.na@python.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 07374cce52abb7fd39729dc1b646ca3029b64c64)

Co-authored-by: Dong-hee Na &lt;donghee.na@python.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.8] gh-94208: Add more TLS version/protocol checks for FreeBSD (GH-94347) (GH-95313)</title>
<updated>2022-07-27T21:43:29+00:00</updated>
<author>
<name>Łukasz Langa</name>
<email>lukasz@langa.pl</email>
</author>
<published>2022-07-27T21:43:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=48b323ed847ce0cb1a13e31d93781ca48e71f1ae'/>
<id>48b323ed847ce0cb1a13e31d93781ca48e71f1ae</id>
<content type='text'>
Three test cases were failing on FreeBSD with latest OpenSSL.
(cherry picked from commit 1bc86c26253befa006c0f52eebb6ed633c7d1e5c)

Co-authored-by: Christian Heimes &lt;christian@python.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Three test cases were failing on FreeBSD with latest OpenSSL.
(cherry picked from commit 1bc86c26253befa006c0f52eebb6ed633c7d1e5c)

Co-authored-by: Christian Heimes &lt;christian@python.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.8] gh-90355: Add isolated flag if currently isolated (GH-92857) (GH-94571)</title>
<updated>2022-07-05T16:07:36+00:00</updated>
<author>
<name>Łukasz Langa</name>
<email>lukasz@langa.pl</email>
</author>
<published>2022-07-05T16:07:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f78733b332966cef7d0c61165389549f4ffe0727'/>
<id>f78733b332966cef7d0c61165389549f4ffe0727</id>
<content type='text'>
Co-authored-by: Carter Dodd &lt;carter.dodd@gmail.com&gt;
Co-authored-by: Éric &lt;merwok@netwok.org&gt;
Co-authored-by: Łukasz Langa &lt;lukasz@langa.pl&gt;
(cherry picked from commit c8556bcf6c0b05ac46bd74880626a2853e7c99a1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Carter Dodd &lt;carter.dodd@gmail.com&gt;
Co-authored-by: Éric &lt;merwok@netwok.org&gt;
Co-authored-by: Łukasz Langa &lt;lukasz@langa.pl&gt;
(cherry picked from commit c8556bcf6c0b05ac46bd74880626a2853e7c99a1)
</pre>
</div>
</content>
</entry>
<entry>
<title>[3.8] gh-81054: Document that SimpleHTTPRequestHandler follows symbolic links (GH-94416) (GH-94495)</title>
<updated>2022-07-01T16:42:13+00:00</updated>
<author>
<name>Łukasz Langa</name>
<email>lukasz@langa.pl</email>
</author>
<published>2022-07-01T16:42:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=bd0f2a1955f99dc504d6c7bed495ec2a0ee74859'/>
<id>bd0f2a1955f99dc504d6c7bed495ec2a0ee74859</id>
<content type='text'>
(cherry picked from commit 80aaeabb8bd1e6b49598a7e23e0f8d99b3fcecaf)

Co-authored-by: Sam Ezeh &lt;sam.z.ezeh@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 80aaeabb8bd1e6b49598a7e23e0f8d99b3fcecaf)

Co-authored-by: Sam Ezeh &lt;sam.z.ezeh@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-91172: Create a workflow for verifying bundled pip and setuptools (GH-31885) (GH-94124)</title>
<updated>2022-06-22T14:07:57+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-06-22T14:07:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=51f1ae5ceb0673316c4e4b0175384e892e33cc6e'/>
<id>51f1ae5ceb0673316c4e4b0175384e892e33cc6e</id>
<content type='text'>
Co-authored-by: Hugo van Kemenade &lt;hugovk@users.noreply.github.com&gt;
Co-authored-by: Adam Turner &lt;9087854+AA-Turner@users.noreply.github.com&gt;
(cherry picked from commit d36954b7ead06daead3dcf9b0dd9f8002eab508f)

Co-authored-by: Illia Volochii &lt;illia.volochii@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Hugo van Kemenade &lt;hugovk@users.noreply.github.com&gt;
Co-authored-by: Adam Turner &lt;9087854+AA-Turner@users.noreply.github.com&gt;
(cherry picked from commit d36954b7ead06daead3dcf9b0dd9f8002eab508f)

Co-authored-by: Illia Volochii &lt;illia.volochii@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-87389: Fix an open redirection vulnerability in http.server. (GH-93879) (GH-94094)</title>
<updated>2022-06-22T08:42:52+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-06-22T08:42:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4dc2cae3abd75f386374d0635d00443b897d0672'/>
<id>4dc2cae3abd75f386374d0635d00443b897d0672</id>
<content type='text'>
Fix an open redirection vulnerability in the `http.server` module when
an URI path starts with `//` that could produce a 301 Location header
with a misleading target.  Vulnerability discovered, and logic fix
proposed, by Hamza Avvan (@hamzaavvan).

Test and comments authored by Gregory P. Smith [Google].
(cherry picked from commit 4abab6b603dd38bec1168e9a37c40a48ec89508e)

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix an open redirection vulnerability in the `http.server` module when
an URI path starts with `//` that could produce a 301 Location header
with a misleading target.  Vulnerability discovered, and logic fix
proposed, by Hamza Avvan (@hamzaavvan).

Test and comments authored by Gregory P. Smith [Google].
(cherry picked from commit 4abab6b603dd38bec1168e9a37c40a48ec89508e)

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-83728: Add hmac.new default parameter deprecation (GH-91939) (GH-93547)</title>
<updated>2022-06-06T17:10:34+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-06-06T17:10:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=5776f724c1957d75bd4ba0c26eab2caee9484089'/>
<id>5776f724c1957d75bd4ba0c26eab2caee9484089</id>
<content type='text'>
(cherry picked from commit 56b5daf15970be449d44e91f08db84c698ac5506)

Co-authored-by: Stanley &lt;46876382+slateny@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 56b5daf15970be449d44e91f08db84c698ac5506)

Co-authored-by: Stanley &lt;46876382+slateny@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170) (GH-92954)</title>
<updated>2022-06-06T16:46:16+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-06-06T16:46:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=067c37207449a5315abd6c3b8c0527145b6729b9'/>
<id>067c37207449a5315abd6c3b8c0527145b6729b9</id>
<content type='text'>
(cherry picked from commit 2985feac4e02d590bb78bcce9e30864be53280ac)

Co-authored-by: Christian Heimes &lt;christian@python.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 2985feac4e02d590bb78bcce9e30864be53280ac)

Co-authored-by: Christian Heimes &lt;christian@python.org&gt;</pre>
</div>
</content>
</entry>
</feed>
