[PATCH 01/14] uas: add basic task management functions

2016-02-17 Thread Oliver Neukum
This just allocates the structures. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 44b096c..13e6313 100644 --- a/drivers/usb/s

[PATCH 13/14] uas: fix race between evaluation and completion in TMF results

2016-02-17 Thread Oliver Neukum
First evaluate, then notify the consumer. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index d2d9244..d789227 100644 --- a/drive

[RFC / RFT v5]

2016-02-17 Thread Oliver Neukum
Hans, do you like the approach. I added patch#15 to fix the bug you pointed out. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 12/14] uas: handle response to LUN reset

2016-02-17 Thread Oliver Neukum
Simple evaluation of the response uis result codes Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 80 ++- 1 file changed, 65 insertions(+), 15 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/s

[PATCH 05/14] uas: handle reset() while a TMF is active

2016-02-17 Thread Oliver Neukum
A reset in progress obsoletes all TMFs. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index e69ef2b..4c1d6c3 100644 --- a/drivers/usb/storage/uas.c

[PATCH 14/14] uas: fix race with TMF performing an abort and regular finish

2016-02-17 Thread Oliver Neukum
A successful TMF means that the URBs for a command must be killed. Also fixes sleeping with a spinlock. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/d

[PATCH 06/14] uas: fix reset_resume will a TMF is running

2016-02-17 Thread Oliver Neukum
If we go into the reset_resume() code path, the device cannot report on the result of a TMF. We must forget about the request at the host level. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/s

[PATCH 07/14] uas: handle errors in transmitting a TMF

2016-02-17 Thread Oliver Neukum
We need to give up on this TMF to have a free tag again. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 167 ++ 1 file changed, 110 insertions(+), 57 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drive

[PATCH 10/14] uas: correctly label reset functions

2016-02-17 Thread Oliver Neukum
A reset based on usb_reset_device() will reset the whole host, not just a bus. We should use the correct entry. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff

[PATCH 02/14] uas: reserve a tag for management

2016-02-17 Thread Oliver Neukum
UAS uses a shared tag space. We reserve tag #1 for management. That leaves us with an offset of 2. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/drive

[PATCH 03/14] uas: use TMF_ABORT_TASK

2016-02-17 Thread Oliver Neukum
Use a TMF_ABORT_TASK TMF_IU in the abort handler, to deal with commands we need to get rid of. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drive

[PATCH 09/14] uas: correct return values of uas_eh_abort_handler()

2016-02-17 Thread Oliver Neukum
If we succeed, we should report that. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/storage/uas.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index d388e78..31ff1a0

Re: [PATCH 0/3] usb: USB Type-C Class and driver for UCSI

2016-02-17 Thread Oliver Neukum
On Tue, 2016-02-09 at 19:01 +0200, Heikki Krogerus wrote: > Hi, > > The OS, or more precisely the user space, needs to be able to control > a few things regarding USB Type-C ports. The first thing that must be > allowed to be controlled is the data role. USB Type-C ports will > select the data

Re: [PATCH 10/14] uas: correctly label reset functions

2016-02-17 Thread Oliver Neukum
On Wed, 2016-02-17 at 21:37 +0300, Sergei Shtylyov wrote: > > @@ -492,6 +494,20 @@ static void uas_tmf_cmplt(struct urb *urb) > > if (status < 0) { > > devinfo->deathrow = NULL; > > complete(>deathknell); > > + switch (status) { > > + case

Re: [PATCH 1/3] usb: USB Type-C Connector Class

2016-02-18 Thread Oliver Neukum
On Thu, 2016-02-18 at 10:47 +0200, Heikki Krogerus wrote: Hi, > The modes that can actually be selected have to be supported by both > the connector and the partner, and this is where I'm putting the ball > on the userspace at the moment. I'm not offering a list of > "possible_alternate_modes"

Re: [PATCH 1/3] usb: USB Type-C Connector Class

2016-02-18 Thread Oliver Neukum
On Thu, 2016-02-18 at 10:47 +0200, Heikki Krogerus wrote: Hi, > P.S. That reminds me, here's my current draft for the > Documentation/ABI/. Could you take a look? And I am afraid, that I have a few remarks not bound to a specific entry. We have port directories for port power switching. How is

Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-18 Thread Oliver Neukum
On Thu, 2016-02-18 at 17:29 +0800, Peter Chen wrote: > Does this UCSI spec has some similar things with USB Type-C Port > Controller Interface Spec at usb.org? If not, how to co-work > together in future? USB Type-C Port Controller Interface Spec: What can a type C connector do? UCSI spec:

Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-18 Thread Oliver Neukum
On Thu, 2016-02-18 at 09:08 +0200, Felipe Balbi wrote: > Oliver Neukum <oneu...@suse.com> writes: > >> Oliver Neukum <oneu...@suse.com> writes: Hi, > > What exactly are you sure about about? > > heh, missed a NOT there :-) I am still confused :-) Do you

Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-18 Thread Oliver Neukum
On Thu, 2016-02-18 at 12:30 +0200, Felipe Balbi wrote: > Hi, > > Oliver Neukum <oneu...@suse.com> writes: > >> > What exactly are you sure about about? > >> > >> heh, missed a NOT there :-) > > > > I am still confused :-

