summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] gh-102627: Replace address pointing toward malicious web page ↵Miss Islington (bot)2023-03-131-1/+1
| | | | | | | | | (GH-102630) (GH-102666) (cherry picked from commit 61479d46848bc7a7f9b571b0b09c4a4b4436d839) Co-authored-by: Blind4Basics <32236948+Blind4Basics@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.9] gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727) (GH-101751)Steve Dower2023-03-079-26/+37
| | | | | | | Fixes CVE-2023-0286 (High) and a couple of Medium security issues. https://www.openssl.org/news/secadv/20230207.txt Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Ned Deily <nad@python.org>
* [3.9] gh-101981: Fix Ubuntu SSL tests with OpenSSL (3.1.0-beta1) CI i… ↵Dong-hee Na2023-02-211-2/+2
| | | | | (#102094) [3.9] gh-101981: Fix Ubuntu SSL tests with OpenSSL (3.1.0-beta1) CI issue (gh-102079)
* [3.9] gh-101283: Improved fallback logic for subprocess with shell=True on ↵Miss Islington (bot)2023-02-093-1/+60
| | | | | | Windows (GH-101286) (#101709) Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Steve Dower <steve.dower@microsoft.com>
* gh-101422: (docs) TarFile default errorlevel argument is 1, not 0 (GH-101424)Miss Islington (bot)2023-01-301-1/+1
| | | | | (cherry picked from commit ea232716d3de1675478db3a302629ba43194c967) Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
* [3.9] Bump Azure Pipelines to ubuntu-22.04 (GH-101089) (#101214)Miss Islington (bot)2023-01-212-8/+8
| | | | | (cherry picked from commit c22a55c8b4f142ff679880ec954691d5920b7845) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.9] gh-100180: Update Windows installer to OpenSSL 1.1.1s (GH-100903) ↵Steve Dower2023-01-203-4/+5
| | | | (#100904)
* [3.9] GH-100892: Fix race in clearing `threading.local` (GH-100922) (#100939)Kumar Aditya2023-01-204-13/+75
| | | | | | | | | [3.9] [3.10] GH-100892: Fix race in clearing `threading.local` (GH-100922). (cherry picked from commit 762745a124cbc297cf2fe6f3ec9ca1840bb2e873) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>. (cherry picked from commit 683e9fe30ecd024f5508b2a33316752870100a96) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.9] gh-95778: add doc missing in some places (GH-100627). (#101066)Éric2023-01-201-0/+10
| | | | | (cherry picked from commit 46521826cb1883e29e4640f94089dd92c57efc5b) Co-authored-by: Éric <earaujo@caravan.coop>
* [3.9] Correct CVE-2020-10735 documentation (GH-100306). (#100697)Gregory P. Smith2023-01-203-7/+7
| | | | | | | (cherry picked from commit 1cf3d78c92eb07dc09d15cc2e773b0b1b9436825) (cherry picked from commit 88fe8d701af3316c8869ea18ea1c7acec6f68c04) Co-authored-by: Jeremy Paige <ucodery@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.9] Update copyright year in README (GH-100863) (GH-100865) (GH-100866)Miss Islington (bot)2023-01-091-4/+4
| | | | | | (cherry picked from commit 30a6cc418a60fccb91ba574b552203425e594c47) Co-authored-by: Ned Deily <nad@python.org> Co-authored-by: HARSHA VARDHAN <75431678+Thunder-007@users.noreply.github.com>
* [3.9] Update copyright years to 2023. (gh-100851)Benjamin Peterson2023-01-0810-14/+14
| | | | | | | | | | * [3.9] Update copyright years to 2023. (gh-100848). (cherry picked from commit 11f99323c2ae0ec428c370a335695e3d8d4afc1d) Co-authored-by: Benjamin Peterson <benjamin@python.org> * Update additional copyright years to 2023. Co-authored-by: Ned Deily <nad@python.org>
* Clarify that every thread has its own default context in contextvars (GH-99246)Miss Islington (bot)2022-12-201-0/+5
| | | | | (cherry picked from commit cb60b6131bc2bb11c48a15f808914d8b242b9fc5) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* Post 3.9.16Łukasz Langa2022-12-061-1/+1
|
* Python 3.9.16v3.9.16Łukasz Langa2022-12-0610-38/+93
|
* [3.9] gh-100001: Omit control characters in http.server stderr logs. ↵Miss Islington (bot)2022-12-064-2/+46
| | | | | | | | | | | | | | | | (GH-100002) (#100032) * gh-100001: Omit control characters in http.server stderr logs. (GH-100002) Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to. (cherry picked from commit d8ab0a4dfa48f881b4ac9ab857d2e9de42f72828) Co-authored-by: Gregory P. Smith <greg@krypto.org> * also escape \s (backport of PR #100038). * add versionadded and remove extra 'to' Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.9] gh-87604: Avoid publishing list of active per-interpreter audit hooks ↵Steve Dower2022-11-214-0/+20
| | | | via the gc module (GH-99373) (GH-99493)
* [3.9] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222) (#99230)Miss Islington (bot)2022-11-103-17/+27
| | | | | | | | | | There was an unnecessary quadratic loop in idna decoding. This restores the behavior to linear. (cherry picked from commit d315722564927c7202dd6e111dc79eaf14240b0d) (cherry picked from commit a6f6c3a3d6f2b580f2d87885c9b8a9350ad7bf15) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.9] gh-97514: Don't use Linux abstract sockets for multiprocessing ↵Miss Islington (bot)2022-10-282-5/+15
| | | | | | | | | | | | | | | | | | | (GH-98501) (#98504) Linux abstract sockets are insecure as they lack any form of filesystem permissions so their use allows anyone on the system to inject code into the process. This removes the default preference for abstract sockets in multiprocessing introduced in Python 3.9+ via https://github.com/python/cpython/pull/18866 while fixing https://github.com/python/cpython/issues/84031. Explicit use of an abstract socket by a user now generates a RuntimeWarning. If we choose to keep this warning, it should be backported to the 3.7 and 3.8 branches. (cherry picked from commit 49f61068f49747164988ffc5a442d2a63874fc17) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.9] gh-98517: Fix buffer overflows in _sha3 module (GH-98519) (#98526)Miss Islington (bot)2022-10-283-7/+18
| | | | | | | | | | | | | This is a port of the applicable part of XKCP's fix [1] for CVE-2022-37454 and avoids the segmentation fault and the infinite loop in the test cases published in [2]. [1]: https://github.com/XKCP/XKCP/commit/fdc6fef075f4e81d6b1bc38364248975e08e340a [2]: https://mouha.be/sha-3-buffer-overflow/ Regression test added by: Gregory P. Smith [Google LLC] <greg@krypto.org> (cherry picked from commit 0e4e058602d93b88256ff90bbef501ba20be9dd3) Co-authored-by: Theo Buehler <botovq@users.noreply.github.com>
* [3.9] gh-98739: Update libexpat from 2.4.9 to 2.5.0 (GH-98742) (#98786)Miss Islington (bot)2022-10-284-18/+36
| | | | | | | Update libexpat from 2.4.9 to 2.5.0 to address CVE-2022-43680. Co-authored-by: Shaun Walbridge <shaun.walbridge@gmail.com> (cherry picked from commit 3e07f827b359617664ad0880f218f17ae4483299)
* [3.9] gh-96710: Make the test timing more lenient for the int/str DoS ↵Miss Islington (bot)2022-10-111-6/+8
| | | | | | | | | | | | | | regression test. (GH-96717) (#98196) gh-96710: Make the test timing more lenient for the int/str DoS regression test. (GH-96717) A regression would still absolutely fail and even a flaky pass isn't harmful as it'd fail most of the time across our N system test runs. Windows has a low resolution timer and CI systems are prone to odd timing so this just gives more leeway to avoid flakiness. (cherry picked from commit 11e3548fd1d3445ccde971d613633b58d73c3016) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.9] gh-68966: Make mailcap refuse to match unsafe filenames/types/params ↵Miss Islington (bot)2022-10-114-4/+46
| | | | | | | | (GH-91993) (#98190) gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993) (cherry picked from commit b9509ba7a9c668b984dab876c7926fe1dc5aa0ba) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Post 3.9.15Łukasz Langa2022-10-111-1/+1
|
* Python 3.9.15v3.9.15Łukasz Langa2022-10-1111-24/+79
|
* [3.9] gh-91708: Revert params note in urllib.parse.urlparse table (GH-96699) ↵Miss Islington (bot)2022-10-071-1/+2
| | | | | | | | (#98054) Revert params note in urllib.parse.urlparse table (cherry picked from commit eed80458e8e776d15fa862da71dcce58c47e2ca7) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
* [3.9] gh-94208: Add even more TLS version/protocol checks for FreeBSD (#98037)Łukasz Langa2022-10-072-10/+18
| | | Otherwise, buildbot builds would fail since there's no TLS 1.0/1.1 support.
* [3.9] gh-97897: Prevent os.mkfifo and os.mknod segfaults with macOS 13 SDK ↵Miss Islington (bot)2022-10-063-8/+80
| | | | | | | | | | | | | (GH-97944) (#97968) The macOS 13 SDK includes support for the `mkfifoat` and `mknodat` system calls. Using the `dir_fd` option with either `os.mkfifo` or `os.mknod` could result in a segfault if cpython is built with the macOS 13 SDK but run on an earlier version of macOS. Prevent this by adding runtime support for detection of these system calls ("weaklinking") as is done for other newer syscalls on macOS. (cherry picked from commit 6d0a0191a4e5477bd843e62c24d7f3bcad4fd5fc) Co-authored-by: Ned Deily <nad@python.org>
* [3.9] gh-96848: Fix -X int_max_str_digits option parsing (GH-96988) (GH-97574)Miss Islington (bot)2022-10-043-1/+7
| | | | | | | | | | gh-96848: Fix -X int_max_str_digits option parsing (GH-96988) Fix command line parsing: reject "-X int_max_str_digits" option with no value (invalid) when the PYTHONINTMAXSTRDIGITS environment variable is set to a valid limit. (cherry picked from commit 41351662bcd21672d8ccfa62fe44d72027e6bcf8) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.9] gh-96577: Fixes buffer overrun in _msi module (GH-96633) (GH-96657)Miss Islington (bot)2022-10-042-2/+3
| | | | | | gh-96577: Fixes buffer overrun in _msi module (GH-96633) (cherry picked from commit 4114bcc9ef7595a07196bcecf9c7d6d39f57f64d) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.9] gh-95778: Mention sys.set_int_max_str_digits() in error message ↵Victor Stinner2022-10-043-4/+7
| | | | | | | | | | (#96874) (#96877) When ValueError is raised if an integer is larger than the limit, mention sys.set_int_max_str_digits() in the error message. (cherry picked from commit e841ffc915e82e5ea6e3b473205417d63494808d) Co-authored-by: Ned Deily <nad@python.org>
* [3.9] gh-97005: Update libexpat from 2.4.7 to 2.4.9 (gh-97006) (gh-97012)Miss Islington (bot)2022-10-048-17/+28
| | | | | | | | | gh-97005: Update libexpat from 2.4.7 to 2.4.9 (gh-97006) Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org> (cherry picked from commit 10e3d398c31cc1695752fc52bc6ca2ce9ef6237e) Co-authored-by: Dong-hee Na <donghee.na@python.org> Co-authored-by: Ned Deily <nad@python.org>
* [3.9] gh-97616: list_resize() checks for integer overflow (GH-97617) (GH-97627)Miss Islington (bot)2022-10-043-2/+24
| | | | | | | | | | | | | gh-97616: list_resize() checks for integer overflow (GH-97617) Fix multiplying a list by an integer (list *= int): detect the integer overflow when the new allocated length is close to the maximum size. Issue reported by Jordan Limor. list_resize() now checks for integer overflow before multiplying the new allocated length by the list item size (sizeof(PyObject*)). (cherry picked from commit a5f092f3c469b674b8d9ccbd4e4377230c9ac7cf) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.9] gh-97612: Fix shell injection in get-remote-certificate.py (GH-97613) ↵Miss Islington (bot)2022-10-042-18/+10
| | | | | | | | | | | | | | | | | | (GH-97632) gh-97612: Fix shell injection in get-remote-certificate.py (GH-97613) Fix a shell code injection vulnerability in the get-remote-certificate.py example script. The script no longer uses a shell to run "openssl" commands. Issue reported and initial fix by Caleb Shortt. Remove the Windows code path to send "quit" on stdin to the "openssl s_client" command: use DEVNULL on all platforms instead. Co-authored-by: Caleb Shortt <caleb@rgauge.com> (cherry picked from commit 83a0f44ffd8b398673ae56c310cf5768d359c341) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.9] gh-87597: Document TimeoutExpired.stdout & .stderr types (GH-97685) ↵Miss Islington (bot)2022-10-041-2/+7
| | | | | | | | | (GH-97688) This documents the behavior that has always been the case since timeout support was introduced in Python 3.3. (cherry picked from commit b05dd796492160c37c9e15e3882f699f411b3461) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.9] gh-96845: Fix docs around importlib.abc.Traversable (GH-97515) (GH-97761)Jason R. Coombs2022-10-041-2/+6
| | | Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* gh-97032: Set tkinter path for macOS CI (GH-97525)Dong-hee Na2022-09-241-1/+1
|
* Post 3.9.14Łukasz Langa2022-09-061-1/+1
|
* Python 3.9.14v3.9.14Łukasz Langa2022-09-0614-66/+121
|
* [3.9] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96502)Gregory P. Smith2022-09-0527-19/+886
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly pre-check for int-to-str conversion (#96537) 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) <= (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} < \frac{s-1}{10}$$ hence that $$\frac{L(s-1)}{M} > \frac{10}{3} > \log_2(10).$$ So $$2^{L(s-1)} > 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. <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* [3.9] gh-91423: Remove bugs.python.org from bugs.rst (GH-91425) (GH-95614)Shantanu2022-08-041-19/+20
| | | | | | | Co-authored-by: roy reznik <royreznik@gmail.com> Co-authored-by: Inada Naoki <songofacandy@gmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>. (cherry picked from commit df81d2892eed3a256eb61ce59304f2173fb0c945)
* gh-95280: Fix test_get_ciphers on systems without RSA key exchange ↵Miss Islington (bot)2022-07-292-2/+16
| | | | | | | (GH-95282) (GH-95323) (cherry picked from commit 565403038b75eb64ea483b2757ba30769246d853) Co-authored-by: Christian Heimes <christian@python.org>
* [3.9] gh-90359: Update documentation to follow PEP 495. (gh-94800). (gh-94835)Dong-hee Na2022-07-281-0/+14
| | | | | (cherry picked from commit 07374cce52abb7fd39729dc1b646ca3029b64c64) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* [3.9] gh-94208: Add more TLS version/protocol checks for FreeBSD (GH-94347) ↵Łukasz Langa2022-07-272-24/+34
| | | | | | | | (GH-95312) Three test cases were failing on FreeBSD with latest OpenSSL. (cherry picked from commit 1bc86c26253befa006c0f52eebb6ed633c7d1e5c) Co-authored-by: Christian Heimes <christian@python.org>
* gh-94821: Fix autobind of empty unix domain address (GH-94826) (GH-94875)Miss Islington (bot)2022-07-263-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When binding a unix socket to an empty address on Linux, the socket is automatically bound to an available address in the abstract namespace. >>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) >>> s.bind("") >>> s.getsockname() b'\x0075499' Since python 3.9, the socket is bound to the one address: >>> s.getsockname() b'\x00' And trying to bind multiple sockets will fail with: Traceback (most recent call last): File "/home/nsoffer/src/cpython/Lib/test/test_socket.py", line 5553, in testAutobind s2.bind("") OSError: [Errno 98] Address already in use Added 2 tests: - Auto binding empty address on Linux - Failing to bind an empty address on other platforms Fixes f6b3a07b7df6 (bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) (cherry picked from commit c22f134211743cd5ad14cec1dd4f527bee542b4c) Co-authored-by: Nir Soffer <nsoffer@redhat.com>
* [3.9] gh-90355: Add isolated flag if currently isolated (GH-92857) (GH-94570)Łukasz Langa2022-07-052-1/+7
| | | | | | | Co-authored-by: Carter Dodd <carter.dodd@gmail.com> Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit c8556bcf6c0b05ac46bd74880626a2853e7c99a1)
* gh-81054: Document that SimpleHTTPRequestHandler follows symbolic links ↵Miss Islington (bot)2022-07-012-2/+13
| | | | | | | (GH-94416) (GH-94494) (cherry picked from commit 80aaeabb8bd1e6b49598a7e23e0f8d99b3fcecaf) Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
* gh-91172: Create a workflow for verifying bundled pip and setuptools ↵Miss Islington (bot)2022-06-223-0/+128
| | | | | | | | | (GH-31885) (GH-94123) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> (cherry picked from commit d36954b7ead06daead3dcf9b0dd9f8002eab508f) Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
* gh-87389: Fix an open redirection vulnerability in http.server. (GH-93879) ↵Miss Islington (bot)2022-06-223-2/+61
| | | | | | | | | | | | | (GH-94093) 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 <greg@krypto.org>
* gh-91810: Fix regression with writing an XML declaration with ↵Miss Islington (bot)2022-06-163-20/+10
| | | | | | | | | | | | | encoding='unicode' (GH-93426) (GH-93791) Suppress writing an XML declaration in open files in ElementTree.write() with encoding='unicode' and xml_declaration=None. If file patch is passed to ElementTree.write() with encoding='unicode', always open a new file in UTF-8. (cherry picked from commit d7db9dc3cc5b44d0b4ce000571fecf58089a01ec) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>