Bug 3297 - Regression - process_input() when read retuns -1
Summary: Regression - process_input() when read retuns -1
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 8.5p1
Hardware: Other Windows 10
: P5 major
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_8_6
  Show dependency treegraph
 
Reported: 2021-04-13 11:04 AEST by balu
Modified: 2021-04-23 14:58 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 balu 2021-04-13 11:04:28 AEST
In V8.1, when read() returns -1 and if errno is not one of these values (EINTR , EAGAIN , EWOULDBLOCK) then we call cleanup_exit()

https://github.com/openssh/openssh-portable/blob/fbe37c90602fa2d0d7b5f05868d6886b1e216e65/serverloop.c#L332


In V8.5, when read() retuns -1 and if errno is equal to EWOULDBLOCK then only we call cleanup_exit()

https://github.com/openssh/openssh-portable/blob/0727dd09eca355e7539cbcb23b148fcee9b21513/serverloop.c#L335


It looks like a typo, line 336 (in V8.5) should be,
 errno == EWOULDBLOCK
Comment 1 balu 2021-04-13 11:10:39 AEST
Please note in this case the sshd processes (one SYSTEM sshd process and another user sshd process) hangs indefinetly.
Comment 2 Damien Miller 2021-04-14 11:46:07 AEST
Fixed in 2dc328023f
Comment 3 Damien Miller 2021-04-23 14:58:12 AEST
closing resolved bugs as of 8.6p1 release