Bug 137820 - CVE-2004-1057 VM_IO refcount issue
Summary: CVE-2004-1057 VM_IO refcount issue
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Alan Cox
QA Contact: Brian Brock
URL:
Whiteboard: impact=important,public=20041101
Depends On:
Blocks: 168424
TreeView+ depends on / blocked
 
Reported: 2004-11-01 20:16 UTC by Josh Bressers
Modified: 2007-11-30 22:07 UTC (History)
10 users (show)

Fixed In Version: RHSA-2006-0140
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-19 15:59:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch for this issue. (9.86 KB, patch)
2004-11-01 20:16 UTC, Josh Bressers
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2006:0140 0 normal SHIPPED_LIVE Important: kernel security update 2006-01-19 05:00:00 UTC

Comment 1 Josh Bressers 2004-11-01 20:16:56 UTC
Created attachment 106045 [details]
Patch for this issue.

This patch was taken from 

http://www.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.23aa3/00_VM_IO-4

Comment 5 Alan Cox 2005-06-06 18:30:47 UTC
The issue is fairly simple in its basis. When a driver allocates resources and
marks the pages PG_Private (for DMA use) the pages are no longer refcounted.

Now imagine someone doing O_DIRECT dma on an audio mmap and closing the mmap.
Not pretty 8)

The needed fix as far as I can see for RHEL3 is to set VM_IO (ie disallow the
O_DIRECT) in remap_page_range(). We can do that because unlike base 2.4 we
happen to pass the vma into the function.


Comment 10 Alan Cox 2005-06-30 15:54:38 UTC
This is the 2.6 addition (which is like our 2.4 because we pass the vma for Riel mm)

        /*
         * Physically remapped pages are special. Tell the
         * rest of the world about it:
         *   VM_IO tells people not to look at these pages
         *      (accesses can have side effects).
         *   VM_RESERVED tells swapout not to try to touch
         *      this region.
         */
        vma->vm_flags |= VM_IO | VM_RESERVED;


Comment 15 Ernie Petrides 2005-09-15 04:12:28 UTC
A fix for this problem has just been committed to the RHEL3 U7
patch pool this evening (in kernel version 2.4.21-37.2.EL).


Comment 18 Ernie Petrides 2006-01-11 23:32:10 UTC
A fix for this problem has also been committed to the RHEL3 E7
patch pool this evening (in kernel version 2.4.21-37.0.1.EL).


Comment 20 Red Hat Bugzilla 2006-01-19 15:59: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 the 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-2006-0140.html



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