mm/mempolicy.c: fix error handling in set_mempolicy and mbind.
commitb73d08ce20c5cb2e0cec8c019a27b9574e2c4ec2
authorChris Salls <salls@cs.ucsb.edu>
Sat, 8 Apr 2017 06:48:11 +0000 (7 23:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Apr 2017 10:38:35 +0000 (12 12:38 +0200)
treeb328e2e3976507d457da7241992dd78f5e6e852f
parent2d1af1b7025f96c86938af7f7c54d60adb4773fe
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