Bug 851 - Segmentation fault on the system which have no ppoll()
Segmentation fault on the system which have no ppoll()
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.8.25
PC FreeBSD
: low normal
Assigned To: Todd C. Miller
: 852 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-12 01:15 MDT by sasaki
Modified: 2018-09-12 17:42 MDT (History)
1 user (show)

See Also:


Attachments
Patch for lib/util/event_poll.c (540 bytes, text/plain)
2018-09-12 01:15 MDT, sasaki
Details

Note You need to log in before you can comment on or make changes to this bug.
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!