From: Dan Carpenter Date: Thu, 27 Jun 2013 23:50:55 +0000 (+1000) Subject: fanotify: info leak in copy_event_to_user() X-Git-Tag: next-20130628~3^2~669 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=286351ec6191415a035372d7e7c14d9a9597df77;p=karo-tx-linux.git fanotify: info leak in copy_event_to_user() The ->reserverd field isn't cleared so we leak one byte of stack information to userspace. Signed-off-by: Dan Carpenter Cc: Eric Paris Cc: Al Viro Signed-off-by: Andrew Morton --- diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 1ea52f7c031f..e16076d386c4 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))