aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2014-09-14 16:47:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-19 10:11:06 +0200
commit485d37770f43e476566ec83c8059c81989a86301 (patch)
tree736b69773fb03ea7beaf2033f580809da7d6bc36 /drivers
parent5ab0f4da798ac88c2f320806b872212cabbc7f5d (diff)
downloadlinux-linaro-stable-485d37770f43e476566ec83c8059c81989a86301.tar.gz
IB/core: Avoid leakage from kernel to user space
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/core/uverbs_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index 08219fb3338b..7a515c867674 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -476,6 +476,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);