netdev.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

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