From: Eli Cohen Date: Sun, 14 Sep 2014 13:47:52 +0000 (+0300) Subject: IB/core: Avoid leakage from kernel to user space X-Git-Tag: firefly_0821_release~176^2~2998^2^4~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=377b513485fd885dea1083a9a5430df65b35e048;p=firefly-linux-kernel-4.4.55.git IB/core: Avoid leakage from kernel to user space Clear the reserved field of struct ib_uverbs_async_event_desc which is copied to user space. Signed-off-by: Eli Cohen Reviewed-by: Yann Droneaud Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index c73b22a257fe..b21af1eaf503 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -477,6 +477,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);