summaryrefslogtreecommitdiff
path: root/net/rds/recv.c
diff options
context:
space:
mode:
authorKangjie Lu <kangjielu@gmail.com>2016-06-02 04:11:20 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-15 08:27:51 +0200
commitffd5ce2ad5fd140ddd492ab2064e29e86aaa64ea (patch)
tree73eea9616aebff03a9809658e790f7ed1c3d26e6 /net/rds/recv.c
parent0e324f6d66549b6a98122f2bd8da5ae56b018956 (diff)
rds: fix an infoleak in rds_inc_info_copy
commit 4116def2337991b39919f3b448326e21c40e0dbb upstream. 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> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Juerg Haefliger <juerg.haefliger@hpe.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/rds/recv.c')
-rw-r--r--net/rds/recv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c
index a00462b0d01d..0514af3ab378 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -545,5 +545,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));
}