: bogus llc packet length
Subsystems (2)
Arnaldo Carvalho de Melo
Acked-byEm Mon, Mar 24, 2008 at 05:34:16PM +0900, [email protected] escreveu:
Quoted 11 lines
From: Joonwoo Park <[email protected]>
discard llc packet which has bogus packet length.
Signed-off-by Joonwoo Park <[email protected]>---
net/llc/llc_input.c +0
-0
net/llc/llc_input.c static inline int llc_fixup_skb(struct sk_buff *skb) · line 125
Quoted 10 lines
net/llc/llc_input.c +5
-1@@ -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)
And stick my:
:-)
Quoted 10 lines
net/llc/llc_input.c +0
-0if (unlikely (pskb_trim_rcsum (skb, data_size)))return 0 ; }Signature · 6 lines
1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
2008/3/25, Arnaldo Carvalho de Melo <[email protected]>:
Quoted 25 lines
Em Mon, Mar 24, 2008 at 05:34:16PM +0900, [email protected] escreveu:
Quoted 11 lines
From: Joonwoo Park <[email protected]>
discard llc packet which has bogus packet length.
Signed-off-by Joonwoo Park <[email protected]>---
net/llc/llc_input.c +0
-0net/llc/llc_input.c static inline int llc_fixup_skb(struct sk_buff *skb) · line 125
Quoted 10 lines
net/llc/llc_input.c +5
-1@@ -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:
Quoted 3 lines
if (data_size < 0 ||
((skb_tail_pointer(skb) -
(u8 *)pdu) - llc_len) < data_size)Thanks Arnaldo.
Dave, I'll update this with the others.
Quoted 6 lines
And stick my:
:-)
Thanks,
Joonwoo