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
| ||
|
Date: Mon, 14 Feb 2011 13:13:01 +0800 From: "Guo-Fu Tseng" <cooldavid@...ldavid.org> To: David Miller <davem@...emloft.net> Cc: netdev@...r.kernel.org, arieslee@...cron.com, devinchiu@...cron.com, ethanhsiao@...cron.com Subject: Re: [PATCH net-next-2.6 8/9] jme: Don't show UDP Checksum error if HW misjudged On Sun, 13 Feb 2011 20:43:00 -0800 (PST), David Miller wrote > From: "Guo-Fu Tseng" <cooldavid@...ldavid.org> > Date: Mon, 14 Feb 2011 12:27:41 +0800 > > > @@ -956,8 +956,27 @@ jme_disable_rx_engine(struct jme_adapter *jme) > > jme_mac_rxclk_off(jme); > > } > > > > +static u16 > > +jme_udpsum(struct sk_buff *skb) > > +{ > > + u16 csum = 0xFFFFu; > > + > > + if (skb->protocol != htons(ETH_P_IP)) > > + return csum; > > + skb_set_network_header(skb, ETH_HLEN); > > + if (ip_hdr(skb)->protocol != IPPROTO_UDP) > > + return csum; > > + skb_set_transport_header(skb, > > + ETH_HLEN + (ip_hdr(skb)->ihl << 2)); > > + csum = udp_hdr(skb)->check; > > + skb_reset_transport_header(skb); > > + skb_reset_network_header(skb); > > + > > + return csum; > > +} > > You need to validate the packet length in all of these packet header > accesses, otherwise you're potentially looking at garbage. Thank you! Redoing this path, I'll send it later. :) Guo-Fu Tseng -- 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