<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb, branch v4.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-10-17T18:57:55Z</updated>
<entry>
<title>usb: gadget: storage: Fix Spectre v1 vulnerability</title>
<updated>2018-10-17T18:57:55Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-10-16T10:16:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ae24af3669111d418242caec8dd4ebd9ba26860'/>
<id>urn:sha1:9ae24af3669111d418242caec8dd4ebd9ba26860</id>
<content type='text'>
num can be indirectly controlled by user-space, hence leading to
a potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

drivers/usb/gadget/function/f_mass_storage.c:3177 fsg_lun_make() warn:
potential spectre issue 'fsg_opts-&gt;common-&gt;luns' [r] (local cap)

Fix this by sanitizing num before using it to index
fsg_opts-&gt;common-&gt;luns

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&amp;m=152449131114778&amp;w=2

Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: fix the usbfs flag sanitization for control transfers</title>
<updated>2018-10-16T11:09:36Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2018-10-15T20:55:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=665c365a77fbfeabe52694aedf3446d5f2f1ce42'/>
<id>urn:sha1:665c365a77fbfeabe52694aedf3446d5f2f1ce42</id>
<content type='text'>
Commit 7a68d9fb8510 ("USB: usbdevfs: sanitize flags more") checks the
transfer flags for URBs submitted from userspace via usbfs.  However,
the check for whether the USBDEVFS_URB_SHORT_NOT_OK flag should be
allowed for a control transfer was added in the wrong place, before
the code has properly determined the direction of the control
transfer.  (Control transfers are special because for them, the
direction is set by the bRequestType byte of the Setup packet rather
than direction bit of the endpoint address.)

This patch moves code which sets up the allow_short flag for control
transfers down after is_in has been set to the correct value.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-and-tested-by: syzbot+24a30223a4b609bb802e@syzkaller.appspotmail.com
Fixes: 7a68d9fb8510 ("USB: usbdevfs: sanitize flags more")
CC: Oliver Neukum &lt;oneukum@suse.com&gt;
CC: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: xhci: pci: Enable Intel USB role mux on Apollo Lake platforms</title>
<updated>2018-10-09T14:13:50Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2018-10-01T15:53:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c02588a352defaf985fc1816eb6232663159e1b8'/>
<id>urn:sha1:c02588a352defaf985fc1816eb6232663159e1b8</id>
<content type='text'>
Intel Apollo Lake has the same internal USB role mux as
Intel Cherry Trail.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: roles: intel_xhci: Fix Unbalanced pm_runtime_enable</title>
<updated>2018-10-09T14:13:42Z</updated>
<author>
<name>Wan Ahmad Zainie</name>
<email>wan.ahmad.zainie.wan.mohamad@intel.com</email>
</author>
<published>2018-10-09T04:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=009b1948e153ae448f62f1887e2b58d0e05db51b'/>
<id>urn:sha1:009b1948e153ae448f62f1887e2b58d0e05db51b</id>
<content type='text'>
Add missing pm_runtime_disable() to remove(), in order to avoid
an Unbalanced pm_runtime_enable when the module is removed and
re-probed.

Error log:
root@intel-corei7-64:~# modprobe -r intel_xhci_usb_role_switch
root@intel-corei7-64:~# modprobe intel_xhci_usb_role_switch
intel_xhci_usb_sw intel_xhci_usb_sw: Unbalanced pm_runtime_enable!

