Zum*_*rio 4 ubuntu sudo vulnerability
我有一些运行 Ubuntu 18.04.5 LTS 的服务器
在 sudo 包的上次更新中,我可以看到它sudo:amd64 1.8.21p2-3ubuntu1.4
已安装在 26/01/2021(同一天,Sudo 漏洞中的基于堆的缓冲区溢出漏洞,CVE-2021-3156 发布)
根据此列表,sudo 版本 1.8.21p2 受此漏洞影响。
但是,如果我运行 test 命令来检查系统是否易受攻击,我会得到:
# sudoedit -s /
usage: sudoedit [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p prompt] [-T timeout] [-u user] file ...
Run Code Online (Sandbox Code Playgroud)
这是系统不受此漏洞影响时的输出。
我的系统是否存在漏洞?版本列表和命令输出之间是否有任何不一致?
您正在查看的版本列表仅记录sudo
了sudo
项目本身发布的版本。Ubuntu 等发行版通常会添加补丁来解决此类安全漏洞,而不是升级到最新版本的sudo
.
要确定您的版本是否受到影响,您需要查看您的发行版提供的安全信息;在这种情况下,相关通知为USN-4705-1,表示您的版本已修复。
您还可以查看包更改日志,在/usr/share/doc/sudo/changelog.Debian.gz
; 这应该列出系统上当前安装的版本所解决的 CVE(如果有):
* SECURITY UPDATE: dir existence issue via sudoedit race
- debian/patches/CVE-2021-23239.patch: fix potential directory existing
info leak in sudoedit in src/sudo_edit.c.
- CVE-2021-23239
* SECURITY UPDATE: heap-based buffer overflow
- debian/patches/CVE-2021-3156-pre1.patch: check lock record size in
plugins/sudoers/timestamp.c.
- debian/patches/CVE-2021-3156-pre2.patch: sanity check size when
converting the first record to TS_LOCKEXCL in
plugins/sudoers/timestamp.c.
- debian/patches/CVE-2021-3156-1.patch: reset valid_flags to
MODE_NONINTERACTIVE for sudoedit in src/parse_args.c.
- debian/patches/CVE-2021-3156-2.patch: add sudoedit flag checks in
plugin in plugins/sudoers/policy.c.
- debian/patches/CVE-2021-3156-3.patch: fix potential buffer overflow
when unescaping backslashes in plugins/sudoers/sudoers.c.
- debian/patches/CVE-2021-3156-4.patch: fix the memset offset when
converting a v1 timestamp to TS_LOCKEXCL in
plugins/sudoers/timestamp.c.
- debian/patches/CVE-2021-3156-5.patch: don't assume that argv is
allocated as a single flat buffer in src/parse_args.c.
- CVE-2021-3156
Run Code Online (Sandbox Code Playgroud)