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)
committerJiri Slaby <jslaby@suse.cz>
Fri, 28 Apr 2017 17:30:37 +0000 (19:30 +0200)
commit9840e8fb9edaa9a930eb6f922f61cfbf91073c51
tree6e49dc52a8bb17140aa03517e5ba6c47e04bac88
parent622253b639cd731b3b10e21a4f312db57b1cf2e1
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: Jiri Slaby <jslaby@suse.cz>
mm/mempolicy.c