Skip to content

Commit

Permalink
rds: fix an infoleak in rds_inc_info_copy
Browse files Browse the repository at this point in the history
commit 4116def 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>
  • Loading branch information
Kangjie Lu authored and Greg Kroah-Hartman committed Sep 11, 2016
1 parent f842188 commit d57906c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/rds/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,5 +543,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));
}

0 comments on commit d57906c

Please sign in to comment.