Nagios SIGSEGV problem - FIXED!

Andreas Ericsson ae at op5.se
Wed Feb 16 11:23:37 CET 2005


Greg Vickers wrote:
> After compiling with --enable-DEBUG(0,1,2) and attaching gdb to this new 
> executable I find:
> (gdb) bt
> #0  0x007366d6 in strncpy () from /lib/tls/libc.so.6

That's weird. I suppose it tried to strncpy(dest, src, strlen(src)) or 
something, as opposed to strncpy(dest, src, sizeof(dest)).

> #1  0x08059906 in get_raw_command_line (
>     cmd=0x9591300 
> "check_service_cluster!CA-R203b!31!32!$SERVICESTATEID:CA-R203b-PC01:Lab 
> PC available$,$SERVICESTATEID:CA-R203b-PC02:Lab PC 
> available$,$SERVICESTATEID:CA-R203b-PC03:Lab PC 
> available$,$SERVICESTATEID:CA-"..., raw_command=0x2d41433a <Address 
> 0x2d41433a out of bounds>, buffer_length=858796626) at utils.c:1277
> 
> Gee, that looks like a cluster check service command for Nagios 2.0... 
> and I'm running a Nagios executable 1.2... gosh could be a buffer 
> overflow! <slaps_self_with_cod>
> 
> I had converted all my config files to 2.0 and then regressed them to 
> 1.2 (a lot of host names had been updated) and missed regressing the 
> cluster check services... duh.
> 
> So the buffer overflow was being caused by passing too much stuff to 
> check_cluster which was causing a SIGSEGV.
> 
> Greg
> 
> Jason Martin wrote:
> 
>> On Wed, Feb 16, 2005 at 03:06:34PM +1000, Greg Vickers wrote:
>>
>>> Never mind - the problem was with the user :p i.e. me
>>
>>
>> What did you do to solve the problem? Even in the face of user
>> error, the daemon should not SEGV.
>>
>> -Jason Martin
> 
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list