Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

46 points by runxiyu


jmtd

I’m fairly sure this actually fixes another security problem. Vanilla sudo is reading the password using Line buffering. So if you type your password and don’t press enter to submit it and then wait long enough, or something else kills the sudo process, your password will end up being echoed to the underlying shell in the clear.

You see the same behaviour in systemd’s password reading, which I think is polkit. Can’t remember if su suffers it as well.

kiwec

Intuitively it feels like, for an over-the-shoulder attack, it would be much more effective to look at the keyboard rather than at the screen.

natano

From the article:

[...] First, the security benefit of hiding password length is negligible in practice — anyone close enough to count asterisks on a screen is close enough to hear or watch your keystrokes directly. Second, and more pointedly, most users’ sudo password is the same as their login password — one that already appears as visible placeholder dots on the graphical login screen. Hiding asterisks in the terminal while showing them at login is, in the developers’ estimation, security theatre. [...]

Counter argument: Screen sharing exists and is part of many people's workflow. I often use sudo while sharing my screen in a video call, while I never encounter the login screen while in a video call.