From: Mark Andrews Date: Thu, 8 Dec 2016 05:59:46 +0000 (+1100) Subject: 4528. [bug] Only set the flag bits for the i/o we are waiting X-Git-Tag: v9.10.4-P5~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=0a56ee163b197c33043460c1a2b5dfce8cf1b2c2;p=thirdparty%2Fbind9.git 4528. [bug] Only set the flag bits for the i/o we are waiting for on EPOLLERR or EPOLLHUP. [RT #43617] (cherry picked from commit c1619b84207912ff32eeb27324475089a33b8b1d) --- diff --git a/CHANGES b/CHANGES index c41ea2f0770..9cf84edd88d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ --- 9.10.4-P5 released --- +4528. [bug] Only set the flag bits for the i/o we are waiting + for on EPOLLERR or EPOLLHUP. [RT #43617] + 4517. [security] Named could mishandle authority sections that were missing RRSIGs triggering an assertion failure. (CVE-2016-9444) [RT # 43632] diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 6127ec5f30b..313664996eb 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -4075,7 +4075,8 @@ process_fds(isc__socketmgr_t *manager, struct epoll_event *events, int nevents) * events. Note also that the read or write attempt * won't block because we use non-blocking sockets. */ - events[i].events |= (EPOLLIN | EPOLLOUT); + int fd = events[i].data.fd; + events[i].events |= manager->epoll_events[fd]; } process_fd(manager, events[i].data.fd, (events[i].events & EPOLLIN) != 0,