Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117855 - Kernel: Local DoS through set_mempolicy (CVE-2005-3358)
Summary: Kernel: Local DoS through set_mempolicy (CVE-2005-3358)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Kernel (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Security
URL:
Whiteboard: [linux < 2.6.15]
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-05 01:33 UTC by Thierry Carrez (RETIRED)
Modified: 2009-05-03 15:56 UTC (History)
5 users (show)

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


Attachments
mempolicy-interleave-mask-node.patch (for 2.6.14) (1110_mempolicy-interleave-mask-node.patch,1.12 KB, patch)
2006-01-10 13:33 UTC, kfm
no flags Details | Diff
mempolicy-interleave-mask-node.patch (revision) (1110_mempolicy-interleave-mask-node.patch,1.15 KB, patch)
2006-01-10 13:40 UTC, kfm
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 2006-01-05 01:33:48 UTC
Doug Chapman reported an error in "mm/mempolicy.c" when handling policy system calls, which could be exploited by local attackers to cause a denial of service via a "set_mempolicy" call with a 0 bitmask.

http://www.frsirt.com/english/advisories/2006/0035

-----------------------

commit 8f493d797bc1fe470377adc9d8775845427e240e
Author: Andi Kleen <ak@suse.de>
Date:   Tue Jan 3 00:07:28 2006 +0100

    [PATCH] Make sure interleave masks have at least one node set
    
    Otherwise a bad mem policy system call can confuse the interleaving
    code into referencing undefined nodes.
    
    Originally reported by Doug Chapman
Comment 2 Tim Yamin (RETIRED) gentoo-dev 2006-01-10 10:24:33 UTC
CCing maintainers: please either upgrade to 2.6.15 fix with the patch in the URL. Thanks.

hardened-sources-2.6: hardened herd
mips-sources-2.6.1{3,4}: Kumba
rsbac-sources-2.6: kang
sh-sources-2.6: sh herd
usermode-sources-2.6: dsd
xbox-sources-2.6: gimli
Comment 3 kfm 2006-01-10 12:12:10 UTC
The referenced patch only applies to 2.6.15 (at least, I've confirmed that it does not apply to 2.6.14). Due attention required in terms of backporting.
Comment 4 kfm 2006-01-10 13:33:15 UTC
Created attachment 76773 [details, diff]
mempolicy-interleave-mask-node.patch (for 2.6.14)

Here's a backport of the patch for 2.6.14 courtesy of plasmaroo. I've had two users test this just recently and it appears to be valid.
Comment 5 kfm 2006-01-10 13:40:56 UTC
Created attachment 76776 [details, diff]
mempolicy-interleave-mask-node.patch (revision)

Reference the correct bug number this time and changed to a typical "-p1" style patch.
Comment 6 kfm 2006-01-12 12:03:21 UTC
The aformentioned patch was added to genpatches-2.6.14-9.base (the tarball of which has now been distributed on the mirrors), see http://dev.gentoo.org/~dsd/genpatches/releases-2.6.14.htm and http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.14/.

Also, this is fixed in hardened-sources-2.6.14-r4.
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2006-01-21 15:39:55 UTC
usermode now on 2.6.15
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2006-04-15 12:04:11 UTC
All fixed now, closing bug.