Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74465 - Kernel Unrestricted SHM_UNLOCK issues (CAN-2004-0176)
Summary: Kernel Unrestricted SHM_UNLOCK issues (CAN-2004-0176)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Security
URL: http://git.kernel.org/?p=linux/kernel...
Whiteboard: [linux <2.6.10]
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-15 02:58 UTC by Thierry Carrez (RETIRED)
Modified: 2009-05-03 14:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
2.6.9 Patch (linux-2.6.9-shmLocking.patch,1.72 KB, patch)
2004-12-21 15:36 UTC, Tim Yamin (RETIRED)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Carrez (RETIRED) gentoo-dev 2004-12-15 02:58:54 UTC
http://linux.bkbits.net:8080/linux-2.6/cset@41bdc399fjcFowgsJH5ZMZ8eP-YcwA?nav=index.html
--------------------------------------
Michael Kerrisk has observed that at present any process can SHM_LOCK any
shm segment of size within process RLIMIT_MEMLOCK, despite having no
permissions on the segment: surprising, though not obviously evil.  And any
process can SHM_UNLOCK any shm segment, despite no permissions on it: that
is surely wrong.
--------------------------------------

Looks like a 2.6.x vulnerability... local DoS by massive SHM_UNLOCK ?
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2004-12-20 10:39:21 UTC
2.4 seems to have the needed check in place...
Comment 2 Tim Yamin (RETIRED) gentoo-dev 2004-12-20 13:14:52 UTC
Looks like this appeared only after 2.6.8.1 too...
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2004-12-21 15:36:39 UTC
Created attachment 46584 [details, diff]
2.6.9 Patch

Please use this; the patch in the specified URL will fail to compile unless the
rlimit code from 2.6.10_rcX happens to be backported...
Comment 4 Hanno Böck gentoo-dev 2004-12-22 05:49:08 UTC
Seems that genpatches-2.6-9.12-base contains the wrong patch (the one from bitkeeper), the patch attached by Tim Yamin in this bug works.
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2004-12-22 14:46:58 UTC
Hanno, not sure why you closed this..
Fixing the genpatches patch now.
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2004-12-24 16:37:08 UTC
Ok, all patched - the following externally maintained sources still need patching:

gentoo-dev-sources -- Adding dsd...
mips-sources -- Adding `Kumba...
rsbac-dev-sources -- Adding kang...
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2004-12-24 16:38:33 UTC
dsd: Looks like 2.6.9-r12 has the fix, thanks; it needs backporting to the SPARC branch though...
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2004-12-24 18:52:43 UTC
eradicator does the sparc branch
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2004-12-24 19:23:14 UTC
...which is already up-to-date and fixed.
Comment 10 Joshua Kinard gentoo-dev 2005-01-05 21:21:29 UTC
mips-sources fixed.
Comment 11 Guillaume Destuynder (RETIRED) gentoo-dev 2005-01-13 15:58:26 UTC
rsbac-dev-sources fixed
Comment 12 Thierry Carrez (RETIRED) gentoo-dev 2005-03-16 03:16:51 UTC
Mass-Ccing kern-sec@gentoo.org to make sure Kernel Security guys know about all
of these...
Comment 13 Tim Yamin (RETIRED) gentoo-dev 2005-03-16 06:14:30 UTC
All fixed, closing bug.