Re: [oss-security] BadUSB discussion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 9 Aug 2014, Yves-Alexis Perez wrote:

> > If you write "echo 0 >/sys/bus/usb/devices/usb1/authorized_default", it 
> > will not deauthorize any currently plugged devices.  All it will do is 
> > change the default authorization value assigned to new devices when 
> > they are plugged in.
> 
> Ok, it does seem to work. Two things, though.
> 
> - before doing anything, I have:
> 
> grep . /sys/bus/usb/devices/*/authorized_default
> /sys/bus/usb/devices/usb1/authorized_default:1
> /sys/bus/usb/devices/usb2/authorized_default:1
> 
> shouldn't it be -1?

The -1 value you see in the module parameter isn't used in any of the
sysfs files.  It means that a new bus's authorized_default value should
be set to 0 if the bus is wireless and 1 if the bus is wired.

> After putting 0 there, unplugging my USB mouse and re-plugging it, the
> mouse doesn't work, still gets enumerated:
> 
> Aug  9 09:06:24 scapa kernel: [33176.030104] usb 1-1.5.1: new low-speed USB device number 12 using ehci-pci
> Aug  9 09:06:24 scapa kernel: [33176.143702] usb 1-1.5.1: New USB device found, idVendor=046d, idProduct=c00c
> Aug  9 09:06:24 scapa kernel: [33176.143709] usb 1-1.5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> Aug  9 09:06:24 scapa kernel: [33176.143713] usb 1-1.5.1: Product: USB Optical Mouse
> Aug  9 09:06:24 scapa kernel: [33176.143716] usb 1-1.5.1: Manufacturer: Logitech
> 
> but it's not handled by the input driver like usually:
> 
> Aug  9 09:06:50 scapa kernel: [33202.016667] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.0/0003:046D:C00C.0004/input/input17
> Aug  9 09:06:50 scapa kernel: [33202.016975] hid-generic 0003:046D:C00C.0004: input,hidraw0: USB HID v1.10 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1a.0-1.5.1/input0

Yes, that's how it's supposed to work.  The device is enumerated, but 
drivers aren't allowed to bind to it.

> Anyway, thanks for the tip, and again sorry for the noise.

You're welcome.

Alan Stern

--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux