Skip to content
Snippets Groups Projects
Commit b2d22b6b authored by Jan Kara's avatar Jan Kara
Browse files

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: default avatar <syzbot+2c49971e251e36216d1f@syzkaller.appspotmail.com>
Fixes: a8b13aa2 ("fanotify: enable FAN_REPORT_FID init flag")
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 62c9d267
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment