All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+b5ad66046b913bc04c6f@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] [net?] KMSAN: uninit-value in __llc_lookup_established
Date: Wed, 06 Dec 2023 01:07:47 -0800	[thread overview]
Message-ID: <0000000000004e991c060bd3af6d@google.com> (raw)
In-Reply-To: <0000000000001b9bed060bc75cbc@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [net?] KMSAN: uninit-value in __llc_lookup_established
Author: eadavis@qq.com

please test uninit-value in __llc_lookup_established

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1c41041124bd

diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h
index 7e73f8e5e497..cba149476e41 100644
--- a/include/net/llc_pdu.h
+++ b/include/net/llc_pdu.h
@@ -262,7 +262,8 @@ static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type,
  */
 static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa)
 {
-	if (skb->protocol == htons(ETH_P_802_2))
+	if (skb->protocol == htons(ETH_P_802_2) || 
+	    skb->protocol == htons(ETH_P_TR_802_2))
 		memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN);
 }
 
@@ -275,7 +276,8 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa)
  */
 static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da)
 {
-	if (skb->protocol == htons(ETH_P_802_2))
+	if (skb->protocol == htons(ETH_P_802_2) || 
+	    skb->protocol == htons(ETH_P_TR_802_2))
 		memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN);
 }
 
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c
index 7cac441862e2..f4f24b5d9eea 100644
--- a/net/llc/llc_input.c
+++ b/net/llc/llc_input.c
@@ -126,7 +126,8 @@ static inline int llc_fixup_skb(struct sk_buff *skb)
 
 	skb->transport_header += llc_len;
 	skb_pull(skb, llc_len);
-	if (skb->protocol == htons(ETH_P_802_2)) {
+	if (skb->protocol == htons(ETH_P_802_2)
+	    skb->protocol == htons(ETH_P_TR_802_2)) {
 		__be16 pdulen = eth_hdr(skb)->h_proto;
 		s32 data_size = ntohs(pdulen) - llc_len;
 


  parent reply	other threads:[~2023-12-06  9:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 18:25 [syzbot] [net?] KMSAN: uninit-value in __llc_lookup_established syzbot
2023-12-06  0:53 ` Kuniyuki Iwashima
2023-12-06  1:28   ` syzbot
2023-12-06  1:14 ` syzbot
2023-12-06  1:55 ` [PATCH] llc: fix " Edward Adam Davis
2023-12-06  6:27   ` Kuniyuki Iwashima
2023-12-06  7:08 ` [syzbot] [net?] KMSAN: " syzbot
2023-12-06  8:13 ` syzbot
2023-12-06  9:07 ` syzbot [this message]
2023-12-06 10:09 ` syzbot
     [not found] <tencent_8F9E041BAF4BC41B1C2558BA38BBE233E808@qq.com>
2023-12-06  1:55 ` syzbot
     [not found] <tencent_EE98A7D746C352F2464689936ED8AEF14C06@qq.com>
2023-12-06  8:01 ` syzbot
     [not found] <tencent_F966ECFECCAC7AC26D7C2C3D6F049664E80A@qq.com>
2023-12-06  8:23 ` syzbot
     [not found] <tencent_7D2FCFAD8DEEA5D60DCF9236DD9B5DAD9907@qq.com>
2023-12-06  9:24 ` syzbot
     [not found] <tencent_832FC96FC0960CE862ED52CF3079966C4C0A@qq.com>
2023-12-06 10:29 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0000000000004e991c060bd3af6d@google.com \
    --to=syzbot+b5ad66046b913bc04c6f@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.