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)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:04:43 +0000 (14:04 +0200)
commitef67ca9962ce88f252dff0fee1f68212a87fa366
tree64f24cb7e100a57e914be863eead25e71837e1ad
parent4261679ad36ca1703436d54914ab0505598bf706
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: Willy Tarreau <w@1wt.eu>
mm/mempolicy.c