]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
IB/core: Avoid leakage from kernel to user space
authorEli Cohen <eli@dev.mellanox.co.il>
Sun, 14 Sep 2014 13:47:52 +0000 (16:47 +0300)
committerJiri Slaby <jslaby@suse.cz>
Thu, 9 Apr 2015 11:13:55 +0000 (13:13 +0200)
commit 377b513485fd885dea1083a9a5430df65b35e048 upstream.

Clear the reserved field of struct ib_uverbs_async_event_desc which is
copied to user space.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/infiniband/core/uverbs_main.c

index 2df31f68ea0905ef06ac1ed054348cf669cfaa61..849c9dc7d1f6887f4b5453da06d35b0a10a383f3 100644 (file)
@@ -473,6 +473,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
 
        entry->desc.async.element    = element;
        entry->desc.async.event_type = event;
+       entry->desc.async.reserved   = 0;
        entry->counter               = counter;
 
        list_add_tail(&entry->list, &file->async_file->event_list);