Bug 182

Summary: ssh should still force SIGCHLD to be SIG_DFL when calling ssh-rand-helper
Product: Portable OpenSSH Reporter: Kevin W. Rudd <solgato>
Component: sshAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: normal    
Priority: P3    
Version: -current   
Hardware: ix86   
OS: All   

Description Kevin W. Rudd 2002-03-23 10:13:28 AEDT
Programs that set a SIGCHLD handler before calling ssh wreak havoc on the
waitpid() calls within entropy.c and ssh-rand-helper. Entropy.c should set the
SIGCHLD handler to SIG_DFL before calling ssh-rand-helper to avoid SIGCHLD
conflicts.

This was noticed when our ssh version was upgraded to 3.1.  Our local rsync
processes were failing with the following output from SSH:

Couldn't wait for child 'ls -alni /usr/adm' completion: No child processes
Couldn't wait for child 'ls -alni /usr/mail' completion: No child processes
Couldn't wait for child 'netstat -an' completion: No child processes
Couldn't wait for child 'netstat -in' completion: No child processes
Couldn't wait for child 'netstat -rn' completion: No child processes
Couldn't wait for child 'netstat -ia' completion: No child processes
Couldn't wait for child 'netstat -s' completion: No child processes
Couldn't wait for child 'netstat -is' completion: No child processes
Couldn't wait for child 'arp -a -n' completion: No child processes
Couldn't wait for child 'ifconfig -a' completion: No child processes
Couldn't wait for child 'ps -al' completion: No child processes
Couldn't wait for child 'ps -efl' completion: No child processes
Couldn't wait for child 'last' completion: No child processes
Couldn't wait for child 'sar -d' completion: No child processes
Couldn't wait for child 'uptime' completion: No child processes
Couldn't wait for child 'ipcs -a' completion: No child processes
Not enough entropy in RNG
ssh-rand-helper child produced insufficient data
unexpected EOF in read_timeout

It was discovered that rsync had set SIGCHLD to SIG_IGN prior to calling ssh.
Setting SIGCHLD to SIG_DFL prior to forking ssh-rand-helper (seed_rng() in
entropy.c) solved this problem.
Comment 1 Damien Miller 2002-04-23 23:31:42 AEST
Fixed in -current
Comment 2 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED