Am 08.06.2015 um 16:40 schrieb Greg KH: > On Mon, Jun 08, 2015 at 03:24:26PM +0200, Stefan Koch wrote: >> Hi >> >> This is a patch that introduces an interface authorization for USB devices. >> >> The kernel supports already a device authorization bacause of wireless USB. >> >> But the new interface authorization allows to enable or disable individual interfaces per bitmask instead allow or deny a whole device. >> >> As example you can allow the interface for a TV signal from a USB TV card, but deny a HID for the remote control. >> >> This was added against BadUSB attacks. Refer to: https://srlabs.de/badusb/ >> >> The interface authorization is used by an usb firewall named "usbauth". >> The code and binaries for openSUSE 13.2 can be found here: https://build.opensuse.org/project/show/home:skoch_suse >> >> The patch was tested with Linux 4.1-rc3. The functionality is oriented at existing kernel code like usb_set_configuration(), the device authorization, etc. >> >> If the interface authorization is not used, the kernel behavior is the same as without the patch. >> >> Best regards >> >> Stefan Koch > Care to resend this in a format that it could be applied in (i.e. broken > up into logical chunks with the proper Signed-off-by: lines)? > > As this is, there's nothing we can do with it. > > thanks, > > greg k-h This is only a bugfix in the xhci driver. There could be a NULL pointer if devices are not initialized complete. But it is not relevant for the interface authorization modification. -------------------- >From 3d3eb341aec0917f798cb70106c1b13eacdffd6e Mon Sep 17 00:00:00 2001 From: Stefan Koch <skoch@xxxxxxx> Date: Mon, 8 Jun 2015 23:29:02 +0200 Subject: [PATCH 4/4] This patch fixes a bug in the xhci driver bit is not needed for the interface authorization Signed-off-by: Stefan Koch <skoch@xxxxxxx> --- drivers/usb/host/xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 36bf089..13c2933 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -2380,7 +2380,7 @@ void xhci_drop_ep_from_interval_table(struct xhci_hcd *xhci, struct xhci_interval_bw *interval_bw; int normalized_interval; - if (xhci_is_async_ep(ep_bw->type)) + if (!ep_bw || xhci_is_async_ep(ep_bw->type)) return; if (udev->speed == USB_SPEED_SUPER) { @@ -2444,7 +2444,7 @@ static void xhci_add_ep_to_interval_table(struct xhci_hcd *xhci, struct xhci_virt_ep *smaller_ep; int normalized_interval; - if (xhci_is_async_ep(ep_bw->type)) + if (!ep_bw || xhci_is_async_ep(ep_bw->type)) return; if (udev->speed == USB_SPEED_SUPER) { -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html