lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 25 Mar 2008 14:16:40 +0900
From:	"Joonwoo Park" <joonwpark81@...il.com>
To:	davem@...emloft.net
Cc:	netdev@...r.kernel.org, joonwpark81@...il.com,
	"Arnaldo Carvalho de Melo" <acme@...hat.com>
Subject: Re: [PATCH 2/3] [LLC]: bogus llc packet length

2008/3/25, Arnaldo Carvalho de Melo <acme@...hat.com>:
> Em Mon, Mar 24, 2008 at 05:34:16PM +0900, joonwpark81@...il.com escreveu:
> > From: Joonwoo Park <joonwpark81@...il.com>
> >
> > discard llc packet which has bogus packet length.
> >
> > Signed-off-by: Joonwoo Park <joonwpark81@...il.com>
> > ---
> > diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c
> > index c40c9b2..a2bbc7c 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;
>
> Rewrite this as:
>
>                if (data_size < 0 ||
>                    ((skb_tail_pointer(skb) -
>                      (u8 *)pdu) - llc_len) < data_size)

Thanks Arnaldo.
Dave, I'll update this with the others.

>
> And stick my:
>
> Acked-by: Arnaldo Carvalho de Melo <acme@...hat.com>
>
> :-)

Thanks,
Joonwoo
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