更新 Sudo (CVE-2021-3156)

Sudo 這次的安全性漏洞頗痛的:「CVE-2021-3156: Heap-Based Buffer Overflow in Sudo (Baron Samedit)」。

依照 Sudo Security Alerts 這邊的說明,這次的漏洞只要是本機有執行權限的人都有機會打穿,不需要有 sudo 帳號權限:

A potential security issue exists in sudo that could be used by a local user to gain root privileges even when not listed in the sudoers file. Affected sudo versions are 1.8.2 through 1.8.31p2 and 1.9.0 through 1.9.5p1. Sudo 1.9.5p2 and above are not affected.

不限於本來就有 sudo 帳號 (但可能可執行指令受限) 就比較麻煩了,這代表從 web 之類的管道打進去以後 (可能是 www-data 身份),就可以用這個洞取得 root 權限,另外一條路是透過資料庫打進去後 (像是 mysql 身份) 取得。

該來把一堆機器更新了...

3 thoughts on “更新 Sudo (CVE-2021-3156)”

  1. 凍仁翔 says:

    感謝分享。

    小弟剛簡單挑了幾台 Linux servers,用「sudoedit -s /」這指令試了一下,CentOS 7 全中,然後 fix 版的 sudo rpm 也還沒出來,只能先開個 issue 持續追蹤了。

Leave a Reply

Your email address will not be published. Required fields are marked *