linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rds: fix an infoleak in rds_inc_info_copy
@ 2016-06-02  8:11 Kangjie Lu
  2016-06-02 15:25 ` Santosh Shilimkar
  2016-06-03  4:33 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Kangjie Lu @ 2016-06-02  8:11 UTC (permalink / raw)
  To: santosh.shilimkar
  Cc: davem, netdev, linux-kernel, taesoo, csong84, Kangjie Lu

The last field "flags" of object "minfo" is not initialized.
Copying this object out may leak kernel stack data.
Assign 0 to it to avoid leak.

Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
---
 net/rds/recv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/rds/recv.c b/net/rds/recv.c
index c0be1ec..8413f6c 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -561,5 +561,7 @@ void rds_inc_info_copy(struct rds_incoming *inc,
 		minfo.fport = inc->i_hdr.h_dport;
 	}
 
+	minfo.flags = 0;
+
 	rds_info_copy(iter, &minfo, sizeof(minfo));
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rds: fix an infoleak in rds_inc_info_copy
  2016-06-02  8:11 [PATCH] rds: fix an infoleak in rds_inc_info_copy Kangjie Lu
@ 2016-06-02 15:25 ` Santosh Shilimkar
  2016-06-03  4:33 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Santosh Shilimkar @ 2016-06-02 15:25 UTC (permalink / raw)
  To: Kangjie Lu; +Cc: davem, netdev, linux-kernel, taesoo, csong84, Kangjie Lu

On 6/2/2016 1:11 AM, Kangjie Lu wrote:
> The last field "flags" of object "minfo" is not initialized.
> Copying this object out may leak kernel stack data.
> Assign 0 to it to avoid leak.
>
> Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
> ---
>  net/rds/recv.c | 2 ++
>  1 file changed, 2 insertions(+)
>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rds: fix an infoleak in rds_inc_info_copy
  2016-06-02  8:11 [PATCH] rds: fix an infoleak in rds_inc_info_copy Kangjie Lu
  2016-06-02 15:25 ` Santosh Shilimkar
@ 2016-06-03  4:33 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-06-03  4:33 UTC (permalink / raw)
  To: kangjielu; +Cc: santosh.shilimkar, netdev, linux-kernel, taesoo, csong84, kjlu

From: Kangjie Lu <kangjielu@gmail.com>
Date: Thu,  2 Jun 2016 04:11:20 -0400

> The last field "flags" of object "minfo" is not initialized.
> Copying this object out may leak kernel stack data.
> Assign 0 to it to avoid leak.
> 
> Signed-off-by: Kangjie Lu <kjlu@gatech.edu>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-03  4:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02  8:11 [PATCH] rds: fix an infoleak in rds_inc_info_copy Kangjie Lu
2016-06-02 15:25 ` Santosh Shilimkar
2016-06-03  4:33 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).