Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Python applications that accept floating-point numbers as untrusted input. Reference: https://bugs.python.org/issue42938 https://github.com/python/cpython/pull/24239
Created mingw-python3 tracking bugs for this issue: Affects: fedora-all [bug 1918175] Created python3 tracking bugs for this issue: Affects: fedora-all [bug 1918177] Created python34 tracking bugs for this issue: Affects: epel-all [bug 1918176] Affects: fedora-all [bug 1918169] Created python35 tracking bugs for this issue: Affects: fedora-all [bug 1918170] Created python36 tracking bugs for this issue: Affects: fedora-all [bug 1918172] Created python37 tracking bugs for this issue: Affects: fedora-all [bug 1918173] Created python39 tracking bugs for this issue: Affects: fedora-all [bug 1918174]
I've asked Ned Deily to include the (already merged) fix in the upcoming 3.7.10 and 3.6.13 security releases.
(In reply to Miro Hrončok from comment #3) > I've asked Ned Deily to include the (already merged) fix in the upcoming > 3.7.10 and 3.6.13 security releases. "Ned has postponed the upcoming security releases for the issue. Benjamin's fix has landed two days ago. The fixes will be included in 3.7.10 and 3.6.13."
Other expected releases: 3.10.0a5: Monday, 2021-02-01 3.9.2rc1: Monday, 2021-02-01 3.9.2: Monday, 2021-02-15 3.8.8rc1: Monday, 2021-02-01 3.8.8: Monday, 2021-02-15
Created python2.7 tracking bugs for this issue: Affects: fedora-all [bug 1918659] Created python26 tracking bugs for this issue: Affects: fedora-all [bug 1918660] Created python27 tracking bugs for this issue: Affects: fedora-all [bug 1918661] Created python3.10 tracking bugs for this issue: Affects: fedora-all [bug 1918662] Created python3.5 tracking bugs for this issue: Affects: fedora-all [bug 1918663] Created python3.6 tracking bugs for this issue: Affects: fedora-all [bug 1918665] Created python3.7 tracking bugs for this issue: Affects: fedora-all [bug 1918666] Created python3.8 tracking bugs for this issue: Affects: fedora-all [bug 1918668] Created python3.9 tracking bugs for this issue: Affects: fedora-all [bug 1918669]
This issue affects also Python 2 versions, not only Python 3.
The issue is in function PyCArg_repr(), which constructs a string to return to the caller by using a buffer allocated on the stack with a size of 256 bytes. This buffer is filled with the sprintf function and the input is not validated, thus it is possible to overflow the buffer when executing the sprintf. Function PyCArg_rep() is called when for example you execute the `from_param` method.
Statement: This flaw could have had a higher Impact, however our packages are compiled with FORTIFY_SOURCE, which provides runtime protection to some memory and string functions and prevents this flaw from actually overwriting the buffer and potentially executing code.
(In reply to Miro Hrončok from comment #4) > (In reply to Miro Hrončok from comment #3) > > I've asked Ned Deily to include the (already merged) fix in the upcoming > > 3.7.10 and 3.6.13 security releases. > > "Ned has postponed the upcoming security releases for the issue. > Benjamin's fix has landed two days ago. The fixes will be included in > 3.7.10 and 3.6.13." The releases are postponed due to another security issue: https://bugs.python.org/issue42988 "Resolution of this issue is blocking 3.7.x and 3.6.x security releases and threatens to block upcoming maintenance releases."
FEDORA-2021-e062e195e1 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-7fa9dc84d4 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2021:1633 https://access.redhat.com/errata/RHSA-2021:1633
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2021-3177
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2021:1761 https://access.redhat.com/errata/RHSA-2021:1761
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2021:1879 https://access.redhat.com/errata/RHSA-2021:1879
This issue has been addressed in the following products: Red Hat Software Collections for Red Hat Enterprise Linux 7 Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS Via RHSA-2021:3252 https://access.redhat.com/errata/RHSA-2021:3252
This issue has been addressed in the following products: Red Hat Software Collections for Red Hat Enterprise Linux 7 Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS Via RHSA-2021:3254 https://access.redhat.com/errata/RHSA-2021:3254
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2022:5235 https://access.redhat.com/errata/RHSA-2022:5235