From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Kangjie Lu" , "David S. Miller" , "Kangjie Lu" Date: Sun, 12 Jun 2016 22:34:42 +0100 Message-ID: Subject: [PATCH 3.2 44/46] net: fix infoleak in llc In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.2.81-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Kangjie Lu commit b8670c09f37bdf2847cc44f36511a53afc6161fd upstream. 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 Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/llc/af_llc.c | 1 + 1 file changed, 1 insertion(+) --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -627,6 +627,7 @@ static void llc_cmsg_rcv(struct msghdr * 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);