Oh no, you're thinking, yet another cookie pop-up. Well, sorry, it's the law. We measure how many people read us, and ensure you see relevant ads, by storing cookies on your device. If you're cool with that, hit “Accept all Cookies”. For more info and to customize your settings, hit “Customize Settings”.

Review and manage your consent

Here's an overview of our use of cookies, similar technologies and how to manage them. You can also change your choices at any time, by hitting the “Your Consent Options” link on the site's footer.

Manage Cookie Preferences
  • These cookies are strictly necessary so that you can navigate the site as normal and use all features. Without these cookies we cannot provide you with the service that you expect.

  • These cookies are used to make advertising messages more relevant to you. They perform functions like preventing the same ad from continuously reappearing, ensuring that ads are properly displayed for advertisers, and in some cases selecting advertisements that are based on your interests.

  • These cookies collect information in aggregate form to help us understand how our websites are being used. They allow us to count visits and traffic sources so that we can measure and improve the performance of our sites. If people say no to these cookies, we do not know how many people have visited and we cannot monitor performance.

See also our Cookie policy and Privacy policy.

This article is more than 1 year old

Oh ****... Sudo has a 'make anyone root' bug that needs to be patched – if you're unlucky enough to enable pwfeedback

Most distros unaffected unless defaults were changed, but do check

Sudo, a standard tool on Unix-y operating systems that lets select users run some or all commands as root, can be exploited to give superpowers to any logged-in user – if deployed with a non-default configuration.

This security hole, discovered by Joe Vennix at Apple Information Security, is only active if the pwfeedback option is enabled. This option shows an asterisk each time a key is pressed, when entering a password. The good news is that pwfeedback is generally disabled by default.

Sudo is included in macOS, but this option was not enabled when we tried it on our Catalina box. However, a few Linux distributions – seemingly Mint and Elementary OS – do enable the option. The purpose of the feature, as its name implies, is to reassure users that they are not typing into a black hole.

If sudo is installed and vulnerable, any user can trigger the vulnerability, even if not listed in the sudoers list of those with sudo privileges.

Linux Mint is vulnerable to the flaw discovered in sudo

Linux Mint is vulnerable to the flaw discovered in sudo

Like many programming blunders, this is a buffer overflow issue. "The code that erases the line of asterisks does not properly reset the buffer position if there is a write error, but it does reset the remaining buffer length. As a result, the getln() function can write past the end of the buffer," the sudo developers explain. There is also a flaw that means the pwfeedback option is not ignored, even when reading from something other than a terminal device.

You can tell if you are vulnerable by running sudo -l and checking the output. If the word pwfeedback appears under Matching Defaults entries, it is potentially at risk. The next thing to do is to check the version number with sudo --version. Versions 1.7.1 to 1.8.25p1 inclusive are vulnerable. The bug is fixed in sudo 1.8.31, available now, and versions 1.8.26 to 1.8.30 are not exploitable.

Our brand-new install of Linux Mint was indeed affected, with pwfeedback enabled.

The solution is to disable pwfeedback in the sudoers file, as explained in the linked article, or update to a fixed version. ®

 

Similar topics

Similar topics

Similar topics

TIP US OFF

Send us news


Other stories you might like