<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/misc/ldusb.c, branch v4.14.286</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.286</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.286'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-11-12T18:18:42+00:00</updated>
<entry>
<title>USB: ldusb: use unsigned size format specifiers</title>
<updated>2019-11-12T18:18:42+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-10-22T14:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=53746bf4e6220c4b40cf0f4c32a3d6a57dc43e1b'/>
<id>urn:sha1:53746bf4e6220c4b40cf0f4c32a3d6a57dc43e1b</id>
<content type='text'>
[ Upstream commit 88f6bf3846ee90bf33aa1ce848cd3bfb3229f4a4 ]

A recent info-leak bug manifested itself along with warning about a
negative buffer overflow:

	ldusb 1-1:0.28: Read buffer overflow, -131383859965943 bytes dropped

when it was really a rather large positive one.

A sanity check that prevents this has now been put in place, but let's
fix up the size format specifiers, which should all be unsigned.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191022143203.5260-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: ldusb: fix control-message timeout</title>
<updated>2019-11-06T11:43:30+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-10-22T15:31:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0675c81abe0424be839cbc64a4dd233de8297170'/>
<id>urn:sha1:0675c81abe0424be839cbc64a4dd233de8297170</id>
<content type='text'>
commit 52403cfbc635d28195167618690595013776ebde upstream.

USB control-message timeouts are specified in milliseconds, not jiffies.
Waiting 83 minutes for a transfer to complete is a bit excessive.

Fixes: 2824bd250f0b ("[PATCH] USB: add ldusb driver")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 2.6.13
Reported-by: syzbot+a4fbb3bb76cda0ea4e58@syzkaller.appspotmail.com
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191022153127.22295-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: ldusb: fix ring-buffer locking</title>
<updated>2019-11-06T11:43:30+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-10-22T14:32:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=739ad3b6e596cd87e212df5998e3ea86baf0e496'/>
<id>urn:sha1:739ad3b6e596cd87e212df5998e3ea86baf0e496</id>
<content type='text'>
commit d98ee2a19c3334e9343df3ce254b496f1fc428eb upstream.

The custom ring-buffer implementation was merged without any locking or
explicit memory barriers, but a spinlock was later added by commit
9d33efd9a791 ("USB: ldusb bugfix").

The lock did not cover the update of the tail index once the entry had
been processed, something which could lead to memory corruption on
weakly ordered architectures or due to compiler optimisations.

Specifically, a completion handler running on another CPU might observe
the incremented tail index and update the entry before ld_usb_read() is
done with it.

Fixes: 2824bd250f0b ("[PATCH] USB: add ldusb driver")
Fixes: 9d33efd9a791 ("USB: ldusb bugfix")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 2.6.13
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191022143203.5260-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: ldusb: fix read info leaks</title>
<updated>2019-10-29T08:17:07+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-10-18T15:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=312ab599be611fbd8995fbf0f9746e9b0bb686de'/>
<id>urn:sha1:312ab599be611fbd8995fbf0f9746e9b0bb686de</id>
<content type='text'>
commit 7a6f22d7479b7a0b68eadd308a997dd64dda7dae upstream.

Fix broken read implementation, which could be used to trigger slab info
leaks.

The driver failed to check if the custom ring buffer was still empty
when waking up after having waited for more data. This would happen on
every interrupt-in completion, even if no data had been added to the
ring buffer (e.g. on disconnect events).

Due to missing sanity checks and uninitialised (kmalloced) ring-buffer
entries, this meant that huge slab info leaks could easily be triggered.

Note that the empty-buffer check after wakeup is enough to fix the info
leak on disconnect, but let's clear the buffer on allocation and add a
sanity check to read() to prevent further leaks.

Fixes: 2824bd250f0b ("[PATCH] USB: add ldusb driver")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 2.6.13
Reported-by: syzbot+6fe95b826644f7f12b0b@syzkaller.appspotmail.com
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191018151955.25135-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: ldusb: fix memleak on disconnect</title>
<updated>2019-10-29T08:17:06+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-10-10T12:58:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a927cbaf361e57671ea822b44048adf251d62a9'/>
<id>urn:sha1:8a927cbaf361e57671ea822b44048adf251d62a9</id>
<content type='text'>
commit b14a39048c1156cfee76228bf449852da2f14df8 upstream.

