
cve-2021-3156;sudo堆溢出漏洞;漏洞检测
A foreign research team discovered a sudo heap overflow vulnerability (CVE-2021-3156), which had been hidden for a decade. An ordinary user can exploit this vulnerability to gain root privileges on a sudo host with default configuration. Vulnerability details have been publicly disclosed on the internet.
CVE-2021-3156
High
All versions from 1.8.2 to 1.8.31p2
All stable versions from 1.9.0 to 1.9.5p1
Sudo 1.9.5p2 or later
Local privilege escalation
Redhat and other Linux distributions have urgently released fix patches. Users are advised to upgrade as soon as possible:
CentOS system users:
CentOS 6: Default sudo is within the affected range. CentOS official support has been discontinued;
CentOS 7: Upgrade to sudo-1.8.23-10.el7_9.1 or later;
CentOS 8: Upgrade to sudo-1.8.29-6.el8_3.1 or later.
Ubuntu system users:
sudo - 1.8.31-1ubuntu1.2
sudo-ldap - 1.8.31-1ubuntu1.2
sudo - 1.8.21p2-3ubuntu1.4
sudo-ldap - 1.8.21p2-3ubuntu1.4
sudo - 1.8.16-0ubuntu1.10
sudo-ldap - 1.8.16-0ubuntu1.10
It is recommended to back up your data before upgrading to avoid any unexpected issues.
This bash script is the detection script officially provided by Red Hat!
If you came here looking for an exploit, there isn't one. Give it a star and let's learn together!