Bug 350 - sshd leaks fd to pty for interactive sessions
Summary: sshd leaks fd to pty for interactive sessions
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: ix86 Linux
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-10 20:03 AEST by Wichert Akkerman
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wichert Akkerman 2002-07-10 20:03:53 AEST
Using OpenSSH 3.4p1 with publickey authentication I get an
extra fd 10 to the pty:

[tornado;~]-15> ssh localhost

[tornado;~]-1> ls -l /proc/467/fd
total 0
lrwx------    1 wichert  wichert        64 Jul 10 12:02 0 -> /dev/pts/3
lrwx------    1 wichert  wichert        64 Jul 10 12:02 1 -> /dev/pts/3
lrwx------    1 wichert  wichert        64 Jul 10 12:02 10 -> /dev/pts/3
lrwx------    1 wichert  wichert        64 Jul 10 12:02 2 -> /dev/pts/3

(467 being the pid of the shell created)
Comment 1 Wichert Akkerman 2002-07-10 20:10:34 AEST
This happens with both privsep enabled and disabled.
Comment 2 Markus Friedl 2002-07-10 20:40:20 AEST
i get this with ksh(1) on OpenBSD, but not with rc(1), and ktrace
suggest that it's a fctnl with F_DUPFD done by ksh, so i think
it's not sshd's fault.
Comment 3 Wichert Akkerman 2002-07-10 21:44:55 AEST
More information: I get this with multiple different shells (bash and zsh). I
am also able to reproduce this with OpenSSH 3.0.2p1. 
Comment 4 Markus Friedl 2002-07-10 21:54:48 AEST
did you try a non-jobcontrol shell?
Comment 5 Markus Friedl 2002-07-10 22:03:33 AEST
i can reproduce this on OpenBSD with ksh from the console,
so it's not an OpenSSH bug.
Comment 6 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED