Bug 851

Summary: Segmentation fault on the system which have no ppoll()
Product: Sudo Reporter: sasaki
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal CC: jwestfall
Priority: low    
Version: 1.8.25   
Hardware: PC   
OS: FreeBSD   
Attachments: Patch for lib/util/event_poll.c

Description sasaki 2018-09-12 01:15:56 MDT
Created attachment 515 [details]
Patch for lib/util/event_poll.c

Running 'sudo -s' on the system which does not have ppoll() fails with segmentation fault.

% sudo -s
zsh: segmentation fault  sudo -s

I guess sudo_ev_poll() has to set the timeout value to -1 on such system when timo is NULL.
Comment 1 Todd C. Miller 2018-09-12 06:34:09 MDT
Thanks, that patch looks correct.  I fixed a similar problem with the select backend but forgot to handle it in poll.
Comment 2 Todd C. Miller 2018-09-12 13:29:36 MDT
I've released sudo 1.8.25p1 with this fix.
Comment 3 Todd C. Miller 2018-09-12 14:58:20 MDT
*** Bug 852 has been marked as a duplicate of this bug. ***
Comment 4 Todd C. Miller 2018-09-12 15:00:15 MDT
If for some reason you cannot update to 1.8.25p1, a workaround is to use the --disable-poll configure option.
Comment 5 sasaki 2018-09-12 17:42:41 MDT
Works again. The 1.8.25 using --disable-poll option also works fine.

Thanks!