diff mbox

[for-next,3/6] IB/core: Avoid leakage from kernel to user space

Message ID 1410702475-28826-4-git-send-email-eli@mellanox.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Eli Cohen Sept. 14, 2014, 1:47 p.m. UTC
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>
---
 drivers/infiniband/core/uverbs_main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Yann Droneaud Sept. 15, 2014, 1:45 p.m. UTC | #1
Hi,

Le dimanche 14 septembre 2014 à 16:47 +0300, Eli Cohen a écrit :
> Clear the reserved field of struct ib_uverbs_async_event_desc which is 
> copied to user space.
> 

This one could be applied right now on v3.17 and others.

> Signed-off-by: Eli Cohen <eli@mellanox.com>

Reviewed-by: Yann Droneaud <ydroneaud@opteya.com>
Cc: stable@vger.kernel.org

Regards.

> ---
>  drivers/infiniband/core/uverbs_main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 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);


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yann Droneaud March 27, 2015, 12:42 p.m. UTC | #2
Hi,

Please add commit 377b513485fd ("IB/core: Avoid leakage from kernel to
user space") to -stable. It can be applied to v2.6.32 and later.

Regards.
Luis Henriques March 30, 2015, 10:21 a.m. UTC | #3
On Fri, Mar 27, 2015 at 01:42:44PM +0100, Yann Droneaud wrote:
> Hi,
> 
> Please add commit 377b513485fd ("IB/core: Avoid leakage from kernel to
> user space") to -stable. It can be applied to v2.6.32 and later.
> 
> Regards.
> 
> -- 
> Yann Droneaud
> OPTEYA
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks, I'm queuing it for the 3.16 kernel.

Cheers,
--
Luís
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiri Slaby March 31, 2015, 9:49 a.m. UTC | #4
On 03/27/2015, 01:42 PM, Yann Droneaud wrote:
> Hi,
> 
> Please add commit 377b513485fd ("IB/core: Avoid leakage from kernel to
> user space") to -stable. It can be applied to v2.6.32 and later.

Now pushed to 3.12. Thanks.
Ben Hutchings May 4, 2015, 11:04 p.m. UTC | #5
On Fri, 2015-03-27 at 13:42 +0100, Yann Droneaud wrote:
> Hi,
> 
> Please add commit 377b513485fd ("IB/core: Avoid leakage from kernel to
> user space") to -stable. It can be applied to v2.6.32 and later.

Queued up for 3.2, thanks.

Ben.
Zefan Li June 15, 2015, 3:31 a.m. UTC | #6
On 2015/3/27 20:42, Yann Droneaud worte:
> Hi,
> 
> Please add commit 377b513485fd ("IB/core: Avoid leakage from kernel to
> user space") to -stable. It can be applied to v2.6.32 and later.
> 

Queued up for 3.4. Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);