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: <CF9D1877D81D214CB0CA0669EFAE020C26A2A3A4@CMEXMB1.ad.emulex.com>
Date:	Wed, 16 Oct 2013 12:08:08 +0000
From:	Sathya Perla <Sathya.Perla@...lex.Com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH 2/2] be2net: drop non-tso frames longer than mtu

> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@...il.com]
> >
> > Pktgen can generate non-TSO frames of arbitrary length disregarding
> > the MTU value of the physical interface. Drop such frames in the driver
> > instead of sending them to HW as it cannot handle such frames.
> >
> > Signed-off-by: Vasundhara Volam <vasundhara.volam@...lex.com>
> > Signed-off-by: Sathya Perla <sathya.perla@...lex.com>
> > ---
> >  drivers/net/ethernet/emulex/benet/be_main.c |    9 +++++++--
> >  1 files changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/emulex/benet/be_main.c
> b/drivers/net/ethernet/emulex/benet/be_main.c
> > index 2c38cc4..76057b8 100644
> > --- a/drivers/net/ethernet/emulex/benet/be_main.c
> > +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> > @@ -855,6 +855,13 @@ static struct sk_buff *be_xmit_workarounds(struct be_adapter
> *adapter,
> >  	unsigned int eth_hdr_len;
> >  	struct iphdr *ip;
> >
> > +	/* Don't allow non-TSO packets longer than MTU */
> > +	eth_hdr_len = (ntohs(skb->protocol) == ETH_P_8021Q) ?
> > +			VLAN_ETH_HLEN : ETH_HLEN;
> > +	if (!skb_is_gso(skb) &&
> > +	    (skb->len - eth_hdr_len) > adapter->netdev->mtu)
> > +			goto tx_drop;
> > +
> 
> When you say 'cannot handle them', is it some kind of nasty thing like
> hang / crash ?
This chip goes into an unrecoverable error state (needing a server reboot to rectify.)

> 
> One could imagine gso_size + sizeof(headers) > mtu, and give the same
> problem ?
Won't the mss (gso_size) value for TCP pkts be derived from the mtu of the out-going interface?
In that case when will gso_size + headers > mtu?
In any case, for TSO pkts, the HW just drops pkts when frames after segmentation
are longer than 9018bytes (or in recent FW versions 9200b)

> 
> 
> AFAIK, we have no check in net/core/dev.c.
> 
> Maybe we should instead add them there (and in pktgen)
I agree; doing this will solve issues with any other drivers/devices if they have a similar problem.

thanks,
-Sathya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