Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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

I was told it's CVE-2005-3358
(one has to love these security people - they make everything sound important)

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Andi Kleen and committed by
Linus Torvalds
8f493d79 abe842eb

+4
+4
mm/mempolicy.c
··· 161 161 switch (mode) { 162 162 case MPOL_INTERLEAVE: 163 163 policy->v.nodes = *nodes; 164 + if (nodes_weight(*nodes) == 0) { 165 + kmem_cache_free(policy_cache, policy); 166 + return ERR_PTR(-EINVAL); 167 + } 164 168 break; 165 169 case MPOL_PREFERRED: 166 170 policy->v.preferred_node = first_node(*nodes);