Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 512130 - nagios status.cgi Segmentaion fault
Summary: nagios status.cgi Segmentaion fault
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios
Version: el5
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-16 14:03 UTC by Tomas Pelka
Modified: 2010-09-27 16:59 UTC (History)
8 users (show)

Fixed In Version: nagios-2.12-10.el4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-27 16:59:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
status.cgi output (1.48 KB, text/plain)
2009-07-16 14:07 UTC, Tomas Pelka
no flags Details

Description Tomas Pelka 2009-07-16 14:03:13 UTC
Description of problem:
status.cgi script from nagios alway ends with Segmentation fault.

Version-Release number of selected component (if applicable):
nagios-2.12-6.el5

How reproducible:
100%

Steps to Reproduce:
1. Enter cgi-bin dir, in my case /usr/lib64/nagios/cgi-bin/.
2. export REQUEST_METHOD="GET"
3. ./status.cgi
  
Actual results:
Segmentation fault

Expected results:
Should end without seg fault. 

Additional info:

Comment 1 Tomas Pelka 2009-07-16 14:07:30 UTC
Created attachment 353981 [details]
status.cgi output

Adding status.cgi output till ends witj seg fault.

Comment 2 Christopher Beland 2009-07-17 16:21:05 UTC
This bug is currently marked as affecting Fedora 8; if that is accurate, then you will need to upgrade to Fedora 10 or 11 (8 is no longer supported).  The "el5" in nagios-2.12-6.el5 indicate Enterprise Linux 5.  If you are running Fedora, you'll want to run a version which has been built for Fedora (in which case "rpm -e nagios" and then "yum install nagios" should work, if you are running a recent version of Fedora).  The latest version is 3.0.6-3.fc11, which may have already fixed this problem.

If you are running Enterprise Linux, you'll want to change the Product and Version this bug is filed against.  Thanks!

---

Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 3 Tomas Pelka 2009-07-19 09:56:17 UTC
Actually I'm running CentOS 5.3.

Comment 4 Robert Scheck 2009-07-19 13:56:23 UTC
Reproducible to me.

Comment 5 Tomas Pelka 2009-10-02 09:07:07 UTC
Any progress here?

Comment 6 Ricky Zhou 2009-12-11 09:41:55 UTC
Here is the upstream "fix" to the problem: http://nagios.cvs.sourceforge.net/viewvc/nagios/nagios/cgi/cgiutils.c?r1=1.80&r2=1.81

In patch form against the 2.12:

diff -ur nagios-2.12.orig/cgi/cgiutils.c nagios-2.12/cgi/cgiutils.c
--- nagios-2.12.orig/cgi/cgiutils.c     2009-12-11 04:40:40.864087315 -0500
+++ nagios-2.12/cgi/cgiutils.c  2009-12-11 04:41:07.750091589 -0500
@@ -1300,6 +1300,9 @@
        static int i = 0;
        char* str = encoded_url_string[i];
 
+       if(input==NULL)
+               return '\x0';
+
        len=(int)strlen(input);
        output_len=(int)sizeof(encoded_url_string[0]);

Comment 7 Ricky Zhou 2010-01-20 16:16:49 UTC
Reassigning to new owners.

Comment 8 Fedora Update System 2010-09-11 18:11:23 UTC
nagios-2.12-10.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/nagios-2.12-10.el5

Comment 9 Fedora Update System 2010-09-11 18:50:44 UTC
nagios-2.12-10.el4 has been submitted as an update for Fedora EPEL 4.
https://admin.fedoraproject.org/updates/nagios-2.12-10.el4

Comment 10 Fedora Update System 2010-09-12 18:24:27 UTC
nagios-2.12-10.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update nagios'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/nagios-2.12-10.el5

Comment 11 Fedora Update System 2010-09-12 18:24:44 UTC
nagios-2.12-10.el4 has been pushed to the Fedora EPEL 4 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update nagios'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/nagios-2.12-10.el4

Comment 12 Fedora Update System 2010-09-27 16:59:00 UTC
nagios-2.12-10.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2010-09-27 16:59:44 UTC
nagios-2.12-10.el4 has been pushed to the Fedora EPEL 4 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.