Re: [PATCH 0/3] usb: USB Type-C Class and driver for UCSI

2016-02-18 Thread Oliver Neukum
On Thu, 2016-02-18 at 13:05 +0200, Heikki Krogerus wrote: > > Since we have capability details of ports in user space, I believe > > cable capability is also necessary for policy decision(power, alt > > mode). Is that something we are cautiously leaving out ? pls explain > > Adding the cable

Re: [PATCH 1/3] usb: USB Type-C Connector Class

2016-02-18 Thread Oliver Neukum
On Thu, 2016-02-18 at 15:25 +0200, Heikki Krogerus wrote: Hi, > > We have port directories for port power switching. How is > > the connector directory linked to them? > > I'm sorry, I don't think I understand this point. Like this: oneukum@linux-dtbq:/sys/bus/usb/devices/3-0:1.0> ls -l

Re: Spansion's CMSIS-DAP + COM Port

2016-02-18 Thread Oliver Neukum
On Thu, 2016-02-18 at 13:05 +0100, Johan Hovold wrote: > > I have a Starter Kit SK-FM4-176L-S6SE2CC > > modprobe usbserial vendor=0x1a6a product=0x2000 > > > > makes the USB Port appear nicely (works with gtkterm) and at the > same > > time one can use the CMIS-DAP adapter with openocd. > > >

Re: commit 4b61b4f205eabfc9f863f805858aa5b32deb3de5 - usb: add HAS_IOMEM dependency to USB_APPLEDISPLAY

2016-02-22 Thread Oliver Neukum
On Sat, 2016-02-20 at 14:50 -0800, Greg Kroah-Hartman wrote: > On Sat, Feb 20, 2016 at 11:44:38PM +0100, Vegard Nossum wrote: > > On 02/20/2016 11:22 PM, Greg Kroah-Hartman wrote: > > >On Tue, Feb 16, 2016 at 05:43:32PM +0100, Oliver Neukum wrote: > > >>On Tue, 201

Re: [PATCH] watchdog: add driver for StreamLabs USB watchdog device

2016-03-10 Thread Oliver Neukum
On Thu, 2016-03-10 at 02:29 +, Alexey Klimov wrote: > This patch creates new driver that supports StreamLabs usb watchdog > device. This device plugs into 9-pin usb header and connects to > reset pin and reset button on common PC. Hi, a few remarks. Regards Oliver >

[RFC PATCH 2/3] USB: PD: define specific requests

2016-03-10 Thread Oliver Neukum
This takes the definitions of requests from chapter 9.3.1 of the USB Power Delivery spec. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h

[RFC Patch 1/3] USB: add descriptors from USB Power Delivery spec

2016-03-10 Thread Oliver Neukum
Adding the descriptors of chapter 9.2 of the Power Delivery spec. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 94 1 file changed, 94 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi

adding definitions for USB PD to headers

2016-03-10 Thread Oliver Neukum
This patch set adds to definitions from chapter 9 of the Power Delivery spec to the header files so that they can be better used. It is a conservative selection and adds only a minimum. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

[RFC PATCH 3/3] USB: PD: additional feature selectors

2016-03-10 Thread Oliver Neukum
This adds the feature selectors from Table 9-8 Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 16 1 file changed, 16 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index bf6c1cd..9d3cdae

Re: [PATCH v3 3/7] usb: mux: add common code for Intel dual role port mux

2016-03-10 Thread Oliver Neukum
On Tue, 2016-03-08 at 15:53 +0800, Lu Baolu wrote: > diff --git a/Documentation/ABI/testing/sysfs-bus-platform > b/Documentation/ABI/testing/sysfs-bus-platform > index 5172a61..a2261cb 100644 > --- a/Documentation/ABI/testing/sysfs-bus-platform > +++

[PATCHv2 2/3] USB: PD: define specific requests

2016-03-10 Thread Oliver Neukum
This takes the definitions of requests from chapter 9.3.1 of the USB Power Delivery spec. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h

[v2] adding definitions for USB PD to headers

2016-03-10 Thread Oliver Neukum
This patch set adds to definitions from chapter 9 of the Power Delivery spec to the header files so that they can be better used. It is a conservative selection and adds only a minimum. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

[PATCHv2 3/3] USB: PD: additional feature selectors

2016-03-10 Thread Oliver Neukum
This adds the feature selectors from Table 9-8 Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 16 1 file changed, 16 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 25c882a..dab542e

[PATCHv2 1/3] USB: add descriptors from USB Power Delivery spec

2016-03-10 Thread Oliver Neukum
Adding the descriptors of chapter 9.2 of the Power Delivery spec. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 98 1 file changed, 98 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi

[PATCH v2] adding definitions for USB PD to headers

2016-03-10 Thread Oliver Neukum
This patch set adds to definitions from chapter 9 of the Power Delivery spec to the header files so that they can be better used. It is a conservative selection and adds only a minimum. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

[PATCH v3 3/3] USB: PD: additional feature selectors

2016-03-10 Thread Oliver Neukum
This adds the feature selectors from Table 9-8 Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 16 1 file changed, 16 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 78e95ca..4c03a17

[PATCH v3 1/3] USB: add descriptors from USB Power Delivery spec

2016-03-10 Thread Oliver Neukum
Adding the descriptors of chapter 9.2 of the Power Delivery spec. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 98 1 file changed, 98 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi

[PATCH v3 2/3] USB: PD: define specific requests

2016-03-10 Thread Oliver Neukum
This takes the definitions of requests from chapter 9.3.1 of the USB Power Delivery spec. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h

[PATCH v4 1/3] USB: add descriptors from USB Power Delivery spec

2016-03-10 Thread Oliver Neukum
Adding the descriptors of chapter 9.2 of the Power Delivery spec. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 98 1 file changed, 98 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi

[PATCH v4 2/3] USB: PD: define specific requests

2016-03-10 Thread Oliver Neukum
This takes the definitions of requests from chapter 9.3.1 of the USB Power Delivery spec. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h

[PATCH v4 3/3] USB: PD: additional feature selectors

2016-03-10 Thread Oliver Neukum
This adds the feature selectors from Table 9-8 Signed-off-by: Oliver Neukum <oneu...@suse.com> --- include/uapi/linux/usb/ch9.h | 16 1 file changed, 16 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 4abd964..08104bc

[PATCH v4]adding definitions for USB PD to headers

2016-03-10 Thread Oliver Neukum
This patch set adds to definitions from chapter 9 of the Power Delivery spec to the header files so that they can be better used. It is a conservative selection and adds only a minimum. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

[PATCH] mct_u232: sanity checking in probe

2016-03-18 Thread Oliver Neukum
An attack using the lack of sanity checking in probe is known. This patch checks for the existance of a second port. CVE-2016-3136 Signed-off-by: Oliver Neukum <oneu...@suse.com> CC: sta...@vger.kernel.org --- drivers/usb/serial/mct_u232.c | 4 1 file changed, 4 insertions(+) diff

[PATCH] usb_driver_claim_interface: add sanity checking

2016-03-18 Thread Oliver Neukum
Attacks that trick drivers into passing a NULL pointer to usb_driver_claim_interface() using forged descriptors are known. This thwarts them by sanity checking. Signed-off-by: Oliver Neukum <oneu...@suse.com> CC: sta...@vger.kernel.org --- drivers/usb/core/driver.c | 6 +- 1 file chan

Re: "reset full-speed USB device number 6 using ehci-pci" with Dell Inspiron 15R 5537

