Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1393796 > unrolled thread

[PATCH] fix infoleak in llc

Started byKangjie Lu <kangjielu@gmail.com>
First post2016-05-03 22:40 +0200
Last post2016-05-04 22:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] fix infoleak in llc Kangjie Lu <kangjielu@gmail.com> - 2016-05-03 22:40 +0200
    Re: [PATCH] fix infoleak in llc David Miller <davem@davemloft.net> - 2016-05-04 22:30 +0200

#1393796 — [PATCH] fix infoleak in llc

FromKangjie Lu <kangjielu@gmail.com>
Date2016-05-03 22:40 +0200
Subject[PATCH] fix infoleak in llc
Message-ID<ruPgS-6BH-13@gated-at.bofh.it>
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>
---
 net/llc/af_llc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index b3c52e3..8ae3ed9 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);
-- 
1.9.1

[toc] | [next] | [standalone]


#1394704

FromDavid Miller <davem@davemloft.net>
Date2016-05-04 22:30 +0200
Message-ID<rvbAL-2kO-27@gated-at.bofh.it>
In reply to#1393796
From: Kangjie Lu <kangjielu@gmail.com>
Date: Tue,  3 May 2016 16:35:05 -0400

> 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>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web