Fixes: cb2968468605 (usb: roles: intel_xhci: Enable runtime PM)
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Wan Ahmad Zainie &lt;wan.ahmad.zainie.wan.mohamad@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cdc-acm: correct counting of UART states in serial state notification</title>
<updated>2018-10-09T14:13:42Z</updated>
<author>
<name>Tobias Herzog</name>
<email>t-herzog@gmx.de</email>
</author>
<published>2018-09-22T20:11:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f976d0e5747ca65ccd0fb2a4118b193d70aa1836'/>
<id>urn:sha1:f976d0e5747ca65ccd0fb2a4118b193d70aa1836</id>
<content type='text'>
The usb standard ("Universal Serial Bus Class Definitions for Communication
Devices") distiguishes between "consistent signals" (DSR, DCD), and
"irregular signals" (break, ring, parity error, framing error, overrun).
The bits of "irregular signals" are set, if this error/event occurred on
the device side and are immeadeatly unset, if the serial state notification
was sent.
Like other drivers of real serial ports do, just the occurence of those
events should be counted in serial_icounter_struct (but no 1-&gt;0
transitions).

Signed-off-by: Tobias Herzog &lt;t-herzog@gmx.de&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cdc-acm: do not reset notification buffer index upon urb unlinking</title>
<updated>2018-10-09T14:13:42Z</updated>
<author>
<name>Tobias Herzog</name>
<email>t-herzog@gmx.de</email>
</author>
<published>2018-09-22T20:11:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dae3ddba36f8c337fb59cef07d564da6fc9b7551'/>
<id>urn:sha1:dae3ddba36f8c337fb59cef07d564da6fc9b7551</id>
<content type='text'>
Resetting the write index of the notification buffer on urb unlink (e.g.
closing a cdc-acm device from userspace) may lead to wrong interpretation
of further received notifications, in case the index is not 0 when urb
unlink happens (i.e. when parts of a notification already have been
transferred). On the device side there is no "reset" of the notification
transimission and thus we would get out of sync with the device.

Signed-off-by: Tobias Herzog &lt;t-herzog@gmx.de&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cdc-acm: fix race between reset and control messaging</title>
<updated>2018-10-09T14:13:42Z</updated>
<author>
<name>Oliver Neukum</name>
<email>oneukum@suse.com</email>
</author>
<published>2018-10-04T13:49:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9397940ed812b942c520e0c25ed4b2c64d57e8b9'/>
<id>urn:sha1:9397940ed812b942c520e0c25ed4b2c64d57e8b9</id>
<content type='text'>
If a device splits up a control message and a reset() happens
between the parts, the message is lost and already recieved parts
must be dropped.

Signed-off-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Fixes: 1aba579f3cf51 ("cdc-acm: handle read pipe errors")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbip: Fix BUG: KASAN: slab-out-of-bounds in vhci_hub_control()</title>
<updated>2018-10-09T14:13:42Z</updated>
<author>
<name>Shuah Khan (Samsung OSG)</name>
<email>shuah@kernel.org</email>
</author>
<published>2018-10-05T22:17:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81f7567c51ad97668d1c3a48e8ecc482e64d4161'/>
<id>urn:sha1:81f7567c51ad97668d1c3a48e8ecc482e64d4161</id>
<content type='text'>
vhci_hub_control() accesses port_status array with out of bounds port
value. Fix it to reference port_status[] only with a valid rhport value
when invalid_rhport flag is true.

The invalid_rhport flag is set early on after detecting in port value
is within the bounds or not.

The following is used reproduce the problem and verify the fix:
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=14ed8ab6400000

Reported-by: syzbot+bccc1fe10b70fadc78d0@syzkaller.appspotmail.com
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: xhci-mtk: resume USB3 roothub first</title>
<updated>2018-10-02T00:59:02Z</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2018-10-01T15:36:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=555df5820e733cded7eb8d0bf78b2a791be51d75'/>
<id>urn:sha1:555df5820e733cded7eb8d0bf78b2a791be51d75</id>
<content type='text'>
Give USB3 devices a better chance to enumerate at USB3 speeds if
they are connected to a suspended host.
Porting from "671ffdff5b13 xhci: resume USB 3 roothub first"

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>xhci: Add missing CAS workaround for Intel Sunrise Point xHCI</title>
<updated>2018-10-02T00:59:02Z</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@linux.intel.com</email>
</author>
<published>2018-10-01T15:36:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ffe84e01bb1b38c7eb9c6b6da127a6c136d251df'/>
<id>urn:sha1:ffe84e01bb1b38c7eb9c6b6da127a6c136d251df</id>
<content type='text'>
The workaround for missing CAS bit is also needed for xHC on Intel
sunrisepoint PCH. For more details see:

Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
