Bug 137820 - CVE-2004-1057 VM_IO refcount issue
CVE-2004-1057 VM_IO refcount issue
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Alan Cox
Brian Brock
: 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:
Last Closed: 2006-01-19 10:59:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2006:0140 normal SHIPPED_LIVE Important: kernel security update 2006-01-19 00:00:00 EST

  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 

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.


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