Jan Kara b2d22b6bb3 fanotify: Allow copying of file handle to userspace
When file handle is embedded inside fanotify_event and usercopy checks
are enabled, we get a warning like:

Bad or missing usercopy whitelist? Kernel memory exposure attempt detected
from SLAB object 'fanotify_event' (offset 40, size 8)!
WARNING: CPU: 1 PID: 7649 at mm/usercopy.c:78 usercopy_warn+0xeb/0x110
mm/usercopy.c:78

Annotate handling in fanotify_event properly to mark copying it to
userspace is fine.

Reported-by: syzbot+2c49971e251e36216d1f@syzkaller.appspotmail.com
Fixes: a8b13aa20afb ("fanotify: enable FAN_REPORT_FID init flag")
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2019-03-19 09:29:07 +01:00
..
2019-03-08 14:12:17 -08:00
2019-03-09 10:54:24 -08:00
2018-08-21 23:54:17 -04:00
\n
2019-03-07 09:01:33 -08:00
2019-03-09 10:54:24 -08:00
2019-03-09 10:54:24 -08:00
2018-11-30 14:56:14 -08:00
2018-08-17 16:20:28 -07:00
2018-09-29 22:47:48 -04:00
2019-03-06 14:52:48 -08:00
2019-01-02 16:35:23 -08:00
2018-05-22 14:27:52 -04:00
2018-11-05 14:57:05 -05:00
2019-03-09 15:53:03 -08:00
2018-05-22 14:27:52 -04:00
2019-03-08 14:12:17 -08:00
2018-07-03 16:44:45 -04:00
2019-02-24 08:20:17 -07:00
2018-10-29 14:29:58 -07:00
2018-06-05 19:23:26 +02:00
2018-12-31 09:46:39 -08:00
2019-03-07 18:32:01 -08:00
2019-03-08 14:48:40 -08:00
2018-08-21 18:19:09 -07:00
2019-02-24 08:20:17 -07:00
2019-02-05 21:28:13 -05:00
2019-03-09 16:53:47 -08:00
2019-03-07 12:20:11 -08:00
2018-08-21 18:19:09 -07:00
2019-02-07 16:38:35 +01:00