Bug 1374 - sshd -D produces zombies if authentication is interrupted
Summary: sshd -D produces zombies if authentication is interrupted
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 4.7p1
Hardware: All FreeBSD
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-08 07:53 AEST by Giacomo Cariello
Modified: 2011-09-06 15:32 AEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giacomo Cariello 2007-10-08 07:53:34 AEST
If sshd 4.7p1 and earlier is run with "-D" flag under FreeBSD and PrivilegeSeparation is enabled, the daemon leaves a zombie if a connection is reset during authentication. Example follows.

before:

% ps auwx | grep sshd
root       6160  0.0  0.2  2852  2380  p0  S+   11:43PM   0:00.02 /usr/sbin/sshd -D -e

connecting:

% ps auwx | grep sshd
sshd       6189  0.0  0.2  4260  2540  ??  S    11:45PM   0:00.01 sshd: jwk [net] (sshd)
root       6190  0.0  0.3  4452  2700  ??  S    11:45PM   0:00.00 sshd: jwk [pam] (sshd)
root       6160  0.0  0.2  2852  2380  p0  S+   11:43PM   0:00.02 /usr/sbin/sshd -D -e

after:

% ps auwx | grep sshd
sshd       6189  0.0  0.0     0     0  ??  Z    11:45PM   0:00.01 <defunct>
root       6160  0.0  0.2  2852  2380  p0  I+   11:43PM   0:00.02 /usr/sbin/sshd -D -e

stderr reports:

Server listening on :: port 22.
Server listening on 0.0.0.0 port 22.
Postponed keyboard-interactive for jwk from [...] port 14668 ssh2
Connection closed by [...]
Comment 1 Darren Tucker 2008-06-14 10:28:18 AEST
I have tried to reproduce this on FreeBSD 6 with both 4.7p1 and -current but could not (I kill -9'ed the client to cause a connection reset) but could not.

Which version of FreeBSD is this?  Also, is this an unmodified OpenSSH?  Which sshd_config options do you have enabled?  (I can tell from the output that you have at least UsePAM enabled.)

Could you please run the server with increased loglevel and attach the output ("Create Attachment" rather than pasting in the comment field please), eg:

/path/to/sshd -De -ologlevel=debug3 -p 2022 -o usepam=yes

Thanks.
Comment 2 Damien Miller 2011-06-03 12:27:55 AEST
3 years, no followup = closed bug
Comment 3 Damien Miller 2011-09-06 15:32:58 AEST
close resolved bugs now that openssh-5.9 has been released