Bug 509627 - kernel: fd leak if pipe() is called with an invalid address [rhel-4.9]
kernel: fd leak if pipe() is called with an invalid address [rhel-4.9]
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
high Severity high
: rc
: ---
Assigned To: Cong Wang
Petr Beňas
Depends On: 509625
  Show dependency treegraph
Reported: 2009-07-04 04:03 EDT by Eugene Teo (Security Response)
Modified: 2015-01-04 17:58 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 509625
Last Closed: 2011-02-16 10:48:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0263 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 4.9 kernel security and bug fix update 2011-02-16 10:14:55 EST

  None (edit)
Description Eugene Teo (Security Response) 2009-07-04 04:03:45 EDT
+++ 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.

Comment 2 Eugene Teo (Security Response) 2009-07-04 04:20:53 EDT
Comment 4 Alexander Viro 2009-07-20 16:43:13 EDT
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.
Comment 6 RHEL Product and Program Management 2010-10-12 08:50:00 EDT
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
Comment 7 Vivek Goyal 2010-10-18 09:49:11 EDT
Committed in 89.45.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
Comment 11 Petr Beňas 2010-11-18 07:40:02 EST
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.
Comment 13 errata-xmlrpc 2011-02-16 10:48:14 EST
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.


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