Skip to content

Commit 4116def

Browse files
kengiterdavem330
authored andcommitted
rds: fix an infoleak in rds_inc_info_copy
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>
1 parent 5d2be14 commit 4116def

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: net/rds/recv.c

+2
Original file line numberDiff line numberDiff line change
@@ -561,5 +561,7 @@ void rds_inc_info_copy(struct rds_incoming *inc,
561561
minfo.fport = inc->i_hdr.h_dport;
562562
}
563563

564+
minfo.flags = 0;
565+
564566
rds_info_copy(iter, &minfo, sizeof(minfo));
565567
}

0 commit comments

Comments
 (0)