Bug 190076 - CVE-2006-2071 mprotect gives write permission to a readonly attachment
Summary: CVE-2006-2071 mprotect gives write permission to a readonly attachment
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel
Version: 2.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Don Howard
QA Contact: Brian Brock
URL:
Whiteboard: impact=moderate,public=20060417
Depends On:
Blocks: 143573
TreeView+ depends on / blocked
 
Reported: 2006-04-27 11:25 UTC by Marcel Holtmann
Modified: 2007-11-30 22:06 UTC (History)
1 user (show)

Fixed In Version: RHSA-2006-0579
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-13 11:46:46 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2006:0579 0 normal SHIPPED_LIVE Important: kernel security update 2006-07-13 04:00:00 UTC

Description Marcel Holtmann 2006-04-27 11:25:08 UTC
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 17:25:25 UTC
This is _not_ CVE-2006-1524. The commit message of the upstream fix is wrong.


Comment 3 Don Howard 2006-04-28 19:59:39 UTC
Created attachment 128372 [details]
shm/mprotect testcase.

Comment 7 Mike Gahagan 2006-07-12 17:49:22 UTC
.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 11:46:46 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-0579.html



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