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

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


Attachments (Terms of Use)
shm/mprotect testcase. (970 bytes, text/x-csrc)
2006-04-28 15:59 EDT, Don Howard
no flags Details

  None (edit)
Description Marcel Holtmann 2006-04-27 07:25:08 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:25 EDT
This is _not_ CVE-2006-1524. The commit message of the upstream fix is wrong.
Comment 3 Don Howard 2006-04-28 15:59:39 EDT
Created attachment 128372 [details]
shm/mprotect testcase.
Comment 7 Mike Gahagan 2006-07-12 13:49:22 EDT
.live.[root@i386-21as root]# ./maywrite
shm segment attached at 0x40018000
shmaddr)[512] =
.live.[root@i386-21as root]# echo $?
0
.live.[root@i386-21as root]# uname -a
Linux i386-21as.test.redhat.com 2.4.9-e.68smp #1 SMP Thu Jan 19 18:38:50 EST
2006 i686 unknown

.qa.[root@i386-21as-bos root]# uname -a
Linux i386-21as-bos.lab.boston.redhat.com 2.4.9-e.70 #1 Fri May 5 21:12:54
EDT2006 i686 unknown
.qa.[root@i386-21as-bos root]# gcc maywrite.c -o maywrite
.qa.[root@i386-21as-bos root]# ./maywrite
shm segment attached at 0x40018000
shmaddr)[512] =
mprotect() failed: Permission denied

Fix looks good!

Comment 9 Red Hat Bugzilla 2006-07-13 07:46:46 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.

http://rhn.redhat.com/errata/RHSA-2006-0579.html

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