2016-03-14 Thread Oliver Neukum
On Mon, 2016-03-14 at 11:03 -0400, Alan Stern wrote: > On Mon, 14 Mar 2016, Oliver Neukum wrote: > > It seems to me that hid_resume_common() needs to be split into three > > parts > > > > a) doing the stuff for pending resets > > b) conditionally re

[RFT] digi_acceleport: do sanity checking for the number of ports

2016-03-14 Thread Oliver Neukum
The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/serial/digi_acceleport.c | 5 + 1 file changed, 5 insertions(+) diff --git a/d

[RFT] sanity checking in digiport driver

2016-03-14 Thread Oliver Neukum
This addresses the DoS issue with respect to checking the number of ports Ralf reported here: http://seclists.org/bugtraq/2016/Mar/61 Could someone with the requisite hardware please test? Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] watchdog: add driver for StreamLabs USB watchdog device

2016-03-16 Thread Oliver Neukum
On Wed, 2016-03-16 at 00:57 +, Alexey Klimov wrote: > Hi Oliver, > > On Thu, Mar 10, 2016 at 9:23 AM, Oliver Neukum <oneu...@suse.com> wrote: > > On Thu, 2016-03-10 at 02:29 +, Alexey Klimov wrote: > >> + streamlabs_wdt->buffer[3] = 0x80; > >

Re: system awareness of endpoints

2016-03-14 Thread Oliver Neukum
On Sat, 2016-03-12 at 20:30 -0800, Greg KH wrote: > On Sat, Mar 12, 2016 at 07:56:03PM -0800, bruce m beach wrote: > > I believe I can change the Device descriptors in firmware, > > upload the new firmware and reboot the stick but wouldn't > > the usb subsystem have the old device descriptor from

Re: "reset full-speed USB device number 6 using ehci-pci" with Dell Inspiron 15R 5537

2016-03-14 Thread Oliver Neukum
On Fri, 2016-03-11 at 11:54 -0500, Alan Stern wrote: > Perhaps I didn't do a good job of addressing the real underlying > problem. That's why I asked if this was the right approach. > > In Daniel's case, usbhid_start() never got called. Perhaps that's the > real problem? Anyway, this meant

Re: [PATCH] USB: cdc-acm: add support for Sagem Monetel ELC930

2016-03-15 Thread Oliver Neukum
On Tue, 2016-03-15 at 00:04 +, Nicolas Saenz Julienne wrote: > Hi, > the device is missing all the ACM specific "extra" info on it's interface > descriptor. Which seems be triggering the "Zero length descriptor references" > error during the probe function. Adding the NO_UNION_NORMAL quirk

[PATCH] cdc-acm: more sanity checking

2016-03-15 Thread Oliver Neukum
An attack has become available which pretends to be a quirky device circumventing normal sanity checks and crashes the kernel by an insufficient number of interfaces. This patch adds a check to the code path for quirky devices. Signed-off-by: Oliver Neukum <oneu...@suse.com> C

[RFT] digi_acceleport: do sanity checking for the number of ports

2016-03-19 Thread Oliver Neukum
The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/serial/digi_acceleport.c | 5 + 1 file changed, 5 insertions(+) diff --git a/d

[PATCH] digi_acceleport: do sanity checking for the number of ports

2016-03-19 Thread Oliver Neukum
The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/serial/digi_acceleport.c | 5 + 1 file changed, 5 insertions(+) diff --git a/d

Re: [PATCH v7 1/4] gadget: Introduce the usb charger framework

2016-03-19 Thread Oliver Neukum
On Wed, 2016-03-16 at 19:46 +0800, Baolin Wang wrote: > This patch introduces the usb charger driver based on usb gadget that > makes an enhancement to a power driver. It works well in practice but > that requires a system with suitable hardware. > > The basic conception of the usb charger is

Re: [PATCH] usb_driver_claim_interface: add sanity checking

2016-03-19 Thread Oliver Neukum
On Thu, 2016-03-17 at 12:44 +0100, Oliver Neukum wrote: > On Wed, 2016-03-16 at 10:41 -0400, Alan Stern wrote: > > > While adding your check to usb_driver_claim_interface() is a reasonable > > thing to do, it might not solve all the problems. A driver might still > >

