Bug 3399

Summary: SSHD debug sends config although there is no receiver
Product: Portable OpenSSH Reporter: balu <balu.gajjala>
Component: sshdAssignee: Assigned to nobody <unassigned-bugs>
Status: NEW ---    
Severity: minor CC: balu.gajjala, djm
Priority: P5    
Version: 8.9p1   
Hardware: Other   
OS: Windows 10   

Description balu 2022-03-08 10:32:04 AEDT
When SSHD is run in the debug mode, there is no need to send the config on config_s[0] as there is no process listening on the other end.

https://github.com/openssh/openssh-portable/blob/166456cedad3962b83b848b
1e9caf80794831f0f/sshd.c#L1309
Comment 1 Damien Miller 2022-03-18 13:58:02 AEDT
I don't think this is correct. Debug mode disables fork-per-connection but not reexec:

debug1: fd 5 clearing O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug3: send_rexec_state: entering fd = 8 config len 2635
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug3: recv_rexec_state: entering fd = 5
debug3: ssh_msg_recv entering
debug3: recv_rexec_state: done
debug2: parse_server_config_depth: config rexec len 2635