Bug 509627 - kernel: fd leak if pipe() is called with an invalid address [rhel-4.9]
Summary: kernel: fd leak if pipe() is called with an invalid address [rhel-4.9]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.9
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Cong Wang
QA Contact: Petr Beňas
URL:
Whiteboard:
Depends On: 509625
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-04 08:03 UTC by Eugene Teo (Security Response)
Modified: 2015-01-04 22:58 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 509625
Environment:
Last Closed: 2011-02-16 15:48:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0263 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 4.9 kernel security and bug fix update 2011-02-16 15:14:55 UTC

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

Reference:
http://patchwork.kernel.org/patch/33640/

Comment 2 Eugene Teo (Security Response) 2009-07-04 08:20:53 UTC
http://www.chineselinuxuniversity.net/patches/43722.shtml

Comment 4 Alexander Viro 2009-07-20 20:43:13 UTC
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 Program Management 2010-10-12 12:50:00 UTC
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
release.

Comment 7 Vivek Goyal 2010-10-18 13:49:11 UTC
Committed in 89.45.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 11 Petr Beňas 2010-11-18 12:40:02 UTC
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 15:48:14 UTC
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.

http://rhn.redhat.com/errata/RHSA-2011-0263.html


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