use*_*091 4 security python centos cve centos8
我是一个长期的 linux 系统管理员,但对 CentOS 不熟悉。我只需要确定这个 CentOS 服务器是否容易受到CVE-2019-18348 的攻击。为此,我必须验证安装的软件包是否已打补丁,或者有办法测试机器上的漏洞。
我还没有找到任何可靠的方法来测试漏洞,所以我只能查看软件包版本、更改日志等。
首先,关于漏洞的一些细节:
CVE-2019-18348:在 Python 2.x 到 2.7.17 中的 urllib2 和 Python 3.x 到 3.8.0 中的 urllib 中发现了一个问题。如果攻击者控制了一个 url 参数,则 CRLF 注入是可能的,如 urllib.request.urlopen 的第一个参数所示,\r\n(特别是在 URL 的主机组件中)后跟一个 HTTP 标头。这类似于 CVE-2019-9740 查询字符串问题和 CVE-2019-9947 路径字符串问题。
当 glibc 修复了 CVE-2016-10739 时,这是不可利用的
以下是我的系统的版本详细信息:
系统已完全更新,但我没有看到启用任何安全性或反向移植存储库。我无法找到有关是否有针对 centos 的安全更新存储库以及如何启用它的任何信息。
[root@host]# yum repolist
Last metadata expiration check: 1:37:46 ago on Fri 06 Dec 2019 07:51:08 PM UTC.
repo id repo name status
AppStream CentOS-8 - AppStream 5,089
BaseOS CentOS-8 - Base 2,843
*epel Extra Packages for Enterprise Linux 8 - x86_64 3,579
extras CentOS-8 - Extras
Run Code Online (Sandbox Code Playgroud)
glibc 的更新日志没有特别列出 CVE-2019-18348。虽然 if 可能已在以前的版本中修复,但我还没有找到任何方法来检查它。
[root@host]# rpm -q --changelog glibc | grep -i cve
- Add upstream test case for CVE-2018-19591 (#1654010)
- CVE-2018-19591: File descriptor leak in if_nametoindex (#1654010)
- CVE-2018-11237: Buffer overflow in __mempcpy_avx512_no_vzeroupper (#1581275)
- CVE-2018-11236: realpath: Fix path length overflow (#1581270, swbz#22786)
- CVE-2017-18269: memory corruption in i386 memmove (#1580934)
- CVE-2017-14062, CVE-2016-6261, CVE-2016-6263:
- CVE-2018-1000001: Make getcwd fail if it cannot obtain an absolute path
- CVE-2017-16997: elf: Check for empty tokens before DST expansion (#1526866)
- CVE-2017-1000409: Count in expanded path in _dl_init_path (#1524867)
- CVE-2017-1000408: Compute correct array size in _dl_init_paths (#1524867)
- CVE-2017-17426: malloc: Fix integer overflow in tcache (swbz#22375)
- CVE-2017-15804: glob: Fix buffer overflow during GLOB_TILDE unescaping
- CVE-2017-15670: glob: Fix one-byte overflow (#1504807)
- Use execveat syscall in fexecve (swbz#22134)
Run Code Online (Sandbox Code Playgroud)
python的changlog没有显示任何CVE,而是“rhbz”数字,我认为这是redhat bugzilla。我有一些 RH 订阅,但显然不足以查看这些项目的任何详细信息。
[root@host]# rpm -q --changelog python36 | grep -i resolves
- Resolves: rhbz#1695587
- Resolves: rhbz#1658271
- Resolves: rhbz#1654867
- Resolves: rhbz#1633534
- Resolves: rhbz#1633534
- Resolves: rhbz#1633561
- Resolves: rhbz#1633534
- Resolves: rhbz#1632637
- Resolves: rhbz#1633534
- Resolves: rhbz#1615727
Run Code Online (Sandbox Code Playgroud)
此 Red Had公告修复了glibc-2.28-72.el8.x86_64.rpm 包中的CVE -2016-10739 https://access.redhat.com/errata/RHSA-2019:3513
但是由于这台机器是centos,版本是2.28-42.el8.1,而且RH和CentOS的补丁版本好像不一样,这似乎并不能帮助我确定这个盒子是否易受攻击。
如果有人能提供有关该系统是否易受攻击的见解,或为我指明正确的方向,我将不胜感激。
谢谢
遵循红帽服务咨询,您走在了正确的轨道上。CentOS 将发布解决 CVE/RHSA 上游的相同包。有时它不可用那么快。有一个适用glibc-2.28-72.el8.x86_64.rpm
于 CentOS 8的构建版本,但它看起来似乎还没有进入存储库。
https://koji.mbox.centos.org/koji/buildinfo?buildID=4751
当存储库元数据还不知道 CVE 时,它对您没有帮助。但是,dnf
如果您将运行 CentOS 系统,您可能想要熟悉安全选项。
DNF(8) DNF DNF(8)
NAME
dnf - DNF Command Reference
...
--cve=<cves>
Includes packages that fix a CVE (Common Vulnerabilities and Exposures) ID (http://cve.mitre.org/about/), Eg. CVE-2201-0123. Applicable for install,
repoquery, updateinfo, and upgrade command.
...
--security
Includes packages that provides a fix for security issue. Applicable for upgrade command.
Run Code Online (Sandbox Code Playgroud)
前任:
DNF(8) DNF DNF(8)
NAME
dnf - DNF Command Reference
...
--cve=<cves>
Includes packages that fix a CVE (Common Vulnerabilities and Exposures) ID (http://cve.mitre.org/about/), Eg. CVE-2201-0123. Applicable for install,
repoquery, updateinfo, and upgrade command.
...
--security
Includes packages that provides a fix for security issue. Applicable for upgrade command.
Run Code Online (Sandbox Code Playgroud)