Re: [PATCH] usb_driver_claim_interface: add sanity checking

2016-03-18 Thread Oliver Neukum
On Wed, 2016-03-16 at 10:41 -0400, Alan Stern wrote: > While adding your check to usb_driver_claim_interface() is a reasonable > thing to do, it might not solve all the problems. A driver might still > try to use the invalid interface pointer (perhaps when writing out an > error message). It

need to resubmit serial fixes?

2016-03-31 Thread Oliver Neukum
Hi, do I need to resubmit the serial fixes I submitted for the issues with the forged device descriptors leading to crashes? Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More

Re: [RFC] Create an audit record of USB specific details

2016-04-05 Thread Oliver Neukum
On Tue, 2016-04-05 at 18:40 +1000, Wade Mealing wrote: > Consider the following scenario. Currently we have device drivers > that emit text via a printk request which is eventually picked up by > syslog like implementation (not the audit subsystem). We also have UEVENTs. The crucial question is

Re: Oops in 4.6-rc2: NULL pointer dereference in cdc-acm

2016-04-07 Thread Oliver Neukum
On Wed, 2016-04-06 at 22:48 +0200, Gabriele Mazzotta wrote: > Hi, > > I'm getting a kernel oops when I plug some smartphone via USB to my > laptop, which is currently running the v4.6-rc2. > > The problem seems to be caused by a81cf9799ad7 ("cdc-acm: implement > put_char() and flush_chars()"). >

Re: [PATCHv4 2/3] usb: storage: scsiglue: limit USB3 devices to 2048 sectors

2016-04-13 Thread Oliver Neukum
On Wed, 2016-04-13 at 08:42 +0300, Felipe Balbi wrote: > USB3 devices, because they are much newer, have much > less chance of having issues with larger transfers. > > We still keep a limit because anything above 2048 > sectors really rendered negligible speed > improvements, so we will simply

Re: [PATCH] usb: Add driver for UCSI

2016-04-12 Thread Oliver Neukum
On Tue, 2016-04-12 at 14:43 +0300, Heikki Krogerus wrote: > +static int ucsi_init(struct ucsi *ucsi) > +{ > + struct ucsi_connector *con; > + struct ucsi_control ctrl; > + int ret; > + int i; > + > + atomic_set(>event_pending, 0); > + init_completion(>complete); > +

[PATCH v3] cypress_m8: add sanity checking

2016-03-19 Thread Oliver Neukum
An attack using missing endpoints exists. CVE-2016-3137 Signed-off-by: Oliver Neukum <oneu...@suse.com> CC: sta...@vger.kernel.org v1 - add sanity check v2 - add error logging v3 - correct error message --- drivers/usb/serial/cypress_m8.c | 11 +-- 1 file changed, 5 insertions

Re: [PATCH] digi_acceleport: do sanity checking for the number of ports

2016-03-19 Thread Oliver Neukum
expected bulk-out endpoints are available) How about this version? We really should have a way to specify that to the generic serial driver. Regards Oliver From 75c015b7281411abbfc4c148e648786258cffedb Mon Sep 17 00:00:00 2001 From: Oliver Neukum <oneu...@suse.com>

Re: [PATCH] usb_driver_claim_interface: add sanity checking

2016-03-19 Thread Oliver Neukum
On Wed, 2016-03-16 at 10:08 -0400, Alan Stern wrote: > On Wed, 16 Mar 2016, Oliver Neukum wrote: > > > Attacks that trick drivers into passing a NULL pointer > > to usb_driver_claim_interface() using forged descriptors are > > known. This thwarts them by sanity checking.

[PATCH] cypress_m8: add sanity checking

2016-03-19 Thread Oliver Neukum
An attack using missing endpoints exists. CVE-2016-3137 Signed-off-by: Oliver Neukum <oneu...@suse.com> CC: sta...@vger.kernel.org --- drivers/usb/serial/cypress_m8.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drive

[PATCH] ims-pcu: sanity check against missing interfaces

