vlib: crash in linux_epoll_input_inline for accessing free file index [VPP-1412] 41/14741/2
authorSteven <sluong@cisco.com>
Sat, 8 Sep 2018 21:06:16 +0000 (14:06 -0700)
committerDamjan Marion <dmarion@me.com>
Sun, 9 Sep 2018 20:26:40 +0000 (20:26 +0000)
commit97f592f474ebaeba0c9a0f50db8f5627cc444aca
treedde4cf9004ddf5844493747f387b9473383dafac
parentd4d7e8ad84cb24cee31f10d5bfedab715df65754
vlib: crash in linux_epoll_input_inline for accessing free file index [VPP-1412]

Under rare scenario, epoll may still post an event to VPP although the file
descriptor is already deleted via epoll_ctl (EPOLL_CTL_DEL) and the file
descriptor is close. VPP tries to access the free file index entry and crash.

The fix is to throw away the events which the file descriptor is already deleted.

Change-Id: Ieca3a1873aecb28630c3abc42c40341f27c2faa7
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit aec7297ba012e1fe4bbf85cdaec8e810aa476cea)
src/vlib/unix/input.c