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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 03 Dec 2007 14:47:16 +0100
From:	Peter Korsgaard <jacmet@...site.dk>
To:	Wang Chen <wangchen@...fujitsu.com>
Cc:	Jeff Garzik <jgarzik@...ox.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Dustin McIntire <dustin@...soria.com>, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

>>>>> "Wang" == Wang Chen <wangchen@...fujitsu.com> writes:

Hi,

 Wang> +	len = skb->len;
 Wang>  	netif_rx(skb);
 dev-> stats.rx_packets++;
 Wang> -	dev->stats.rx_bytes += skb->len;
 Wang> +	dev->stats.rx_bytes += len;

Why not simply update the stats before calling netif_rx as the return
value isn't checked anyway?

-- 
Bye, Peter Korsgaard
--
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