diff options
author | Peilin Ye <yepeilin.cs@gmail.com> | 2020-08-20 16:30:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-20 21:07:31 +0200 |
commit | ce51f63e63c52a4e1eee4dd040fb0ba0af3b43ab (patch) | |
tree | 75d0baf07941877876df7f4fb99e3bb73551be9d /drivers/net | |
parent | sfc: fix build warnings on 32-bit (diff) | |
download | linux-ce51f63e63c52a4e1eee4dd040fb0ba0af3b43ab.tar.xz linux-ce51f63e63c52a4e1eee4dd040fb0ba0af3b43ab.zip |
net/smc: Prevent kernel-infoleak in __smc_diag_dump()
__smc_diag_dump() is potentially copying uninitialized kernel stack memory
into socket buffers, since the compiler may leave a 4-byte hole near the
beginning of `struct smcd_diag_dmbinfo`. Fix it by initializing `dinfo`
with memset().
Fixes: 4b1b7d3b30a6 ("net/smc: add SMC-D diag support")
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
0 files changed, 0 insertions, 0 deletions