2016-03-19 Thread Oliver Neukum
A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum <oneu...@suse.com> CC: sta...@vger.kernel.org --- drivers/input/misc/ims-pcu.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/input/misc/ims-pcu.c b/drivers

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-21 Thread Oliver Neukum
On Sun, 2016-03-20 at 11:43 +0100, Geert Uytterhoeven wrote: > If CONFIG_PM=n: > > drivers/net/usb/lan78xx.c: In function ‘lan78xx_get_stats64’: > drivers/net/usb/lan78xx.c:3274: error: ‘struct dev_pm_info’ has no > member named ‘runtime_auto’ > > If PM is disabled, the runtime_auto flag

Re: [PATCH] usb: Wait before re-enabling a port that has been disabled due to EMI

2016-03-21 Thread Oliver Neukum
On Sun, 2016-03-20 at 18:09 +0100, Guido Trentalancia wrote: > Hello. > > Considering that EM interference can last for a while (generally up to > seconds), I am currently testing the following patch for module usbcore > so that it is possible to specify an amount of time to wait before > trying

Re: "reset full-speed USB device number 6 using ehci-pci" with Dell Inspiron 15R 5537

2016-03-21 Thread Oliver Neukum
On Mon, 2016-03-21 at 11:46 -0400, Alan Stern wrote: > On Mon, 21 Mar 2016, Oliver Neukum wrote: > > > On Fri, 2016-03-18 at 12:36 -0400, Alan Stern wrote: > > > > Almost. In case of reset_resume() it makes no sense to still > > clear a halt or execute

[PATCH] cypress_m8: add sanity checking

2016-03-20 Thread Oliver Neukum
An attack using missing endpoints exists. CVE-2016-3137 Signed-off-by: Oliver Neukum <oneu...@suse.com> CC: sta...@vger.kernel.org --- drivers/usb/serial/cypress_m8.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c

[PATCH] sur40:fix DMA on stack

2016-03-22 Thread Oliver Neukum
During the initialisation that driver uses a buffer on the stack for DMA. That violates the cache coherency rules. The fix is to allocate the buffer with kmalloc(). Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/input/touchscreen/sur40.c | 20 1 file chang

Re: 答复: 【xhci】suspend and resume core dump problem

2016-03-22 Thread Oliver Neukum
On Mon, 2016-03-21 at 23:41 -0400, gre...@linuxfoundation.org wrote: > On Tue, Mar 22, 2016 at 03:17:08AM +, Lipengcheng wrote: > > Hi, > > Thanks for your reply. > > When the suspend and resume process , the operation of press ctrl + c > > will produce an interruput and cause to allocate

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-22 Thread Oliver Neukum
On Mon, 2016-03-21 at 15:30 -0400, Alan Stern wrote: > On Mon, 21 Mar 2016, Oliver Neukum wrote: > > > We have an autosuspend timeout because we think that IO, if it will > > come at all, is likeliest to come soon. If, however, the IO is > > periodic that heuristics is

[RFC] PANTHERPOINT needing yet another quirk

2016-03-22 Thread Oliver Neukum
I have a report of a T430 laptop needing this unless you want shut downs turn into reboot. Is there any hope of investigating this further at Intel, or do we go for the cautious approach? Oliver Neukum (1): xhci: one more quirk for PANTHERPOINT drivers/usb/host/xhci-pci.c | 4 +++- 1 file

[RFC] xhci: one more quirk for PANTHERPOINT

2016-03-22 Thread Oliver Neukum
A T430 is reported to also need XHCI_SLOW_SUSPEND, lest a power off turn into a reboot. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-22 Thread Oliver Neukum
On Tue, 2016-03-22 at 11:13 -0400, Alan Stern wrote: > > Indeed. In that case the point is moot. But it is correct to ask > > the core whether the device is autosuspended at that point rather > > than keep a private flag if you can. > > That's why we have pm_runtime_status_suspended(). I guess

[PATCH v2] mct_u232: sanity checking in probe

2016-03-21 Thread Oliver Neukum
An attack using the lack of sanity checking in probe is known. This patch checks for the existance of a second port. CVE-2016-3136 Signed-off-by: Oliver Neukum <oneu...@suse.com> CC: sta...@vger.kernel.org v1 - add sanity check for presence of a second port v2 - add sanity check for an int

Re: [PATCH] mct_u232: sanity checking in probe

2016-03-21 Thread Oliver Neukum
On Thu, 2016-03-17 at 10:47 -0400, Johan Hovold wrote: > This looks like you just resent v1 (again, please include the revision > in the mail Subject). Indeed. Wrong directory. Sorry Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the

