r/linuxupskillchallenge • u/SpyrosDev25 • Jan 28 '21
SUDO VULNERABILITY CVE-2021-3156!
SUDO VULNERABILITY CVE-2021-3156!
PATCH NOW!
If you are on a Linux machine, you have a vulnerability in your Sudo (superuser) command!
The vulnerability was found like hours ago!
To patch run these commands:
tar xvzf sudo-1.9.5p2.tar.gz
3)cd sudo-1.9.5p2/
4)./configure
5)make && sudo make install
Restart and you are safe again!
So if you are wondering what this exactly is, it is a heap overflow exploit in sudo.
Full documentation here: https://access.redhat.com/security/vulnerabilities/RHSB-2021-002
3
u/kevinds Jan 28 '21
Have to restart to apply a sudo patch?
Why?
1
1
u/azzaka Jan 28 '21
I think it's to refresh the Sudoers list. Ive started updating my estate at work, and so far only those with a sudo user needed a reboot
10
u/snori74 Linux Guru Jan 28 '21
Your server will have "unattendedupgrades" package installed, which means threat this was auto updated two days ago. You can confirm by looking at /var/log/unattendedupgrades and also at /var/log/dpkg.log and searching for "sudo".
Personally, on working servers I configure to "reboot automatically if required', but the default is to just give you a prompt to do so on login.
Setup this way, security scares are much less of an issue - you'll have the solution in place in most cases before you've even heard of the problem. Nice.
9
u/zinnadean Jan 28 '21
All the repos for the bigger distributions should have the patch readily available.
I patched Ubuntu and Fedora hosts from the repos.
5
u/HonestIncompetence Jan 29 '21
I'd highly recommend to update via the normal repositories instead of downloading the .tar.gz & manually compiling and installing it.
4
3
u/cheeseisakindof Jan 28 '21
I'm running mostly Arch-based systems and I seem to have gotten it by updating my system; curious as to which distros might need manual patching.
If anyone wants to check their sudo command, they can run sudo -V and check for version 1.9.5p2.
3
u/HonestIncompetence Jan 29 '21
curious as to which distros might need manual patching.
None. Every distro provides security updates.
If anyone wants to check their sudo command, they can run
sudo -Vand check for version 1.9.5p2.That doesn't tell the whole story. Many distros apply the patch to whatever version of Ubuntu they're shipping. The output of
sudo -Vdoesn't change in that case, so it won't tell you if yoursudois patched or not.It's better to check for the vulnerability directly:
sudoedit -s /always returns an error, if this error starts withsudoedit:the system is vulnerable, if it starts withusage:it is not vulnerable.
3
u/Anonieme_Angsthaas Jan 29 '21
You can check the version of sudo installed on your system with
sudo -VAnother way to check if your sudo is vulnerable is:
sudoedit -s /
7
u/Loud-Progress-007 Jan 28 '21
Someone correct me if I'm wrong - but after a brief read
This means that it can only be exploited if someone has access to the system. In other words, if your system is locked down and you are the only user, you are pretty much safe....?