Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: [email protected] Fixes: a8b13aa ("fanotify: enable FAN_REPORT_FID init flag") Signed-off-by: Kees Cook <[email protected]> Reviewed-by: Amir Goldstein <[email protected]> Signed-off-by: Jan Kara <[email protected]>
- Loading branch information