mm/mempolicy.c: fix error handling in set_mempolicy and mbind.
authorChris Salls <salls@cs.ucsb.edu>
Sat, 8 Apr 2017 06:48:11 +0000 (23:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Apr 2017 10:41:15 +0000 (12:41 +0200)
commitcddab768d13469d1e254fb8c0e1629f93c8dfaca
tree5ebc41c261be8f1b3c457a942f56484c5cbe241d
parent24317cb6b400d7fc567e4c8d1fdca587113c6423
mm/mempolicy.c: fix error handling in set_mempolicy and mbind.

commit cf01fb9985e8deb25ccf0ea54d916b8871ae0e62 upstream.

In the case that compat_get_bitmap fails we do not want to copy the
bitmap to the user as it will contain uninitialized stack data and leak
sensitive data.

Signed-off-by: Chris Salls <salls@cs.ucsb.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mm/mempolicy.c