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]
Message-ID: <20120109124108.GA4404@cherladcori01>
Date:	Mon, 9 Jan 2012 13:41:08 +0100
From:	Richard Cochran <richardcochran@...il.com>
To:	Manfred Rudigier <manfred.rudigier@...cron.at>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"afleming@...escale.com" <afleming@...escale.com>,
	"avorontsov@...sta.com" <avorontsov@...sta.com>
Subject: Re: [PATCH] gianfar: Fix invalid TX frames returned on error queue
 when time stamping.

On Mon, Jan 09, 2012 at 10:36:44AM +0100, Manfred Rudigier wrote:
> From: Eric Dumazet [mailto:eric.dumazet@...il.com]
> Sent: Monday, January 09, 2012 08:44
> 
> >Le lundi 09 janvier 2012 à 08:16 +0100, Manfred Rudigier a écrit :
> >> From: David Miller [mailto:davem@...emloft.net]
> >> Sent: Thursday, January 05, 2012 19:27
> >>
> >> >From: Manfred Rudigier <manfred.rudigier@...cron.at>
> >> >Date: Thu, 5 Jan 2012 15:50:21 +0100
> >> >
> >> >> +
> >> >> +		/* Keep sock if we must return a time stamp on the err queue */
> >> >> +		skb_new->sk = skb->sk;
> >> >
> >> >When I see something like this without any kind of reference counting
> >> >or similar, I am gravely concerned.
> >>
> >> The skb_tstamp_tx function called during gfar_clean_tx_ring requires
> >> the skb->sk pointer to be set. Otherwise no time stamp can be queued
> >> on the socket error queue.
> >> What would be the correct way for doing this?
> >
> >I really wonder how your code was possibly working...
> 
> Well, it was working :-)

It was only working because the conditional was always false:

	if (((skb->ip_summed == CHECKSUM_PARTIAL) ||
      	   		vlan_tx_tag_present(skb) ||
			unlikely(do_tstamp)) &&
			(skb_headroom(skb) < GMAC_FCB_LEN)) {
		struct sk_buff *skb_new;
		...
	}

IOW, there was always at least GMAC_FCB_LEN bytes in skb_headroom.

Richard
--
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