2023-12-06 06:31:33

by Kuniyuki Iwashima

[permalink] [raw]
Subject: Re: [PATCH] llc: fix uninit-value in __llc_lookup_established

From: Edward Adam Davis <[email protected]>
Date: Wed, 6 Dec 2023 09:55:15 +0800
> llc only supports ETH_P_802_2 protocol, so drop the skb when the protocol is
> not it.

This is not true. ETH_P_TR_802_2 is also processed by llc_rcv().

Let me post this formally.
https://lore.kernel.org/netdev/[email protected]/

>
> Reported-by: [email protected]
> Signed-off-by: Edward Adam Davis <[email protected]>
> ---
> net/llc/llc_input.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c
> index 51bccfb00a9c..16b2c57f38c2 100644
> --- a/net/llc/llc_input.c
> +++ b/net/llc/llc_input.c
> @@ -141,7 +141,8 @@ static inline int llc_fixup_skb(struct sk_buff *skb)
> return 0;
> if (unlikely(pskb_trim_rcsum(skb, data_size)))
> return 0;
> - }
> + } else
> + return 0;
> return 1;
> }
>
> --
> 2.43.0