Bug 190077 - CVE-2006-2071 mprotect gives write permission to a readonly attachment
CVE-2006-2071 mprotect gives write permission to a readonly attachment
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel (Show other bugs)
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Don Howard
Brian Brock
: Security
Depends On:
Blocks: 143573
  Show dependency treegraph
Reported: 2006-04-27 07:26 EDT by Marcel Holtmann
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2006-0580
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-13 07:55:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Testcase for shmat/mprotect bug. Test should fail with -EPERM. (970 bytes, text/x-csrc)
2006-07-06 18:03 EDT, Don Howard
no flags Details

  None (edit)
Description Marcel Holtmann 2006-04-27 07:26:03 EDT
All of 2.4 and 2.6 kernels have been letting mprotect give write permission to a
readonly attachment of shared memory, whether or not IPC would give the caller
that permission.

SUS says "The behaviour of this function [mprotect] is unspecified if the
mapping was not established by a call to mmap", but I don't think we can
interpret that as allowing it to subvert IPC permissions.
Comment 2 Marcel Holtmann 2006-04-27 13:25:40 EDT
This is _not_ CVE-2006-1524. The commit message of the upstream fix is wrong.
Comment 5 Don Howard 2006-07-06 18:03:08 EDT
Created attachment 132028 [details]
Testcase for shmat/mprotect bug.  Test should fail with -EPERM.
Comment 7 Mike Gahagan 2006-07-12 13:46:50 EDT
Fix looks good:

.qa.[root@ia64-21as-bos root]# ./maywrite
shm segment attached at 0x300000
shmaddr)[512] =
mprotect() failed: Permission denied
.qa.[root@ia64-21as-bos root]# echo $?
Comment 9 Red Hat Bugzilla 2006-07-13 07:55:45 EDT
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.