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: [email protected]
        ReportedBy: [email protected]


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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to