Re: "reset full-speed USB device number 6 using ehci-pci" with Dell Inspiron 15R 5537

2016-03-21 Thread Oliver Neukum
On Fri, 2016-03-18 at 12:36 -0400, Alan Stern wrote: > @@ -1584,10 +1581,8 @@ static int hid_resume(struct usb_interfa > static int hid_reset_resume(struct usb_interface *intf) > { > struct hid_device *hid = usb_get_intfdata(intf); > - struct usbhid_device *usbhid = hid->driver_data;

[PATCH v2] digi_acceleport: do sanity checking for the number of ports

2016-03-21 Thread Oliver Neukum
The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum <oneu...@suse.com> v1 - added sanity checks v2 - moved them to probe() to fix problems Johan pointed out --- drive

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-21 Thread Oliver Neukum
On Mon, 2016-03-21 at 10:57 -0400, Alan Stern wrote: > One possible solution is to export a sysfs parameter to prevent > statistics collection (or more generally, to change the interval at > which it occurs). Surely, not performing a task can hardly be beaten in terms of power consumption.

Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM

2016-03-22 Thread Oliver Neukum
On Tue, 2016-03-22 at 10:21 -0400, Alan Stern wrote: > I don't see any point in resuming the device just in order to collect > operating statistics. If it was already suspended then it wasn't > operating, so there will be no statistics to collect. Indeed. In that case the point is moot. But it

[PATCH] usbnet: cleanup after bind() in probe()

2016-03-07 Thread Oliver Neukum
-ncm. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/net/usb/usbnet.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 0b0ba7e..1079812 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -

Re: [PATCH] usb: serial: mos7840.c Support RS485 mode in B Electronics USOPTL4-4P and USOPTL4-2P

2016-03-01 Thread Oliver Neukum
On Tue, 2016-03-01 at 09:54 -0800, amarb...@apl.washington.edu wrote: > From: Aaron Marburg > > The USOPTL4-4P and USOPTL4-2P USB-to-quad/dual RS-485/422 hubs use the > Moschip 7840/7820. For correct operation in RS-485, the chip must be > configured in “RS-485

Re: [PATCH] usbnet: cleanup after bind() in probe()

2016-03-07 Thread Oliver Neukum
On Mon, 2016-03-07 at 11:41 -0500, David Miller wrote: > From: Oliver Neukum <oneu...@suse.com> > Date: Mon, 7 Mar 2016 11:31:10 +0100 > > > In case bind() works, but a later error forces bailing > > in probe() in error cases work and a timer may be scheduled. > >

Re: Possible double-free in the usbnet driver

2016-03-07 Thread Oliver Neukum
On Mon, 2016-03-07 at 22:50 +0300, Andrey Konovalov wrote: > Could you also add: > Reported-by: Andrey Konovalov Well, the exact bug you reported is fixed in Bjorn's patch the way Linus suggested. I'm fixing just a further race that would require an error condition on top

Re: Possible double-free in the usbnet driver

2016-03-04 Thread Oliver Neukum
On Sat, 2016-03-05 at 01:26 +0300, Andrey Konovalov wrote: > and when I run the vm and connect the device I get: > > [ 23.672662] cdc_ncm 1-1:1.6: bind() failure > [ 23.673447] usbnet_probe(): freeing netdev: 88006ab48000 > [ 23.675822] usbnet_probe(): freeing netdev: 88006ab48000 >

Re: Possible double-free in the usbnet driver

2016-03-05 Thread Oliver Neukum
On Fri, 2016-03-04 at 14:43 -0800, Linus Torvalds wrote: > So you have usbnet_defer_kevent() getting triggered, which in turn > ends up using "usbnet->kevent" > > But somebody like Oliver is really the right person to check this. For > example, it's entirely possible that we should just instead

Re: [PATCH] cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind

2016-03-08 Thread Oliver Neukum
On Tue, 2016-03-08 at 21:18 +0100, Bjørn Mork wrote: > > Why is it called "FLAG_LINK_INTR" anyway? There doesn't seem to be > > anything "INTR" about it. > > Beats me. I can only say that I always find naming difficult... > We could ask Ben, who introduced it in: It used to be done over USB

Re: [PATCH] cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind

2016-03-08 Thread Oliver Neukum
On Tue, 2016-03-08 at 11:43 -0800, Linus Torvalds wrote: > Why is that FLAG_LINK_INTR thing not just always used? > > The _only_ thing that FLAG_LINK_INTR does is to cause > > usbnet_link_change(dev, 0, 0); > > to be called after network device attach. That doesn't seem to be >

Re: [RFC] Create an audit record of USB specific details

2016-04-04 Thread Oliver Neukum
On Mon, 2016-04-04 at 00:02 -0400, wmealing wrote: > From: Wade Mealing > > Gday, > > I'm looking to create an audit trail for when devices are added or removed > from the system. > > The audit subsystem is a logging subsystem in kernel space that can be > used to create

Re: [PATCH v2 05/14] USB: ch341: fix USB buffer allocations

2016-04-04 Thread Oliver Neukum
On Sat, 2016-04-02 at 19:07 +0200, Grigori Goronzy wrote: > Use the correct types and sizes. > > Signed-off-by: Grigori Goronzy > --- > drivers/usb/serial/ch341.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/usb/serial/ch341.c

Re: cdc-acm: v4.6-rc1: Kernel panic in acm_start_wb

2016-04-04 Thread Oliver Neukum
On Mon, 2016-04-04 at 12:31 +0200, Torsten Hilbrich wrote: > commit a81cf9799ad7299b03a4dff020d9685f9ac5f3e0 > Author: Oliver Neukum <oneu...@suse.com> > Date: Wed Feb 10 10:39:49 2016 +0100 > > cdc-acm: implement put_char() and flush_chars() Hi, does this fix the is

[PATCH] cdc-acm: fix crash if flushed with nothing buffered

2016-04-04 Thread Oliver Neukum
Under some circumstances acm_tty_flush_chars() is called with no buffer to flush. We simply need to do nothing. Signed-off-by: Oliver Neukum <oneu...@suse.com> Reported-by: Torsten Hilbrich <torsten.hilbr...@secunet.com> --- drivers/usb/class/cdc-acm.c | 4 1 file changed,

[PATCH] cdc-acm: fix crash if flushed with nothing buffered

2016-04-04 Thread Oliver Neukum
Under some circumstances acm_tty_flush_chars() is called with no buffer to flush. We simply need to do nothing. Signed-off-by: Oliver Neukum <oneu...@suse.com> Reported-by: Torsten Hilbrich <torsten.hilbr...@secunet.com> --- drivers/usb/class/cdc-acm.c | 4 1 file changed,

Re: Usb point of sale keyboard shows err 19 of hub has too many ports

2016-03-30 Thread Oliver Neukum
On Tue, 2016-03-29 at 17:58 -0700, Greg KH wrote: > On Tue, Mar 29, 2016 at 05:42:50PM +0100, reggie macdonald wrote: > > Hi I made a bug report on bugzilla and was told to forward it to this email. > > > > Please see this thread: https://bbs.archlinux.org/viewtopic.php?id=210446 > > > > for

[PATCH 3/4] gtco: stop saving struct usb_device

2016-03-22 Thread Oliver Neukum
The device can now easily be derived from the interface. Stop leaving a private copy. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/input/tablet/gtco.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/input/tablet/gt

[PATCH 0/4] tablet: remove private copy to USB device

2016-03-22 Thread Oliver Neukum
We now have a macro to easily get to the USB device from the interface. So we are cleaning up all drivers to not store a private pointer. Oliver Neukum (4): acecad: stop saving struct usb_device aiptek: stop saving struct usb_device gtco: stop saving struct usb_device kbtab: stop saving

[PATCH 1/4] acecad: stop saving struct usb_device

2016-03-22 Thread Oliver Neukum
The device can now easily be derived from the interface. Stop leaving a private copy. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/input/tablet/acecad.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/input/tablet/acecad.c b/drivers

[PATCH 4/4] kbtab: stop saving struct usb_device

2016-03-22 Thread Oliver Neukum
The device can now easily be derived from the interface. Stop leaving a private copy. Signed-off-by: Oliver Neukum <oneu...@suse.com> --- drivers/input/tablet/kbtab.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/

<    5   6   7   8   9   10   11   12   13   14   >