Jann Horn a7f61e89af compat_ioctl: don't call do_ioctl under set_fs(KERNEL_DS)
This replaces all code in fs/compat_ioctl.c that translated
ioctl arguments into a in-kernel structure, then performed
do_ioctl under set_fs(KERNEL_DS), with code that allocates
data on the user stack and can call the VFS ioctl handler
under USER_DS.

This is done as a hardening measure because the caller
does not know what kind of ioctl handler will be invoked,
only that no corresponding compat_ioctl handler exists and
what the ioctl command number is. The accidental
invocation of an unlocked_ioctl handler that unexpectedly
calls copy_to_user could be a severe security issue.

Signed-off-by: Jann Horn <jann@thejh.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-01-08 21:18:13 -05:00
..
2015-06-30 19:44:57 -07:00
2015-06-23 18:02:01 -04:00
2015-06-25 17:00:42 -07:00
2015-04-11 22:29:40 -04:00
2015-11-13 20:34:33 -05:00
2015-11-13 21:53:18 -08:00
2015-11-23 21:11:08 -05:00
2015-11-10 12:07:22 -08:00
2015-11-16 23:54:45 -08:00
2015-11-11 02:18:27 -05:00
2015-11-16 23:54:45 -08:00
2015-08-12 15:28:45 -05:00
2015-11-13 20:34:33 -05:00