linux-kernel-test/fs/notify/fanotify
Al Viro 3587b1b097 fanotify: fix FAN_Q_OVERFLOW case of fanotify_read()
If the FAN_Q_OVERFLOW bit set in event->mask, the fanotify event
metadata will not contain a valid file descriptor, but
copy_event_to_user() didn't check for that, and unconditionally does a
fd_install() on the file descriptor.

Which in turn will cause a BUG_ON() in __fd_install().

Introduced by commit 352e3b2492 ("fanotify: sanitize failure exits in
copy_event_to_user()")

Mea culpa - missed that path ;-/

Reported-by: Alex Shi <lkml.alex@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-11-18 09:30:00 -10:00
..
fanotify_user.c fanotify: fix FAN_Q_OVERFLOW case of fanotify_read() 2012-11-18 09:30:00 -10:00
fanotify.c fanotify: fix missing break 2012-11-09 06:41:47 +01:00
Kconfig Kconfig: typo: and -> an 2010-11-01 15:17:29 -04:00
Makefile fanotify: fanotify_init syscall declaration 2010-07-28 09:58:55 -04:00