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: <Pine.LNX.4.44L0.1506091114340.1324-100000@iolanthe.rowland.org>
Date:	Tue, 9 Jun 2015 11:16:48 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Kishon Vijay Abraham I <kishon@...com>
cc:	Michael Trimarchi <michael@...rulasolutions.com>,
	Felipe Balbi <balbi@...com>, <gregkh@...uxfoundation.org>,
	<linux-omap@...r.kernel.org>, <nsekhar@...com>,
	<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>
Subject: Re: [RFC PATCH] usb: dwc3: ep0: Fix mem corruption on OUT transfers
 of more than 512 bytes

On Tue, 9 Jun 2015, Kishon Vijay Abraham I wrote:

> > Why not just make the bounce buffer size the same as the maxpacket
> > size?  In other words, 1024 bytes instead of 512, for ep0 on a USB-3
> > device.
> 
> It would still be possible for the host to send data more than 1024 bytes no? 

Yes.

> When working with DFU gadget, I've seen host sends data upto 4KB. Changing the 
> bounce buffer size might not be able to fix all the cases IMO. The actual fix 
> will be something like [1]
> 
> [1] -> http://comments.gmane.org/gmane.linux.kernel/1883688

But with a bounce buffer that's only 512 bytes long, you can never send
an entire packet's worth of data.  If the bounce buffer is 1024 bytes
then you can send the entire first packet.  When that's done, you can
send the second packet.  And so on.  It wouldn't be quite as fast, but
for ep0 that shouldn't matter.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