Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76800 - su allows Control-C interruption of post password entry pause
Summary: su allows Control-C interruption of post password entry pause
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-05 11:50 UTC by David Marcin
Modified: 2006-10-05 18:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Marcin 2005-01-05 11:50:41 UTC
SU allows for immediate return by pressing Control-C.  This allows for immediate determination of success/failure, and brute force attacks through a little bit of signal manipulation.  I have not tested if a program can send the SIGINT itself, but it would seem likely as this is what Control-C is supposed to do.  It should force wait (or at least be admin configurable to do so).

Reproducible: Always
Steps to Reproduce:
1. su
2. enter incorrect password
3. press CTRL-C to prematurely halt the failure pause

Actual Results:  
su is killed, user returned to command line instantly to try again

Expected Results:  
ignore SIGINT for security reasons (or have the option to ignore it)
Comment 1 David Marcin 2005-01-05 12:53:00 UTC
Upon further thinking, the pause is nonsense because a user must be explicitly granted permission to su, and so there is no real security hole as a user with ability to su should already know the password.

I submit that the pause should be completely eliminated due to the fact that it is completely pointless and silly.  The option, at least, would be preferable.
Comment 2 SpanKY gentoo-dev 2005-01-05 15:22:45 UTC
doesnt /etc/login.defs control that ?
Comment 3 David Marcin 2005-01-05 16:14:10 UTC
It controls the timeout for logging in via the login prompt but not (as far as I can tell) the timeout on the su command.  Perhaps there is an option that does not appear there by default that controls it that you are thinking of?

In any case, the delay seems strange since both CTRL-C and CTRL-\ will kill the su process without the need to wait.  Even a user logged in to a single terminal could open multiple su instances to avoid the delay.  For reasoning that convinced me that the delay was not in fact a security hole, but rather a pointless hindrance to legitimate users, read: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=288827&msg=1

Thanks for your time, you could probably mark this down to minor if you like :)
Comment 4 SpanKY gentoo-dev 2005-01-30 12:16:22 UTC
feel like glancing through shadow's su code and producing a patch to allow for CTRL+C at all stages ?
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-10-04 23:54:35 UTC
spanky: is this bug still needed?
Comment 6 SpanKY gentoo-dev 2006-10-05 18:53:43 UTC
iirc, upstream has talked about it ... but i dont really remember what came of it

either way, should be handled on the shadow dev list