f378ba7
From 4116def2337991b39919f3b448326e21c40e0dbb Mon Sep 17 00:00:00 2001
f378ba7
From: Kangjie Lu <kangjielu@gmail.com>
f378ba7
Date: Thu, 2 Jun 2016 04:11:20 -0400
f378ba7
Subject: rds: fix an infoleak in rds_inc_info_copy
f378ba7
f378ba7
The last field "flags" of object "minfo" is not initialized.
f378ba7
Copying this object out may leak kernel stack data.
f378ba7
Assign 0 to it to avoid leak.
f378ba7
f378ba7
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
f378ba7
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
f378ba7
Signed-off-by: David S. Miller <davem@davemloft.net>
f378ba7
---
f378ba7
 net/rds/recv.c | 2 ++
f378ba7
 1 file changed, 2 insertions(+)
f378ba7
f378ba7
diff --git a/net/rds/recv.c b/net/rds/recv.c
f378ba7
index c0be1ec..8413f6c 100644
f378ba7
--- a/net/rds/recv.c
f378ba7
+++ b/net/rds/recv.c
f378ba7
@@ -561,5 +561,7 @@ void rds_inc_info_copy(struct rds_incoming *inc,
f378ba7
 		minfo.fport = inc->i_hdr.h_dport;
f378ba7
 	}
f378ba7
 
f378ba7
+	minfo.flags = 0;
f378ba7
+
f378ba7
 	rds_info_copy(iter, &minfo, sizeof(minfo));
f378ba7
 }
f378ba7
-- 
f378ba7
cgit v0.12
f378ba7