Bug in statusmap when using unicode

Ethan Galstad nagios at nagios.org
Wed Oct 31 19:25:02 CET 2007


Luiz Angelo Daros de Luca wrote:
> Hello,
> 
> Nagios statusmap.cgi crashed when an unicode "ç" is present in the
> alias host name.
> 
> *** buffer overflow detected ***: /usr/lib/nagios/cgi/statusmap.cgi terminated
> 
> ======= Backtrace: =========
> /lib64/libc.so.6(__chk_fail+0x2c)[0x2aba4a7bd9ac]
> /lib64/libc.so.6[0x2aba4a7bcee9]
> /lib64/libc.so.6(_IO_default_xsputn+0x8e)[0x2aba4a753a7e]
> /lib64/libc.so.6(_IO_vfprintf+0x76e)[0x2aba4a7297fe]
> /lib64/libc.so.6(__vsprintf_chk+0x9d)[0x2aba4a7bcf8d]
> /lib64/libc.so.6(__sprintf_chk+0x80)[0x2aba4a7bced0]
> /usr/lib/nagios/cgi/statusmap.cgi[0x40b6f2]
> /usr/lib/nagios/cgi/statusmap.cgi[0x404f28]
> /usr/lib/nagios/cgi/statusmap.cgi[0x405932]
> 
> This is gdb bt:
> 
> #0  0x00002aba4a717b45 in raise () from /lib64/libc.so.6
> #1  0x00002aba4a7190e0 in abort () from /lib64/libc.so.6
> #2  0x00002aba4a74ffbb in ?? () from /lib64/libc.so.6
> #3  0x00002aba4a7bd9ac in __chk_fail () from /lib64/libc.so.6
> #4  0x00002aba4a7bcee9 in ?? () from /lib64/libc.so.6
> #5  0x00002aba4a753a7e in _IO_default_xsputn () from /lib64/libc.so.6
> #6  0x00002aba4a7297fe in vfprintf () from /lib64/libc.so.6
> #7  0x00002aba4a7bcf8d in __vsprintf_chk () from /lib64/libc.so.6
> #8  0x00002aba4a7bced0 in __sprintf_chk () from /lib64/libc.so.6
> #9  0x000000000040b6f2 in html_encode (
>     input=0x689970 "Cartorio de BIGUAA�\207U", escape_newlines=1)
>     at cgiutils.c:1497
> #10 0x0000000000404f28 in write_host_popup_text (hst=0x689790)
>     at statusmap.c:1947
> #11 0x0000000000405932 in draw_hosts () at statusmap.c:1817
> #12 0x00000000004075a2 in display_map () at statusmap.c:824
> #13 0x0000000000407f3b in main (argc=<value optimized out>,
>     argv=<value optimized out>) at statusmap.c:291
> #14 0x00002aba4a704b54 in __libc_start_main () from /lib64/libc.so.6
> #15 0x0000000000403609 in _start ()
> 
> 

Can you try the latest CVS snapshot (or CVS tarball) and see if the 
problem is resolved?  I increased the buffer length in case the int 
value exceeds 255.  Both the 2.x and HEAD (3.x) branches have been 
updated with a potential fix.



Ethan Galstad
Nagios Developer
___
Email: nagios at nagios.org
Web:   www.nagios.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list