低危 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.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedorapr...
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/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
运行在以下环境
系统 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 python3 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 alpine_3.15 python3 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 alpine_3.16 python3 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 alpine_edge python3 * Up to
(excluding)
3.8.7-r2
运行在以下环境
系统 amazon_2 python3 * Up to
(excluding)
3.7.9-1.amzn2.0.2
运行在以下环境
系统 amazon_AMI python3 * Up to
(excluding)
3.6.12-1.20.amzn1
运行在以下环境
系统 centos_8 python3 * Up to
(excluding)
3.6.8-37.el8
运行在以下环境
系统 debian_10 python3 * Up to
(including)
2.7.16-2+deb10u1
运行在以下环境
系统 debian_11 python3 * Up to
(including)
2.7.18-1
运行在以下环境
系统 debian_9 python3 * Up to
(excluding)
2.7.13-2+deb9u6
运行在以下环境
系统 debian_sid python3 * Up to
(including)
2.7.18-1
运行在以下环境
系统 fedora_32 python3 * Up to
(excluding)
3.9.1-2.fc32
运行在以下环境
系统 fedora_33 python3 * Up to
(excluding)
3.8.7-2.fc33
运行在以下环境
系统 fedora_34 python3 * Up to
(excluding)
3.6.13-1.fc34
运行在以下环境
系统 fedora_35 python3 * Up to
(excluding)
3.6.13-1.fc35
运行在以下环境
系统 opensuse_Leap_15.2 python3 * Up to
(excluding)
2.7.17-lp152.3.12.1
运行在以下环境
系统 oracle_7 python3 * Up to
(excluding)
2.7.5-90.0.3.el7
运行在以下环境
系统 oracle_8 python3 * Up to
(excluding)
3.6.8-31.0.3.el8
运行在以下环境
系统 redhat_8 python3 * Up to
(excluding)
3.6.8-37.el8
运行在以下环境
系统 suse_12_SP5 python3 * Up to
(excluding)
3.6.12-4.33.3
运行在以下环境
系统 ubuntu_14.04 python3 * Up to
(excluding)
3.4.3-1ubuntu1~14.04.7+esm10
运行在以下环境
系统 ubuntu_16.04 python3 * Up to
(excluding)
3.5.2-2ubuntu0~16.04.13
运行在以下环境
系统 ubuntu_16.04.7_lts python2.7 * Up to
(excluding)
2.7.12-1ubuntu0~16.04.18
运行在以下环境
系统 ubuntu_18.04 python3 * Up to
(excluding)
3.7.5-2~18.04.4
运行在以下环境
系统 ubuntu_18.04.5_lts python2.7 * Up to
(excluding)
2.7.17-1~18.04ubuntu1.6
运行在以下环境
系统 ubuntu_20.04 python3 * Up to
(excluding)
3.9.5-3~20.04.1
阿里云评分
3.8
  • 攻击路径
    远程
  • 攻击复杂度
    容易
  • 权限要求
    无需权限
  • 影响范围
    有限影响
  • EXP成熟度
    N/A
  • 补丁情况
    官方补丁
  • 数据保密性
    N/A
  • 数据完整性
    传输被破坏
  • 服务器危害
    DoS
  • 全网数量
    N/A
CWE-ID 漏洞类型
CWE-120 未进行输入大小检查的缓冲区拷贝(传统缓冲区溢出)
阿里云安全产品覆盖情况