Bug 137820 - CVE-2004-1057 VM_IO refcount issue
CVE-2004-1057 VM_IO refcount issue
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
3.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Alan Cox
Brian Brock
impact=important,public=20041101
: Security
Depends On:
Blocks: 168424
  Show dependency treegraph
 
Reported: 2004-11-01 15:16 EST by Josh Bressers
Modified: 2007-11-30 17:07 EST (History)
10 users (show)

See Also:
Fixed In Version: RHSA-2006-0140
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-19 10:59:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Comment 1 Josh Bressers 2004-11-01 15:16:56 EST
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 14:30:47 EDT
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 11:54:38 EDT
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 00:12:28 EDT
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 18:32:10 EST
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 10:59: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 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.