If disconnect() races with release() after a process has been
interrupted, release() could end up returning early and the driver would
fail to free its driver data.

Fixes: 2824bd250f0b ("[PATCH] USB: add ldusb driver")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 2.6.13
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191010125835.27031-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: ldusb: fix NULL-derefs on driver unbind</title>
<updated>2019-10-17T20:43:29+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-10-09T15:38:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91f0c64462a28d0693c748af7c24a4d894bc39af'/>
<id>urn:sha1:91f0c64462a28d0693c748af7c24a4d894bc39af</id>
<content type='text'>
commit 58ecf131e74620305175a7aa103f81350bb37570 upstream.

The driver was using its struct usb_interface pointer as an inverted
disconnected flag, but was setting it to NULL before making sure all
completion handlers had run. This could lead to a NULL-pointer
dereference in a number of dev_dbg, dev_warn and dev_err statements in
the completion handlers which relies on said pointer.

Fix this by unconditionally stopping all I/O and preventing
resubmissions by poisoning the interrupt URBs at disconnect and using a
dedicated disconnected flag.

This also makes sure that all I/O has completed by the time the
disconnect callback returns.

Fixes: 2824bd250f0b ("[PATCH] USB: add ldusb driver")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 2.6.13
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20191009153848.8664-4-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: ldusb: add PIDs for new CASSY devices supported by this driver</title>
<updated>2018-02-28T09:19:43+00:00</updated>
<author>
<name>Karsten Koop</name>
<email>kkoop@ld-didactic.de</email>
</author>
<published>2018-02-09T09:12:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7e402ea2cdc21d5f3fca6f7d99213528d147bab4'/>
<id>urn:sha1:7e402ea2cdc21d5f3fca6f7d99213528d147bab4</id>
<content type='text'>
commit 52ad2bd8918158266fc88a05f95429b56b6a33c5 upstream.

This patch adds support for new CASSY devices to the ldusb driver. The
PIDs are also added to the ignore list in hid-quirks.

Signed-off-by: Karsten Koop &lt;kkoop@ld-didactic.de&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: misc: remove unneeded MODULE_VERSION() usage</title>
<updated>2017-07-22T13:56:52+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-07-19T12:17:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c35c376fb1be1fc7c96e944898f92ee45158f8b1'/>
<id>urn:sha1:c35c376fb1be1fc7c96e944898f92ee45158f8b1</id>
<content type='text'>
MODULE_VERSION is useless for in-kernel drivers, so just remove all
usage of it in the USB misc drivers.  Along with this, some
DRIVER_VERSION macros were removed as they are also pointless.

Cc: Keith Packard &lt;keithp@keithp.com&gt;
Cc: Juergen Stuber &lt;starblue@users.sourceforge.net&gt;
Cc: Cesar Miquel &lt;miquel@df.uba.ar&gt;
Acked-by: Richard Leitner &lt;richard.leitner@skidata.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: ldusb: refactor endpoint retrieval</title>
<updated>2017-03-23T12:53:53+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-17T10:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2707ca16c2d400c8e2e619944470fb72ea96489f'/>
<id>urn:sha1:2707ca16c2d400c8e2e619944470fb72ea96489f</id>
<content type='text'>
Use the new endpoint helpers to lookup the required interrupt-in
endpoint and optional interrupt-out endpoint.

Note that the descriptors are searched in reverse order to avoid any
regressions.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: misc: ldusb: changed '*' location to fit coding Style</title>
<updated>2017-03-17T04:27:41+00:00</updated>
<author>
<name>Milian Reichardt</name>
<email>mreichardt95@gmail.com</email>
</author>
<published>2017-03-04T02:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d72e35da22857b253d0807d0c7a54c3cabf19b5'/>
<id>urn:sha1:4d72e35da22857b253d0807d0c7a54c3cabf19b5</id>
<content type='text'>
Changed the location of '*' to fit the current coding style and easy
readability.

Signed-of-by: Milian Reichardt &lt;mreichardt95@gmail.com&gt;

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
