低危 Python 缓冲区错误漏洞

CVE编号

CVE-2021-3177

利用情况

暂无

补丁情况

官方补丁

披露时间

2021-01-19
漏洞描述
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, as demonstrated by a 1e300 argument to c_double.from_param. This occurs because sprintf is used unsafely.
解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。
参考链接
https://bugs.python.org/issue42938
https://github.com/python/cpython/pull/24239
https://lists.apache.org/thread.html/rf9fa47ab66495c78bb4120b0754dd9531ca2ff0...
https://lists.debian.org/debian-lts-announce/2021/04/msg00005.html
https://lists.debian.org/debian-lts-announce/2022/02/msg00013.html
https://lists.debian.org/debian-lts-announce/2023/05/msg00024.html
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedora...
https://news.ycombinator.com/item?id=26185005
https://python-security.readthedocs.io/vuln/ctypes-buffer-overflow-pycarg_repr.html
https://security.gentoo.org/glsa/202101-18
https://security.netapp.com/advisory/ntap-20210226-0003/
https://www.oracle.com//security-alerts/cpujul2021.html
https://www.oracle.com/security-alerts/cpujan2022.html
https://www.oracle.com/security-alerts/cpujul2022.html
https://www.oracle.com/security-alerts/cpuoct2021.html
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
应用 python python * From
(including)
3.6.0
Up to
(including)
3.6.12
运行在以下环境
应用 python python * From
(including)
3.7.0
Up to
(including)
3.7.9
运行在以下环境
应用 python python * From
(including)
3.8.0
Up to
(including)
3.8.7
运行在以下环境
应用 python python * From
(including)
3.9.0
Up to
(including)
3.9.1
运行在以下环境
系统 alibaba_cloud_linux_2.1903 python * Up to
(excluding)
2.7.5-92.1.al7
运行在以下环境
系统 alibaba_cloud_linux_3 python3 * Up to
(excluding)
3.6.8-39.1.al8
运行在以下环境
系统 alpine_3.10 python3 * Up to
(excluding)
3.7.7-r2
运行在以下环境
系统 alpine_3.11 python3 * Up to
(excluding)
3.8.2-r2
运行在以下环境
系统 alpine_3.12 python3 * Up to
(excluding)
3.8.5-r1
运行在以下环境
系统 alpine_3.13 python3 * Up to
(excluding)
3.8.7-r1
运行在以下环境
系统 alpine_3.14 python2 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 alpine_3.15 python2 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 alpine_3.16 python3 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 alpine_3.17 python3 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 alpine_3.18 python3 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 alpine_3.19 python3 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 amazon_2 python * Up to
(excluding)
2.7.18-1.amzn2.0.3
运行在以下环境
系统 amazon_AMI python27 * Up to
(excluding)
3.6.12-1.20.amzn1
运行在以下环境
系统 anolis_os_7 python * Up to
(excluding)
2.7.5-92.0.1
运行在以下环境
系统 anolis_os_8 python3 * Up to
(excluding)
3.6.8-47.0.1
运行在以下环境
系统 centos_7 python * Up to
(excluding)
2.7.5-92.el7_9
运行在以下环境
系统 debian_10 python2.7 * Up to
(excluding)
2.7.16-2+deb10u2
运行在以下环境
系统 debian_11 python2.7 * Up to
(excluding)
2.7.18-2
运行在以下环境
系统 debian_9 python2.7 * Up to
(excluding)
2.7.13-2+deb9u6
运行在以下环境
系统 fedora_32 python3 * Up to
(excluding)
3.8.7-2.fc32
运行在以下环境
系统 fedora_33 python3 * Up to
(excluding)
3.9.1-2.fc33
运行在以下环境
系统 fedora_34 python3.6 * Up to
(excluding)
3.6.13-1.fc34
运行在以下环境
系统 fedora_35 python3.6 * Up to
(excluding)
3.6.13-1.fc35
运行在以下环境
系统 kylinos_aarch64_V10SP1 python3 * Up to
(excluding)
3.7.9-6.ky10
运行在以下环境
系统 kylinos_aarch64_V10SP2 python3 * Up to
(excluding)
3.7.9-6.ky10
运行在以下环境
系统 kylinos_x86_64_V10SP1 python3 * Up to
(excluding)
3.7.9-6.ky10
运行在以下环境
系统 kylinos_x86_64_V10SP2 python3 * Up to
(excluding)
3.7.9-6.ky10
运行在以下环境
系统 opensuse_Leap_15.2 python * Up to
(excluding)
2.7.17-lp152.3.12.1
运行在以下环境
系统 oracle_7 python * Up to
(excluding)
2.7.5-92.0.1.el7_9
运行在以下环境
系统 oracle_8 python3-libs * Up to
(excluding)
3.6.8-37.0.1.el8
运行在以下环境
系统 redhat_7 python * Up to
(excluding)
2.7.5-92.el7_9
运行在以下环境
系统 redhat_8 python3-idle * Up to
(excluding)
3.6.8-37.el8
运行在以下环境
系统 rocky_linux_8 python-dns * Up to
(excluding)
0.23-19.el8
运行在以下环境
系统 suse_12_SP5 python * Up to
(excluding)
2.7.17-28.64.1
运行在以下环境
系统 ubuntu_16.04 python2.7 * Up to
(excluding)
3.5.2-2ubuntu0~16.04.13
运行在以下环境
系统 ubuntu_18.04 python3.6 * Up to
(excluding)
2.7.17-1~18.04ubuntu1.6
运行在以下环境
系统 ubuntu_20.04 python3.8 * Up to
(excluding)
2.7.18-1~20.04.1
阿里云评分
3.8
  • 攻击路径
    远程
  • 攻击复杂度
    容易
  • 权限要求
    无需权限
  • 影响范围
    有限影响
  • EXP成熟度
    N/A
  • 补丁情况
    官方补丁
  • 数据保密性
    N/A
  • 数据完整性
    传输被破坏
  • 服务器危害
    DoS
  • 全网数量
    N/A
CWE-ID 漏洞类型
CWE-120 未进行输入大小检查的缓冲区拷贝(传统缓冲区溢出)
阿里云安全产品覆盖情况