httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47335] New: An extra stderr file descriptor is leaked to forked CGI processes
Date Tue, 09 Jun 2009 12:41:36 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47335

           Summary: An extra stderr file descriptor is leaked to forked
                    CGI processes
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cgi
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: kornelpal@gmail.com


I've found this bug on a production server and created a test environment using
httpd-2.2.11.tar.bz2 with default configuration settings. Both systems present
the bug.

Test CGI script:
#!/bin/bash
echo "Content-Type: text/plain"
echo ""
ls -laR /proc/$$/fd 

Executing from shell:
Content-Type: text/plain

/proc/15922/fd:
total 0
dr-x------ 2 root root  0 Jun  9 14:37 .
dr-xr-xr-x 5 root root  0 Jun  9 14:37 ..
lrwx------ 1 root root 64 Jun  9 14:37 0 -> /dev/pts/2
lrwx------ 1 root root 64 Jun  9 14:37 1 -> /dev/pts/2
lrwx------ 1 root root 64 Jun  9 14:37 2 -> /dev/pts/2
lr-x------ 1 root root 64 Jun  9 14:37 255 -> /root/httpd/cgi-bin/leak.cgi

Executing from Apache:
/proc/15963/fd:
total 0
dr-x------ 2 daemon daemon  0 Jun  9 14:38 .
dr-xr-xr-x 5 daemon daemon  0 Jun  9 14:38 ..
lr-x------ 1 daemon daemon 64 Jun  9 14:38 0 -> pipe:[85321]
l-wx------ 1 daemon daemon 64 Jun  9 14:38 1 -> pipe:[85322]
lr-x------ 1 daemon daemon 64 Jun  9 14:38 14 -> pipe:[85323]
l-wx------ 1 daemon daemon 64 Jun  9 14:38 2 -> pipe:[85323]
lr-x------ 1 daemon daemon 64 Jun  9 14:38 255 -> /root/httpd/cgi-bin/leak.cgi

File descriptor 14 is a copy of stderr. 14 is used for subsequent requests as
well with the actual stderr. This number was significantly higher on the
production system but was still constant.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message