summaryrefslogtreecommitdiff
path: root/fs/notify
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-07-08 15:59:40 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-11 18:35:24 -0700
commit0297fe5a50da955224e6e26c320383760edce01b (patch)
treeb70186e961050478c1e1caa10a169c35a16d6272 /fs/notify
parent6b9f3486bb756d0aa6c00d7f745c8ca65ff35f07 (diff)
downloadlinux-3.10-0297fe5a50da955224e6e26c320383760edce01b.tar.gz
linux-3.10-0297fe5a50da955224e6e26c320383760edce01b.tar.bz2
linux-3.10-0297fe5a50da955224e6e26c320383760edce01b.zip
fanotify: info leak in copy_event_to_user()
commit de1e0c40aceb9d5bff09c3a3b97b2f1b178af53f upstream. The ->reserved field isn't cleared so we leak one byte of stack information to userspace. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Eric Paris <eparis@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/notify')
-rw-r--r--fs/notify/fanotify/fanotify_user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index 6c80083a984..77cc85dd0db 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -122,6 +122,7 @@ static int fill_event_metadata(struct fsnotify_group *group,
metadata->event_len = FAN_EVENT_METADATA_LEN;
metadata->metadata_len = FAN_EVENT_METADATA_LEN;
metadata->vers = FANOTIFY_METADATA_VERSION;
+ metadata->reserved = 0;
metadata->mask = event->mask & FAN_ALL_OUTGOING_EVENTS;
metadata->pid = pid_vnr(event->tgid);
if (unlikely(event->mask & FAN_Q_OVERFLOW))