[Bug 3416] New: sshd freeze when build without HAVE_PPOLL
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Fri Apr 1 16:18:46 AEDT 2022
https://bugzilla.mindrot.org/show_bug.cgi?id=3416
Bug ID: 3416
Summary: sshd freeze when build without HAVE_PPOLL
Product: Portable OpenSSH
Version: 8.9p1
Hardware: Itanium
OS: Other
Status: NEW
Severity: normal
Priority: P5
Component: sshd
Assignee: unassigned-bugs at mindrot.org
Reporter: yaroslav.kuzmin at vmssoftware.com
In openbsd-compat/bsd-poll.c file in ppoll() function.
After calling pselect() and converting fd_set (readfds, writefds,
exceptfds) into struct pollfd , there is no check whether this event
was requested or not.
if (FD_ISSET(fd, readfds))
fds[i].revents |= POLLIN;
if (FD_ISSET(fd, writefds))
fds[i].revents |= POLLOUT;
if (FD_ISSET(fd, exceptfds))
fds[i].revents |= POLLPRI;
this causes an unsolicited event to be handled
it's better to check whether this event was requested or not
if (FD_ISSET(fd, readfds))
if (fds[i].events & POLLIN)
fds[i].revents |= POLLIN;
if (FD_ISSET(fd, writefds))
if (fds[i].events & POLLOUT)
fds[i].revents |= POLLOUT;
if (FD_ISSET(fd, exceptfds))
if (fds[i].events & POLLPRI)
fds[i].revents |= POLLPRI;
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list