[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080328131317.GQ14945@ghostprotocols.net>
Date: Fri, 28 Mar 2008 10:13:17 -0300
From: Arnaldo Carvalho de Melo <acme@...hat.com>
To: Joonwoo Park <joonwpark81@...il.com>
Cc: davem@...emloft.net, Arnaldo Carvalho de Melo <acme@...hat.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH 2/3] [LLC]: bogus llc packet length
Em Fri, Mar 28, 2008 at 04:59:35PM +0900, Joonwoo Park escreveu:
> discard llc packet which has bogus packet length.
>
> Signed-off-by: Joonwoo Park <joonwpark81@...il.com>
> Acked-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Dave, can you please apply this one?
> net/llc/llc_input.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c
> index c40c9b2..bfd2567 100644
> --- a/net/llc/llc_input.c
> +++ b/net/llc/llc_input.c
> @@ -117,8 +117,12 @@ static inline int llc_fixup_skb(struct sk_buff *skb)
> skb_pull(skb, llc_len);
> if (skb->protocol == htons(ETH_P_802_2)) {
> __be16 pdulen = eth_hdr(skb)->h_proto;
> - u16 data_size = ntohs(pdulen) - llc_len;
> + s32 data_size = ntohs(pdulen) - llc_len;
>
> + if (data_size < 0 ||
> + ((skb_tail_pointer(skb) -
> + (u8 *)pdu) - llc_len) < data_size)
> + return 0;
> if (unlikely(pskb_trim_rcsum(skb, data_size)))
> return 0;
> }
> --
> 1.5.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists