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:	Thu, 24 Jan 2013 05:01:09 -0800
From:	Joe Perches <joe@...ches.com>
To:	Sergei Shtylyov <sshtylyov@...sta.com>
Cc:	Bjørn Mork <bjorn@...k.no>,
	Oliver Neukum <oneukum@...e.de>, linux-usb@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [RFC] net: usbnet: prevent buggy devices from killing us

On Thu, 2013-01-24 at 16:39 +0400, Sergei Shtylyov wrote:
> On 24-01-2013 14:25, Bjørn Mork wrote:
> > A device sending 0 length frames as fast as it can has been
> > observed killing the host system due to the resulting memory
> > pressure.
[]
> > diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
[]
> > +	/* Do not let a device flood us to death! */
> > +	if (dev->done.qlen > 1024) {
> > +		netif_dbg(dev, rx_err, dev->net, "done queue filling up (%u) - throttling\n", dev->done.qlen);
> > +		usbnet_defer_kevent (dev, EVENT_RX_MEMORY);
> > +		usb_free_urb (urb);
> 
>     Run your patch thru scripts/checkpatch.pl please

And maybe ratelimit the netif_dbg

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