]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm, hugetlb: remove unnecessary lower bound on sysctl handlers"?
authorAndrey Ryabinin <a.ryabinin@samsung.com>
Tue, 10 Feb 2015 22:11:33 +0000 (14:11 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 13:10:53 +0000 (14:10 +0100)
commit89316deb0dd1bbc8c4eff6b005ce66f30f378112
treee00f64d7e6a0c5e6217aacdf55be37efbe8332bb
parent3ffc797a2722ae09fdc2167b316c695f0b903e91
mm, hugetlb: remove unnecessary lower bound on sysctl handlers"?

commit 3cd7645de624939c38f5124b4ac15f8b35a1a8b7 upstream.

Commit ed4d4902ebdd ("mm, hugetlb: remove hugetlb_zero and
hugetlb_infinity") replaced 'unsigned long hugetlb_zero' with 'int zero'
leading to out-of-bounds access in proc_doulongvec_minmax().  Use
'.extra1 = NULL' instead of '.extra1 = &zero'.  Passing NULL is
equivalent to passing minimal value, which is 0 for unsigned types.

Fixes: ed4d4902ebdd ("mm, hugetlb: remove hugetlb_zero and hugetlb_infinity")
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Suggested-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/sysctl.c