[Nagiosplug-devel] [ nagiosplug-Bugs-1107524 ] check_ping, segfault, popen problems

SourceForge.net noreply at sourceforge.net
Sat Jan 22 14:40:49 CET 2005


Bugs item #1107524, was opened at 2005-01-22 17:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1107524&group_id=29880

Category: Parsing problem
Group: CVS
Status: Open
Resolution: None
Priority: 5
Submitted By: gprosser (gprosser)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_ping, segfault, popen problems

Initial Comment:
check_ping.c, including the current version in CVS,
installs a signal handler for SIGALRM called
popen_timeout_alarm_handler on startup, and sets an
alarm to interrupt it later so the plugin doesn't run
forever.

However, the popen handler is set to kill the processes
that was opened when an ALRM hits, and in certain
circumstances (DNS timeouts) the plugin is still
resolving the hostname of the target and has not yet
opened a command.

This leads to SIGSEGV when popen_timeout_(etc) tries to
dereference a null pointer looking for what process to
kill.

I would suggest a safer benign signal handler to handle
DNS timeouts be installed in the first case, and then
changed just before the process is actually popened to
the current handler.

Thanks.

-gnp

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1107524&group_id=29880




More information about the Devel mailing list