Bug 1805

Summary: consumption of file descriptors using a port forwarding channel
Product: Portable OpenSSH Reporter: Walter.Pfannenmueller
Component: sshdAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WORKSFORME    
Severity: major CC: djm
Priority: P2    
Version: 5.5p1   
Hardware: All   
OS: Linux   
Attachments:
Description Flags
sshd debug and system strace none

Description Walter.Pfannenmueller 2010-08-09 04:46:21 AEST
Created attachment 1910 [details]
sshd debug and system strace

This was tested on a Suse Linux 11.2

Establishing a port forwarding channel 

ssh -N -R 11001:<clienthost>:443 -o TCPKeepAlive=yes target

and using the channel with 
wget -q --no-check-certificate https://127.0.0.1:11001/

many, many times. 
Every now and then a fd isn't freed again.
In the attachement there is the sshd debug output and
a strace to show that the number of supervised fds in the select call
increase.

The traces are quit big, but not to the bitter end (exhaustion of all fds).
Comment 1 Damien Miller 2010-10-12 14:24:57 AEDT
Hi,

I can't replicate this on OpenBSD or Ubuntu running OpenSSH 5.6. My tests used netcat instead of wget and your unspecified webserver. Could you please try to recreate problem using netcat or similar? It might be possible that you webserver is getting stuck and holding connections open.
Comment 2 Damien Miller 2011-05-06 11:39:01 AEST
We can't reproduce this bug, so I will close it. Please reopen if you have additional information.
Comment 3 Damien Miller 2011-09-06 15:33:10 AEST
close resolved bugs now that openssh-5.9 has been released