Bug 902 - get_remote_port() can kill sshd in auth_log()
Summary: get_remote_port() can kill sshd in auth_log()
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 3.8.1p1
Hardware: All Linux
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-21 09:09 AEST by Pavel Kankovsky
Modified: 2004-09-11 13:18 AEST (History)
0 users

See Also:


Attachments
proposed fix (429 bytes, patch)
2004-07-21 09:10 AEST, Pavel Kankovsky
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Kankovsky 2004-07-21 09:09:21 AEST
The daemon calls get_remote_port() in auth_log(). If the client closes the
connection between the authentication failure and the invocation of auth_log()
(e.g. during PAM-enforced post-failure delay) then getpeername() fails (the
socket is not connected any longer), get_sock_port() kills the daemon (almost
silently only a debugging message!), and auth_log() is never finished.

One possible fix is to make get_remote_port() cache information in the same way
it is cached by get_remote_ipaddr().
Comment 1 Pavel Kankovsky 2004-07-21 09:10:07 AEST
Created attachment 693 [details]
proposed fix
Comment 2 Damien Miller 2004-07-21 21:54:26 AEST
Patch applied - thanks!