https://github.com/python/cpython
Revision 15ec1afd4fcd2da1e2d2b256c562fb42d8d886a2 authored by Gregory P. Smith on 06 September 2022, 05:24:36 UTC, committed by GitHub on 06 September 2022, 05:24:36 UTC
Converting between `int` and `str` in bases other than 2 (binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) now raises a `ValueError` if the number of digits in string form is above a limit to avoid potential denial of service attacks due to the algorithmic complexity. This is a mitigation for CVE-2020-10735 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10735). This new limit can be configured or disabled by environment variable, command line flag, or :mod:`sys` APIs. See the `Integer String Conversion Length Limitation` documentation. The default limit is 4300 digits in string form. Patch by Gregory P. Smith [Google] and Christian Heimes [Red Hat] with feedback from Victor Stinner, Thomas Wouters, Steve Dower, Ned Deily, and Mark Dickinson.
1 parent d5fe995
Tip revision: 15ec1afd4fcd2da1e2d2b256c562fb42d8d886a2 authored by Gregory P. Smith on 06 September 2022, 05:24:36 UTC
[3.7] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (GH-96504)
[3.7] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (GH-96504)
Tip revision: 15ec1af
File | Mode | Size |
---|---|---|
.azure-pipelines | ||
.github | ||
Doc | ||
Grammar | ||
Include | ||
Lib | ||
Mac | ||
Misc | ||
Modules | ||
Objects | ||
PC | ||
PCbuild | ||
Parser | ||
Programs | ||
Python | ||
Tools | ||
m4 | ||
.gitattributes | -rw-r--r-- | 1.6 KB |
.gitignore | -rw-r--r-- | 1.5 KB |
.travis.yml | -rw-r--r-- | 6.1 KB |
CODE_OF_CONDUCT.rst | -rw-r--r-- | 631 bytes |
LICENSE | -rw-r--r-- | 12.5 KB |
Makefile.pre.in | -rw-r--r-- | 63.3 KB |
README.rst | -rw-r--r-- | 9.6 KB |
aclocal.m4 | -rw-r--r-- | 10.7 KB |
config.guess | -rwxr-xr-x | 43.1 KB |
config.sub | -rwxr-xr-x | 35.4 KB |
configure | -rwxr-xr-x | 492.2 KB |
configure.ac | -rw-r--r-- | 164.9 KB |
install-sh | -rwxr-xr-x | 7.0 KB |
pyconfig.h.in | -rw-r--r-- | 42.3 KB |
setup.py | -rw-r--r-- | 101.3 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...