Bug 84 - tgetpass should turn off echo before emitting password prompt
tgetpass should turn off echo before emitting password prompt
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.5
PC FreeBSD
: normal security
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-12 21:53 MDT by Mark Pettit
Modified: 2002-12-13 15:19 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Pettit 2002-06-12 21:53:28 MDT
sudo emits the password prompt before it turns off screen echo.

On heavily loaded boxes, this can cause the user's password to show up on the
screen when he/she types it.

This would fairly easily be solved by moving the term_setattr call to before the
write(output, prompt, strlen(prompt)) call.  The prompt would still be written
to the screen, AFAIK, but not until after the tty was ready to not echo any
characters typed by the user.

I have personally witnessed this happening a number of times on some of our
very heavily-loaded machines, and it ends up echoing my password to the screen,
which bothers me a bit, and is a security weakness.
Comment 1 Todd C. Miller 2002-12-13 11:19:57 MST
That sounds entirely sensible; this change will be in the next release of sudo.