Commit 3af9e933 authored by Eli Cohen's avatar Eli Cohen Committed by Greg Kroah-Hartman

IB/core: Avoid leakage from kernel to user space

commit 377b5134 upstream.

Clear the reserved field of struct ib_uverbs_async_event_desc which is
copied to user space.
Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
Reviewed-by: default avatarYann Droneaud <ydroneaud@opteya.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 75a518b0
...@@ -460,6 +460,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file, ...@@ -460,6 +460,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
entry->desc.async.element = element; entry->desc.async.element = element;
entry->desc.async.event_type = event; entry->desc.async.event_type = event;
entry->desc.async.reserved = 0;
entry->counter = counter; entry->counter = counter;
list_add_tail(&entry->list, &file->async_file->event_list); list_add_tail(&entry->list, &file->async_file->event_list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment