<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/tools/usb/usbip/libsrc, branch v5.0.1</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v5.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=v5.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2018-10-18T17:44:39+00:00</updated>
<entry>
<title>usbip: tools: fix atoi() on non-null terminated string</title>
<updated>2018-10-18T17:44:39+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-10-16T18:03:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=e325808c0051b16729ffd472ff887c6cae5c6317'/>
<id>urn:sha1:e325808c0051b16729ffd472ff887c6cae5c6317</id>
<content type='text'>
Currently the call to atoi is being passed a single char string
that is not null terminated, so there is a potential read overrun
along the stack when parsing for an integer value.  Fix this by
instead using a 2 char string that is initialized to all zeros
to ensure that a 1 char read into the string is always terminated
with a \0.

Detected by cppcheck:
"Invalid atoi() argument nr 1. A nul-terminated string is required."

Fixes: 3391ba0e2792 ("usbip: tools: Extract generic code to be shared with vudc backend")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbip: fix vhci_hcd controller counting</title>
<updated>2018-10-02T19:05:29+00:00</updated>
<author>
<name>Maciej Żenczykowski</name>
<email>maze@google.com</email>
</author>
<published>2018-09-20T20:29:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=e0a2e73e501c77037c8756137e87b12c7c3c9793'/>
<id>urn:sha1:e0a2e73e501c77037c8756137e87b12c7c3c9793</id>
<content type='text'>
Without this usbip fails on a machine with devices
that lexicographically come after vhci_hcd.

ie.
  $ ls -l /sys/devices/platform
  ...
  drwxr-xr-x. 4 root root    0 Sep 19 16:21 serial8250
  -rw-r--r--. 1 root root 4096 Sep 19 23:50 uevent
  drwxr-xr-x. 6 root root    0 Sep 20 13:15 vhci_hcd.0
  drwxr-xr-x. 4 root root    0 Sep 19 16:22 w83627hf.656

Because it detects 'w83627hf.656' as another vhci_hcd controller,
and then fails to be able to talk to it.

Note: this doesn't actually fix usbip's support for multiple
controllers... that's still broken for other reasons
("vhci_hcd.0" is hardcoded in a string macro), but is enough to
actually make it work on the above machine.

See also:
  https://bugzilla.redhat.com/show_bug.cgi?id=1631148

Cc: Jonathan Dieter &lt;jdieter@gmail.com&gt;
Cc: Valentina Manea &lt;valentina.manea.m@gmail.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: linux-usb@vger.kernel.org
Signed-off-by: Maciej Żenczykowski &lt;zenczykowski@gmail.com&gt;
Acked-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
Tested-by: Jonathan Dieter &lt;jdieter@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbip: dynamically allocate idev by nports found in sysfs</title>
<updated>2018-05-31T10:43:14+00:00</updated>
<author>
<name>Michael Grzeschik</name>
<email>m.grzeschik@pengutronix.de</email>
</author>
<published>2018-05-25T14:23:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=de19ca6fd72c7dd45ad82403e7b3fe9c74ef6767'/>
<id>urn:sha1:de19ca6fd72c7dd45ad82403e7b3fe9c74ef6767</id>
<content type='text'>
As the amount of available ports varies by the kernels build
configuration. To remove the limitation of the fixed 128 ports
we allocate the amount of idevs by using the number we get
from the kernel.

Signed-off-by: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Acked-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>usbip: usbip_host_common: Use new error codes to return request status</title>
<updated>2018-03-09T17:17:08+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2018-03-07T20:42:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=c207a10d2f0bddf691920c0d73b7e8a83e6e2fb6'/>
<id>urn:sha1:c207a10d2f0bddf691920c0d73b7e8a83e6e2fb6</id>
<content type='text'>
Currently ST_OK and ST_NA are the only values used to communicate
status of a request from a client. Use new error codes to clearly
indicate what failed. For example, when client sends request to
import a device that isn't export-able, send ST_DEV_BUSY to the client.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbip: tools: add more error codes for usbip request/reply messages</title>
<updated>2018-03-09T17:17:08+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2018-03-07T20:42:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=f6bcbf2e24eb10275b6614ccd9cab3e7d93748de'/>
<id>urn:sha1:f6bcbf2e24eb10275b6614ccd9cab3e7d93748de</id>
<content type='text'>
Currently ST_OK and ST_NA are the only values defined to communicate
status of a request from a client. Add more error codes to clearly
indicate what failed. For example, when client sends request to import
a device that isn't export-able, server can send a specific error code
to the client.

Existing defines are moved to a common header in libsrc to be included
in the libusbip_la-usbip_common.o to be used by all the usbip tools.
Supporting interface to print error strings is added to the common lib.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tools: usb: usbip: fix fd leak in case of 'fread' failure</title>
<updated>2018-01-04T16:05:55+00:00</updated>
<author>
<name>Elad Wexler</name>
<email>elad.wexler@gmail.com</email>
</author>
<published>2017-12-30T16:01:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=f7a5d7b3ab3c4865af85b431e1cd18b66b6c3b0e'/>
<id>urn:sha1:f7a5d7b3ab3c4865af85b431e1cd18b66b6c3b0e</id>
<content type='text'>
Fix possible resource leak: fd

Signed-off-by: Elad Wexler &lt;elad.wexler@gmail.com&gt;
Acked-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tools: usb: usbip_device_driver: prefer 'unsigned int' to 'unsigned'</title>
<updated>2018-01-04T16:05:55+00:00</updated>
<author>
<name>Elad Wexler</name>
<email>elad.wexler@gmail.com</email>
</author>
<published>2017-12-30T16:11:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=5c65a2fdb36b21c3f6ac534c5e12f81cf67726b1'/>
<id>urn:sha1:5c65a2fdb36b21c3f6ac534c5e12f81cf67726b1</id>
<content type='text'>
Fixup a coding style issue

Signed-off-by: Elad Wexler &lt;elad.wexler@gmail.com&gt;
Acked-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbip: prevent vhci_hcd driver from leaking a socket pointer address</title>
<updated>2017-12-08T16:32:23+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2017-12-07T21:16:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=2f2d0088eb93db5c649d2a5e34a3800a8a935fc5'/>
<id>urn:sha1:2f2d0088eb93db5c649d2a5e34a3800a8a935fc5</id>
<content type='text'>
When a client has a USB device attached over IP, the vhci_hcd driver is
locally leaking a socket pointer address via the

/sys/devices/platform/vhci_hcd/status file (world-readable) and in debug
output when "usbip --debug port" is run.

Fix it to not leak. The socket pointer address is not used at the moment
and it was made visible as a convenient way to find IP address from socket
pointer address by looking up /proc/net/{tcp,tcp6}.

As this opens a security hole, the fix replaces socket pointer address with
sockfd.

Reported-by: Secunia Research &lt;vuln@secunia.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tools/usbip: fixes potential (minor) "buffer overflow" (detected on recent gcc with -Werror)</title>
<updated>2017-12-08T16:31:20+00:00</updated>
<author>
<name>Julien BOIBESSOT</name>
<email>julien.boibessot@armadeus.com</email>
</author>
<published>2017-12-05T15:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=82a2b827c96883d8b39a58bba23d222d6b0de7ff'/>
<id>urn:sha1:82a2b827c96883d8b39a58bba23d222d6b0de7ff</id>
<content type='text'>
Fixes following build error:
vhci_driver.c: In function 'refresh_imported_device_list':
vhci_driver.c:118:37: error: 'snprintf' output may be truncated before
	the last format character [-Werror=format-truncation=]
    snprintf(status, sizeof(status), "status.%d", i);
                                     ^~~~~~~~~~~
vhci_driver.c:118:4: note: 'snprintf' output between 9 and 18 bytes into
	a destination of size 17
    snprintf(status, sizeof(status), "status.%d", i);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Julien BOIBESSOT &lt;julien.boibessot@armadeus.com&gt;
Acked-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usbip: fix usbip attach to find a port that matches the requested speed</title>
<updated>2017-11-30T16:40:02+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2017-11-29T22:24:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=1ac7c8a78be85f84b019d3d2742d1a9f07255cc5'/>
<id>urn:sha1:1ac7c8a78be85f84b019d3d2742d1a9f07255cc5</id>
<content type='text'>
usbip attach fails to find a free port when the device on the first port
is a USB_SPEED_SUPER device and non-super speed device is being attached.
It keeps checking the first port and returns without a match getting stuck
in a loop.

Fix it check to find the first port with matching speed.

Reported-by: Juan Zea &lt;juan.zea@qindel.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
