Bug 65370 (CVE-2005-0176) - VUL-0: CVE-2005-0176: kernel: unlock someone elses IPC memory
Summary: VUL-0: CVE-2005-0176: kernel: unlock someone elses IPC memory
Status: RESOLVED FIXED
Alias: CVE-2005-0176
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: All Linux
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Marcus Meissner
QA Contact: Security Team bot
URL:
Whiteboard: CVE-2005-0176: CVSS v2 Base Score: 5....
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-01 17:12 UTC by Marcus Meissner
Modified: 2021-10-27 15:53 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
ipc-shm-lock-fix.patch (1.72 KB, patch)
2005-02-01 17:15 UTC, Marcus Meissner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2005-02-01 17:12:12 UTC
20041124 unlock someone elses ipc memory                                         
        Reported on lkml a flaw that allows you to unlock someone                
        elses ipc memory (hence crossing permission boundary).                   
                                                                                 
        http://marc.theaimsgroup.com/?l=linux-kernel&m=110132782610477           
        http://marc.theaimsgroup.com/?l=linux-kernel&m=110137276318105           
                                                                                 
        "In 2.6.8, the only processes that could lock shared memory segments     
        were those with CAP_IPC_LOCK.  Unprivileged processes did not get a      
        look in." so this is 2.6.9
Comment 1 Marcus Meissner 2005-02-01 17:12:13 UTC
<!-- SBZ_reproduce  -->
n/a
Comment 2 Marcus Meissner 2005-02-01 17:14:45 UTC
fix for 2.6 is here: 
 
http://linux.bkbits.net:8080/linux-2.6/cset%4041bdc399fjcFowgsJH5ZMZ8eP-YcwA?nav=index.html|
src/.|src/ipc|related/ipc/shm.c 
 
 
Comment 3 Marcus Meissner 2005-02-01 17:15:41 UTC
Created attachment 28088 [details]
ipc-shm-lock-fix.patch

extract from mainline bitkeeper
Comment 4 Marcus Meissner 2005-02-01 17:20:08 UTC
2.4 is not affected (checked relevant code). 
Comment 5 Marcus Meissner 2005-02-01 17:22:53 UTC
CAN-2005-0176 
Comment 6 Hubert Mantel 2005-03-09 14:52:41 UTC
The fix seems to be fine for 2.6.8, but for 2.6.5 based kernels it will not
compile. Andrea, could you please take over? It's probably quite easy for you
(it's only some lines of code), but I would like to avoid messing things up. The
patch is already in the CVS for SP1 and SP2 and has the name "ipc-shm-lock-fix".
I disabled it in series.conf for now.
Comment 7 Andrea Arcangeli 2005-03-11 22:43:17 UTC
this patch seems not needed for SP1/SP2, these bugs have been introduced by 
redhat with their alternative approach to the mlock sysctl that we added in GA. 
 
Their alternative approach is cleaner but it's broken, this is the third fatal 
breakage found so far in their code. 
 
The first I spotted it myself in the shmget usage not being accounted before it 
merged into mainline, the second was an hole in the expand_stack #65373, and 
now there's this hole in the SHM_LOCK/UNLOCK. 
 
The only tree affected by this bug should be SL92 (like in #65373), and I 
understand you already applied it there (i.e. 2.6.8). 
 
Probably it's better to delete the file from the SP1/SP2 trees to avoid 
confusion. 
 
Thanks! 
Comment 8 Hubert Mantel 2005-03-16 08:37:43 UTC
Ok, I will delete the patch from the sp1 and sp2 trees. For 9.2, the patch is
only in the CVS but currently disabled in series.conf. Could you please have a
short look if the patch is correct for that tree, so I can enable it? Thanks!
Comment 9 Hubert Mantel 2005-03-16 08:38:27 UTC
Argl, it seems bugzilla decided to remove Andrea from the Cc: list...
Comment 10 Hubert Mantel 2005-03-16 11:13:49 UTC
Fix committed to 9.2 tree. Other trees are not vulnerable according to Andrea.
Comment 11 Marcus Meissner 2005-03-16 11:42:21 UTC
tracking 
Comment 12 Andrea Arcangeli 2005-03-17 13:02:48 UTC
All looks fine, thanks. 
Comment 13 Marcus Meissner 2005-03-24 17:22:33 UTC
updates and advisory released 
Comment 14 Thomas Biege 2009-10-13 21:02:09 UTC
CVE-2005-0176: CVSS v2 Base Score: 5.0 (AV:N/AC:L/Au:N/C:P/I:N/A:N)