cpython/Lib/test/support
Gregory P. Smith f8b71da9aa
[3.11] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96500)
Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.

This PR comes fresh from a pile of work done in our private PSRT security response team repo.

This backports https://github.com/python/cpython/pull/96499 aka 511ca94520

Signed-off-by: Christian Heimes [Red Hat] <christian@python.org>
Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org>
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).

<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->

I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).
2022-09-02 09:48:57 -07:00
..
__init__.py [3.11] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96500) 2022-09-02 09:48:57 -07:00
bytecode_helper.py
hashlib_helper.py bpo-45042: Now test classes decorated with requires_hashdigest are not skipped (GH-28060) 2021-09-04 23:42:36 +03:00
import_helper.py bpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH-31204) 2022-02-07 17:09:07 -08:00
interpreters.py
logging_helper.py
os_helper.py gh-90473: Fix more tests on platforms without umask (GH-95164) 2022-07-23 03:51:29 -07:00
script_helper.py bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615) 2022-01-25 08:09:06 +01:00
socket_helper.py gh-90473: WASI: skip gethostname tests (GH-93092) 2022-05-23 08:21:45 -07:00
testresult.py bpo-46126: Restore 'descriptions' when running tests internally. (GH-32128) 2022-04-03 12:33:28 -07:00
threading_helper.py gh-84461: Add sys._emscripten_info, improve docs and build (gh-91781) 2022-04-23 09:52:16 +02:00
warnings_helper.py bpo-47061: deprecate the aifc module (GH-32134) 2022-04-05 12:05:48 -07:00