]> git.baikalelectronics.ru Git - kernel.git/commit
mm/mempolicy: fix get_nodes out of bound access
authorTianyu Li <tianyu.li@arm.com>
Wed, 1 Jun 2022 09:32:11 +0000 (17:32 +0800)
committerakpm <akpm@linux-foundation.org>
Mon, 4 Jul 2022 01:08:39 +0000 (18:08 -0700)
commit01697af165bbe2a3e4ac8f4a985c71b2025f9549
treec7c6c6574409f06dd8fc55becb3ca855dcfc4516
parent723f5ae073127839ec0f5a84e5858201577be435
mm/mempolicy: fix get_nodes out of bound access

When user specified more nodes than supported, get_nodes will access nmask
array out of bounds.

Link: https://lkml.kernel.org/r/20220601093211.2970565-1-tianyu.li@arm.com
Fixes: 4ed2e8d12f40 ("mm: simplify compat numa syscalls")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mempolicy.c