Red Hat Bugzilla – Bug 509627
kernel: fd leak if pipe() is called with an invalid address [rhel-4.9]
Last modified: 2015-01-04 17:58:58 EST
+++ This bug was initially created as a clone of Bug #509625 +++
Description of problem:
fd leak if pipe() is called with an invalid address.
Though -EFAULT is returned, the file descriptors opened by pipe() call are left open.
This is not a security issue by any stretch of imagination and the author of original patch has overinflated the significance of the bug quite badly. Which has resulted in a NAK from Linus. However, it _is_ a correctness issue - we want the 32bit task on amd64 to act as it would on i386, and error handling in pipe(2) would differ for those two cases. Patch does fix that, but it's not the right fix; the obviously right one is to lose sys32_pipe() and xtensa_pipe() completely and use sys_pipe() instead. That'll give the reduction of code duplication and give a guaranteed consistency in error handling. That, in turn, will deal with the so-called "leak" in the same manner as done by the proposed patch.
I'll push such patch via VFS tree.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Committed in 89.45.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
Reproduced in 89.44.EL on i386, x86_64, ppc64 and s390x. Verified in 89.45.EL on i386, x86_64, ppc64, ia64 and s390x. Not reproduced in ia64.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.