diff options
author | Kangjie Lu <kangjielu@gmail.com> | 2016-05-03 16:35:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-18 17:04:01 -0700 |
commit | f3a0b05e04b862ffc549b5635339a5cee00da34d (patch) | |
tree | 0c4c2366c3c828f7b2690c8aa2369bf2a74e3b80 | |
parent | d6b8a68ac7b6d2e241f8d34b769c98a1793d9124 (diff) | |
download | lwn-f3a0b05e04b862ffc549b5635339a5cee00da34d.tar.gz lwn-f3a0b05e04b862ffc549b5635339a5cee00da34d.zip |
net: fix infoleak in llc
[ Upstream commit b8670c09f37bdf2847cc44f36511a53afc6161fd ]
The stack object “info” has a total size of 12 bytes. Its last byte
is padding which is not initialized and leaked via “put_cmsg”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/llc/af_llc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 0080d2b0a8ae..a76a67d38ec3 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -626,6 +626,7 @@ static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) if (llc->cmsg_flags & LLC_CMSG_PKTINFO) { struct llc_pktinfo info; + memset(&info, 0, sizeof(info)); info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex; llc_pdu_decode_dsap(skb, &info.lpi_sap); llc_pdu_decode_da(skb, info.lpi_mac); |