Bug 190076

Summary: CVE-2006-2071 mprotect gives write permission to a readonly attachment
Product: Red Hat Enterprise Linux 2.1 Reporter: Marcel Holtmann <holtmann>
Component: kernelAssignee: Don Howard <dhoward>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: impact=moderate,public=20060417
Fixed In Version: RHSA-2006-0579 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-13 11:46:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 143573    
Attachments:
Description Flags
shm/mprotect testcase. none

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