From owner-freebsd-usb@freebsd.org Tue Sep 19 14:22:34 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE6EBE15911 for ; Tue, 19 Sep 2017 14:22:34 +0000 (UTC) (envelope-from mandrews@bit0.com) Received: from bit0.com (chunkhead.bit0.com [IPv6:2600:1f16:25b:8032:362b:314d:48b4:975d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C89C681A73 for ; Tue, 19 Sep 2017 14:22:34 +0000 (UTC) (envelope-from mandrews@bit0.com) Received: from chunkhead.bit0.com (localhost [127.0.0.1]) by bit0.com (Postfix) with ESMTP id C175AD86F for ; Tue, 19 Sep 2017 10:22:33 -0400 (EDT) X-Virus-Scanned: amavisd-new at bit0.com Received: from bit0.com ([127.0.0.1]) by chunkhead.bit0.com (chunkhead.bit0.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PO1OhBOf_Sks for ; Tue, 19 Sep 2017 10:22:32 -0400 (EDT) Received: from [2607:fcc8:bd52:1800:225:90ff:fed1:89d2] (unknown [IPv6:2607:fcc8:bd52:1800:225:90ff:fed1:89d2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bit0.com (Postfix) with ESMTPSA for ; Tue, 19 Sep 2017 10:22:32 -0400 (EDT) Date: Tue, 19 Sep 2017 10:22:26 -0400 (EDT) From: Mike Andrews X-X-Sender: mandrews@beast.int.bit0.com To: freebsd-usb@freebsd.org Subject: umodem0, Cisco USB serial console, and quirks Message-ID: User-Agent: Alpine 2.21 (BSF 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 14:22:35 -0000 I'm trying to get the USB console of a Cisco ASA 5506-X firewall (not terribly obscure hardware) talking to FreeBSD, and having some trouble. The relevant dmesg at probe time is: umodem0 on uhub7 umodem0: on usbus4 umodem0: data interface 1, has no CM over data, has no break ...and /dev/cuaU2 is created, and I can connect to it using cu, but then nothing happens. As in, hitting enter to get a prompt just sits there. (cuaU1 and cuaU0 are a separate two-port USB serial adapter and that one works fine, it's using uftdi instead of umodem...) The "has no CM over data" looks worrying. I attempted to add a quirk, but either it isn't working or I didn't do it right. In /boot/loader.conf I tried: hw.usb.quirk.0="0x05a6 0x0009 0 0xffff UQ_ASSUME_CM_OVER_DATA" and I also tried # usbconfig -d ugen4.3 add_quirk UQ_ASSUME_CM_OVER_DATA but it doesn't make any difference. It does show up as a new entry in "usbconfig dump_device_quirks" but doesn't solve the problem. Connecting the firewall to a Mac with the same cable works fine, so I know the cable is good and that I'm using the right bit rate (9600). Here are some other usbconfig dumps if these are useful in pointing me in the right direction (sorry these have lines longer than 80 columns): # usbconfig -d ugen4.3 show_ifdrv ugen4.3: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) ugen4.3.0: umodem0: # usbconfig -d ugen4.3 dump_device_desc ugen4.3: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0002 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x05a6 idProduct = 0x0009 bcdDevice = 0x0000 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 # usbconfig -d ugen4.3 dump_all_config_desc ugen4.3: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0043 bNumInterfaces = 0x0002 bConfigurationValue = 0x0001 iConfiguration = 0x0003 bmAttributes = 0x00c0 bMaxPower = 0x0032 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0001 bInterfaceClass = 0x0002 bInterfaceSubClass = 0x0002 bInterfaceProtocol = 0x0001 iInterface = 0x0000 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x00 RAW dump: 0x00 | 0x05, 0x24, 0x00, 0x10, 0x01 Additional Descriptor bLength = 0x04 bDescriptorType = 0x24 bDescriptorSubType = 0x02 RAW dump: 0x00 | 0x04, 0x24, 0x02, 0x02 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x06 RAW dump: 0x00 | 0x05, 0x24, 0x06, 0x00, 0x01 Additional Descriptor bLength = 0x05 bDescriptorType = 0x24 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x05, 0x24, 0x01, 0x00, 0x01 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0003 wMaxPacketSize = 0x0008 bInterval = 0x0002 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x000a bInterfaceSubClass = 0x0000 bInterfaceProtocol = 0x0000 iInterface = 0x0000 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0003 bmAttributes = 0x0002 wMaxPacketSize = 0x0020 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 From owner-freebsd-usb@freebsd.org Tue Sep 19 15:00:58 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EEAAE17743 for ; Tue, 19 Sep 2017 15:00:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B6CA830D6 for ; Tue, 19 Sep 2017 15:00:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 775392601A9; Tue, 19 Sep 2017 17:00:55 +0200 (CEST) Subject: Re: umodem0, Cisco USB serial console, and quirks To: Mike Andrews , freebsd-usb@freebsd.org References: From: Hans Petter Selasky Message-ID: Date: Tue, 19 Sep 2017 16:58:26 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 15:00:58 -0000 On 09/19/17 16:22, Mike Andrews wrote: > I'm trying to get the USB console of a Cisco ASA 5506-X firewall (not > terribly obscure hardware) talking to FreeBSD, and having some trouble. > The relevant dmesg at probe time is: > > umodem0 on uhub7 > umodem0: > on usbus4 > umodem0: data interface 1, has no CM over data, has no break > > ...and /dev/cuaU2 is created, and I can connect to it using cu, but then > nothing happens. As in, hitting enter to get a prompt just sits there. > (cuaU1 and cuaU0 are a separate two-port USB serial adapter and that one > works fine, it's using uftdi instead of umodem...) > > The "has no CM over data" looks worrying. I attempted to add a quirk, > but either it isn't working or I didn't do it right. In > /boot/loader.conf I tried: > Hi, Try using usbdump to figure out what is going on. usbdump -i usbusX -f Y -s 65536 -vvv X and Y are the numbers in ugenX.Y printed in dmesg. It will dump all low level communication with the firewall. Maybe it needs some special character escaping to respond, or maybe it needs to set the RTS CTS bits. --HPS From owner-freebsd-usb@freebsd.org Tue Sep 19 16:15:45 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8919CE1B34A for ; Tue, 19 Sep 2017 16:15:45 +0000 (UTC) (envelope-from mandrews@bit0.com) Received: from bit0.com (chunkhead.bit0.com [IPv6:2600:1f16:25b:8032:362b:314d:48b4:975d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5031E1C5A for ; Tue, 19 Sep 2017 16:15:45 +0000 (UTC) (envelope-from mandrews@bit0.com) Received: from chunkhead.bit0.com (localhost [127.0.0.1]) by bit0.com (Postfix) with ESMTP id 67139D8D5; Tue, 19 Sep 2017 12:15:37 -0400 (EDT) X-Virus-Scanned: amavisd-new at bit0.com Received: from bit0.com ([127.0.0.1]) by chunkhead.bit0.com (chunkhead.bit0.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SBnDOrhPYKP3; Tue, 19 Sep 2017 12:15:33 -0400 (EDT) Received: from [2607:fcc8:bd52:1800:225:90ff:fed1:89d2] (unknown [IPv6:2607:fcc8:bd52:1800:225:90ff:fed1:89d2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bit0.com (Postfix) with ESMTPSA; Tue, 19 Sep 2017 12:15:32 -0400 (EDT) Date: Tue, 19 Sep 2017 12:15:32 -0400 (EDT) From: Mike Andrews X-X-Sender: mandrews@beast.int.bit0.com To: Hans Petter Selasky cc: freebsd-usb@freebsd.org Subject: Re: umodem0, Cisco USB serial console, and quirks In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (BSF 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 16:15:45 -0000 On Tue, 19 Sep 2017, Hans Petter Selasky wrote: > On 09/19/17 16:22, Mike Andrews wrote: >> I'm trying to get the USB console of a Cisco ASA 5506-X firewall (not >> terribly obscure hardware) talking to FreeBSD, and having some trouble. The >> relevant dmesg at probe time is: >> >> umodem0 on uhub7 >> umodem0: on >> usbus4 >> umodem0: data interface 1, has no CM over data, has no break >> >> ...and /dev/cuaU2 is created, and I can connect to it using cu, but then >> nothing happens. As in, hitting enter to get a prompt just sits there. >> (cuaU1 and cuaU0 are a separate two-port USB serial adapter and that one >> works fine, it's using uftdi instead of umodem...) >> >> The "has no CM over data" looks worrying. I attempted to add a quirk, but >> either it isn't working or I didn't do it right. In /boot/loader.conf I >> tried: >> > > Hi, > > Try using usbdump to figure out what is going on. > > usbdump -i usbusX -f Y -s 65536 -vvv > > X and Y are the numbers in ugenX.Y printed in dmesg. > > It will dump all low level communication with the firewall. Maybe it needs > some special character escaping to respond, or maybe it needs to set the RTS > CTS bits. OK, here's a dump while running "cu -s 9600 -l /dev/cuaU2", hitting return about a dozen times, and then ~. to quit. I'm not sure how to interpret this as I'm not familiar with USB stack innards. (I'm more of a tcpdump guy.) Oh, and I suck for not mentioning that this is FreeBSD 11.1-p1 amd64. On macOS the same cu command (for /dev/cu.usbmodem1411) works fine without any other magic. I don't know where their equivalent of usbdump is, unless it's buried in Xcode somewhere. I can give Ubuntu a shot too, once I dust that hardware off and power it up... # usbdump -i usbus4 -f 3 -s 65536 -vvv 12:03:37.726789 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0 frame[0] WRITE 8 bytes 0000 21 22 03 00 00 00 00 00 -- -- -- -- -- -- -- -- |!"...... | flags 0x10 status 0xee1a3 12:03:37.726815 usbus4.3 SUBM-INTR-EP=00000081,SPD=FULL,NFR=1,SLEN=0,IVAL=2 frame[0] READ 8 bytes flags 0x8a status 0xcf023 12:03:37.726830 usbus4.3 SUBM-BULK-EP=00000082,SPD=FULL,NFR=1,SLEN=0,IVAL=0 frame[0] READ 1024 bytes flags 0xa status 0xcf023 12:03:37.729716 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes flags 0x10 status 0xce1a1 12:03:37.729785 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0 frame[0] WRITE 8 bytes 0000 21 22 03 00 00 00 00 00 -- -- -- -- -- -- -- -- |!"...... | flags 0x10 status 0xce1a3 12:03:37.732696 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes flags 0x10 status 0xee1a1 12:03:37.732753 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=2,SLEN=16,IVAL=0 frame[0] WRITE 8 bytes 0000 21 20 00 00 00 00 07 00 -- -- -- -- -- -- -- -- |! ...... | frame[1] WRITE 7 bytes 0000 80 25 00 00 00 00 08 -- -- -- -- -- -- -- -- -- |.%..... | flags 0x10 status 0xee1a3 12:03:37.736700 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=2,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes frame[1] WRITE 7 bytes flags 0x10 status 0xce1a1 12:03:37.840679 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=2,SLEN=16,IVAL=0 frame[0] WRITE 8 bytes 0000 21 20 00 00 00 00 07 00 -- -- -- -- -- -- -- -- |! ...... | frame[1] WRITE 7 bytes 0000 80 25 00 00 00 00 08 -- -- -- -- -- -- -- -- -- |.%..... | flags 0x10 status 0xce1a3 12:03:37.844696 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=2,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes frame[1] WRITE 7 bytes flags 0x10 status 0xee1a1 12:03:47.719626 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:47.720517 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:48.425798 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:48.426504 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:48.959494 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:48.960496 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:49.299515 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:49.300487 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:49.597312 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:49.597483 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:49.851622 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:49.852480 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:50.096901 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:50.097474 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:50.319320 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:50.319467 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:50.552389 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:03:50.553461 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:50.779360 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:50.780465 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:03:58.786897 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 7E -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |~ | flags 0x9 status 0xce023 12:03:58.787329 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:03:59.049172 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 2E -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xee023 12:03:59.049332 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xce021 12:04:00.224458 usbus4.3 SUBM-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=4,IVAL=0 frame[0] WRITE 1 bytes 0000 0D -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- |. | flags 0x9 status 0xce023 12:04:00.225314 usbus4.3 DONE-BULK-EP=00000003,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 1 bytes flags 0x9 status 0xee021 12:04:01.464189 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0 frame[0] WRITE 8 bytes 0000 21 22 02 00 00 00 00 00 -- -- -- -- -- -- -- -- |!"...... | flags 0x10 status 0xee1a3 12:04:01.466301 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes flags 0x10 status 0xce1a1 12:04:01.466346 usbus4.3 SUBM-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=8,IVAL=0 frame[0] WRITE 8 bytes 0000 21 22 02 00 00 00 00 00 -- -- -- -- -- -- -- -- |!"...... | flags 0x10 status 0xce1a3 12:04:01.469281 usbus4.3 DONE-CTRL-EP=00000000,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 frame[0] WRITE 8 bytes flags 0x10 status 0xee1a1 12:04:01.472549 usbus4.3 DONE-BULK-EP=00000082,SPD=FULL,NFR=0,SLEN=0,IVAL=0,ERR=CANCELLED flags 0xa status 0xaf00c 12:04:01.472556 usbus4.3 DONE-INTR-EP=00000081,SPD=FULL,NFR=0,SLEN=0,IVAL=2,ERR=CANCELLED flags 0x8a status 0xaf00c ^C 42 packets captured 13020 packets received by filter 0 packets dropped by kernel From owner-freebsd-usb@freebsd.org Tue Sep 19 16:34:56 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D54EE1C1F0 for ; Tue, 19 Sep 2017 16:34:56 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8AA4270F for ; Tue, 19 Sep 2017 16:34:55 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 87281260072; Tue, 19 Sep 2017 18:34:48 +0200 (CEST) Subject: Re: umodem0, Cisco USB serial console, and quirks To: Mike Andrews Cc: freebsd-usb@freebsd.org References: From: Hans Petter Selasky Message-ID: <0c4022f3-bd21-49b5-cadd-daeb9f1f3081@selasky.org> Date: Tue, 19 Sep 2017 18:32:18 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 16:34:56 -0000 On 09/19/17 18:15, Mike Andrews wrote: > > > 12:03:37.726830 usbus4.3 SUBM-BULK-EP=00000082,SPD=FULL,NFR=1,SLEN=0,IVAL=0 > frame[0] READ 1024 bytes > flags 0xa > status 0xcf023 Hi, Look for: XXXX-BULK-EP=00000082 This is the USB read transfer. The other side is not returning any data, so neither is "cu" printing anything. Maybe you can try to get a similar trace from the system where it works? Looks to me like some kind of protocol error, that the Cisco USB serial console needs some kind of activation. --HPS From owner-freebsd-usb@freebsd.org Wed Sep 20 14:43:17 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC033E11672 for ; Wed, 20 Sep 2017 14:43:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7C3B6DE65 for ; Wed, 20 Sep 2017 14:43:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KEhGmC094483 for ; Wed, 20 Sep 2017 14:43:17 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 221328] [usb] [panic] kernel panic when mount from external USB HDD Date: Wed, 20 Sep 2017 14:43:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:43:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221328 --- Comment #6 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Wed Sep 20 14:42:21 UTC 2017 New revision: 323808 URL: https://svnweb.freebsd.org/changeset/base/323808 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221328 PR: 221775 Sponsored by: Mellanox Technologies Changes: _U stable/11/ stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Wed Sep 20 14:43:19 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7D49E1167C for ; Wed, 20 Sep 2017 14:43:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C61E16DE6C for ; Wed, 20 Sep 2017 14:43:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KEhJEd094591 for ; Wed, 20 Sep 2017 14:43:19 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 221775] new USB Quirk for ROLAND Edirol PCR-300 MIDI keyboard [PATCH] Date: Wed, 20 Sep 2017 14:43:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:43:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221775 --- Comment #3 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Wed Sep 20 14:42:21 UTC 2017 New revision: 323808 URL: https://svnweb.freebsd.org/changeset/base/323808 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221328 PR: 221775 Sponsored by: Mellanox Technologies Changes: _U stable/11/ stable/11/sys/dev/usb/quirk/usb_quirk.c stable/11/sys/dev/usb/usbdevs --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Wed Sep 20 14:44:22 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B18DDE1178E for ; Wed, 20 Sep 2017 14:44:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FFE16E018 for ; Wed, 20 Sep 2017 14:44:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KEiMT0096127 for ; Wed, 20 Sep 2017 14:44:22 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 221775] new USB Quirk for ROLAND Edirol PCR-300 MIDI keyboard [PATCH] Date: Wed, 20 Sep 2017 14:44:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:44:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221775 --- Comment #4 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Wed Sep 20 14:43:55 UTC 2017 New revision: 323809 URL: https://svnweb.freebsd.org/changeset/base/323809 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221775 PR: 221328 Sponsored by: Mellanox Technologies Changes: _U stable/10/ stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Wed Sep 20 14:44:24 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6B01E11792 for ; Wed, 20 Sep 2017 14:44:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9555C6E020 for ; Wed, 20 Sep 2017 14:44:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KEiOtc096192 for ; Wed, 20 Sep 2017 14:44:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 221328] [usb] [panic] kernel panic when mount from external USB HDD Date: Wed, 20 Sep 2017 14:44:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:44:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221328 --- Comment #7 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Wed Sep 20 14:43:55 UTC 2017 New revision: 323809 URL: https://svnweb.freebsd.org/changeset/base/323809 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221775 PR: 221328 Sponsored by: Mellanox Technologies Changes: _U stable/10/ stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Wed Sep 20 14:47:28 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB1B6E11A09 for ; Wed, 20 Sep 2017 14:47:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D96FA6E241 for ; Wed, 20 Sep 2017 14:47:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KElS27000794 for ; Wed, 20 Sep 2017 14:47:28 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 221328] [usb] [panic] kernel panic when mount from external USB HDD Date: Wed, 20 Sep 2017 14:47:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:47:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221328 --- Comment #8 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Wed Sep 20 14:46:25 UTC 2017 New revision: 323810 URL: https://svnweb.freebsd.org/changeset/base/323810 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221775 PR: 221328 Sponsored by: Mellanox Technologies Changes: _U stable/9/sys/ stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Wed Sep 20 14:47:30 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7176E11A12 for ; Wed, 20 Sep 2017 14:47:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B57076E246 for ; Wed, 20 Sep 2017 14:47:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v8KElUDQ000917 for ; Wed, 20 Sep 2017 14:47:30 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 221775] new USB Quirk for ROLAND Edirol PCR-300 MIDI keyboard [PATCH] Date: Wed, 20 Sep 2017 14:47:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 14:47:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221775 --- Comment #5 from commit-hook@freebsd.org --- A commit references this bug: Author: hselasky Date: Wed Sep 20 14:46:24 UTC 2017 New revision: 323810 URL: https://svnweb.freebsd.org/changeset/base/323810 Log: MFC r322530 and r323220: Add new USB quirk(s). PR: 221775 PR: 221328 Sponsored by: Mellanox Technologies Changes: _U stable/9/sys/ stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Wed Sep 20 19:09:53 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 221D0E1E43A; Wed, 20 Sep 2017 19:09:53 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "land.berklix.org", Issuer "land.berklix.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C0D5A77C17; Wed, 20 Sep 2017 19:09:51 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from mart.js.berklix.net (pD9FA3C56.dip0.t-ipconnect.de [217.250.60.86]) (authenticated bits=128) by land.berklix.org (8.15.2/8.15.2) with ESMTPSA id v8KI6mL8068070 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Sep 2017 18:06:59 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id v8KI7WZt096510; Wed, 20 Sep 2017 20:07:32 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.7/8.14.7) with ESMTP id v8KI6tQM078780; Wed, 20 Sep 2017 20:07:08 +0200 (CEST) (envelope-from jhs@berklix.com) Message-Id: <201709201807.v8KI6tQM078780@fire.js.berklix.net> to: freebsd-usb@freebsd.org, freebsd-security@freebsd.org cc: "Astrid Jekat" cc: Hans Petter Selasky Subject: Re.: BadUSB - On Accessories that Turn Evil, by Karsten Nohl + Jakob Lell From: "Julian H. Stacey" Organization: http://berklix.eu BSD Linux Unix Consultants, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.eu/free/ X-From: http://www.berklix.eu/~jhs/ Date: Wed, 20 Sep 2017 20:06:55 +0200 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 19:09:53 -0000 Hi usb@ & security@ freebsd.org, hps@ (cc'd) introduced a FreeBSD Sysctl Oct 2014: hw.usb.disable_enumeration: 0 dev.uhub.4.disable_enumeration: 0 dev.uhub.3.disable_enumeration: 0 dev.uhub.2.disable_enumeration: 0 dev.uhub.1.disable_enumeration: 0 dev.uhub.0.disable_enumeration: 0 which added some protection against USB devices that turn evil. https://lists.freebsd.org/pipermail/freebsd-usb/2014-October/013304.html https://lists.freebsd.org/pipermail/freebsd-security/2014-October/007976.html A tiny diff to make it easier to grep sysctl descriptions: http://www.berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sys/dev/usb/usb_hub.c.REL=12.0-CURRENT.diff Chips shrink, imagine one hidden in a small arm band Micro-USB adapter cable, as sold in one Euro/Pound shops. A picture of similar https://www.twist4-silikonarmbaender.de/ Probably some are made in China, perhaps in PLA owned factories. Short cables, so to save losing it, it might be left plugged in. At power on, a chip might do nothing but set a timer, & stay in low power for 130 minutes, out waiting checkers before it starts "Hi, I'm a keyboard + C:\n uname -a\n probes & commands" (Combi scanner / printers & PS2 keyboard + mouse converters both share 2 devices on 1 cable, so a 2nd dev on a physical interface isn't intrinsicaly suspicious.) To detect a Trojan cable, could one measure very low power consumption of a supposedly passive cable not yet connected the other end to a device ? My laptop + FreeBSD-current suggest low current detection is not possible ? usbconfig shows all currents in multiples of 100mA (0mA) (0mA) (0mA) (0mA) (100mA) (100mA) (100mA) (200mA) (500mA) So probably not measurements made by the PC, but nominal ratings ? & if it's merely the external device reporting its desired rating, then useless to detect if a cable has a hidden device. I'm not familiar with USB chip functionalities available, but I looked at the code: /usr/src/usr.sbin/usbconfig/dump.c dump_device_info{ usage = libusb20_dev_get_power_usage(pdev); printf("%s, cfg=%u md=%s spd=%s pwr=%s (%umA)\n", ... usage); man libusb20_dev_get_power_usage libusb20_dev_get_power_usage() returns the reported power usage in milliamps for the given USB device. A power usage of zero typically means that the device is self powered. /usr/src/lib/libusb/libusb20.c pdev->methods->get_power_usage(pdev, &power_usage); ugen20_get_power_usage ioctl(pdev->file_ctrl, IOUSB(USB_GET_POWER_USAGE) /sys/dev/usb/usb_generic.c: case USB_GET_POWER_USAGE: ugen_get_power_usage(f); /sys/dev/usb/usb_generic.c return (udev->power) I suppose in desperation a dentist's X-Ray machine would give a view. It'd be worse if an organisation buried evil chips in Power Banks (batteries to recharge smart phones etc). It would be impossible to detect low power consumed by a sleeping chip, that continues to sleep long after a phone is plugged in to charge. Smaller battery packs are around company promotional gift prices. I recall the current FreeBSD sysctl provides switching per port, but not per device type. I guess one could bodge a bit more security by a script, approx: cp /etc/devd.conf.no_kbd /etc/devd.conf kill -9 `cat /var/run.devd.pid` /sbin/devd sysctl hw.usb.disable_enumeration=0 # Defences open. .... more specific port settings ? echo "Now Insert within 10 sec." ; sleep 10 sysctl hw.usb.disable_enumeration=1 cp /etc/devd.conf.with_kbd /etc/devd.conf kill -9 `cat /var/run.devd.pid` /sbin/devd Keyboard is the long identified danger, but maybe there are other dev types to protect against too, (ls /usr/share/man/man4), Some devices such as 'da' I don't see as a problem, as for /dev/da one can select on /etc/devd/*.conf "sernum" mount -o nosuid .. etc. Ideally the USB system might offer more fine tuned defence, to have some better defence than above, but as that's minority interest, security companies might need to contribute to development of that. Cheers, Julian -- Julian H. Stacey, Computer Consultant, BSD Linux Unix Systems Engineer, Munich Reply below, Prefix '> '. Plain text, No .doc, base64, HTML, quoted-printable. http://berklix.eu/queen/ Petition to get 3.5 million UK votes back From owner-freebsd-usb@freebsd.org Wed Sep 20 20:20:44 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61524E21627; Wed, 20 Sep 2017 20:20:44 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 285087DED4; Wed, 20 Sep 2017 20:20:43 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 02FE2260072; Wed, 20 Sep 2017 22:20:34 +0200 (CEST) Subject: Re: Re.: BadUSB - On Accessories that Turn Evil, by Karsten Nohl + Jakob Lell To: "Julian H. Stacey" , freebsd-usb@freebsd.org, freebsd-security@freebsd.org Cc: Astrid Jekat References: <201709201807.v8KI6tQM078780@fire.js.berklix.net> From: Hans Petter Selasky Message-ID: Date: Wed, 20 Sep 2017 22:18:02 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <201709201807.v8KI6tQM078780@fire.js.berklix.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 20:20:44 -0000 On 09/20/17 20:06, Julian H. Stacey wrote: > A tiny diff to make it easier to grep sysctl descriptions: > http://www.berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sys/dev/usb/usb_hub.c.REL=12.0-CURRENT.diff Hi, Please wrap the long string in multiple pieces before committing it. Looks good. Hope the sysctl has saved you some trouble :-) --HPS From owner-freebsd-usb@freebsd.org Thu Sep 21 06:50:46 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 333EDE18102; Thu, 21 Sep 2017 06:50:46 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF06F6C1D8; Thu, 21 Sep 2017 06:50:45 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x241.google.com with SMTP id m127so4313094wmm.0; Wed, 20 Sep 2017 23:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=Zued3CXapInekiR1xgoydWnsc2AEH78a674d7Lu6OtE=; b=Y8CZ9DouPnvQQhZKzGCWjaqavhr2N/ZriQttd3DsSdBY59uBHCKW3IyVM79y5J1Gt0 gNshi4HxLeA0qh0yNXp8HQCYJ+ByvHvJWHL3iy1Mralq0iXc3Cr39pvanDmEeEgwcUro MzPpf6ogzvWANNy/vDBcr0Qdih82s2IdbEsut1N7FtN8J2rXgDJveHUK7ncbJqq5xXVw IJHQlk2hc5qKia5qizJCk5SYcHYvVJg++K6mq2kvpltx8v9BWYdWJzBA+GKw86H7okqf la4NziIsxKkKDSq1TlUX63DFu0FPUFjdBPEN4NFC0Ro8jqf53d2Y7peFg4v9HS7cvOZI uNPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=Zued3CXapInekiR1xgoydWnsc2AEH78a674d7Lu6OtE=; b=DVk8r5fRm5DgHDD2Svm16P5yPz8748Q8P0CujWngam7C/2oLSMlDmdO9m5CiTIIVc7 jU67NwTLuBSHU6jUIHp3HFyp5/ey/qEoy6Vjb7yPocFDCtPORk761bH7gzspCA1k86qf ozj4X1F9VZxsRBimwBNOXXafIRw9D1qh3CuTB4Okb8PLViAH/2yTl9oZBxxIxvK6uTjS fwfCT4iw/muTqiQg8G5IKGTFVbC0QcKlWQ1yzyk6NkkV8JubbEGj6//uiOM4ETp9vEBd pxwbKuTL5h+NBYM72WbcKVq151pPtWWAVXpvhdEjzYRV33+Rn84GFJQNJLRWZbdYfRau zjXw== X-Gm-Message-State: AHPjjUh8grazIhVFC+cBmq9CCh2UTIs8tUl7yJ1aD0iTsyaDgyJAzHtp GmLsXhhCngFngbrwfcNPEY99HA== X-Google-Smtp-Source: AOwi7QCqULzoSm8m2Ekg7qQowvog3nRLsv2PiOLZ8MTjgPHw/0GwH2G1gUSvXSBAkAdXCmlavNb44Q== X-Received: by 10.28.195.132 with SMTP id t126mr29426wmf.0.1505976643958; Wed, 20 Sep 2017 23:50:43 -0700 (PDT) Received: from ernst.home (p4FCA62DB.dip0.t-ipconnect.de. [79.202.98.219]) by smtp.gmail.com with ESMTPSA id m19sm728451wma.24.2017.09.20.23.50.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Sep 2017 23:50:42 -0700 (PDT) Date: Thu, 21 Sep 2017 08:50:39 +0200 From: Gary Jennejohn To: Hans Petter Selasky Cc: "Julian H. Stacey" , freebsd-usb@freebsd.org, freebsd-security@freebsd.org, Astrid Jekat Subject: Re: Re.: BadUSB - On Accessories that Turn Evil, by Karsten Nohl + Jakob Lell Message-ID: <20170921085039.7d9a029b@ernst.home> In-Reply-To: References: <201709201807.v8KI6tQM078780@fire.js.berklix.net> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 06:50:46 -0000 On Wed, 20 Sep 2017 22:18:02 +0200 Hans Petter Selasky wrote: > On 09/20/17 20:06, Julian H. Stacey wrote: > > A tiny diff to make it easier to grep sysctl descriptions: > > http://www.berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sys/dev/usb/usb_hub.c.REL=12.0-CURRENT.diff > > Hi, > > Please wrap the long string in multiple pieces before > committing it. Looks good. Hope the sysctl has saved you some > trouble :-) > I suppose Hans means "submitting it." Julian should probably open a bug report and attach his diff to it. Julian did at one time, many years ago, have a commit bit. But I doubt he does now. -- Gary Jennejohn From owner-freebsd-usb@freebsd.org Thu Sep 21 10:23:30 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 158F9E22895; Thu, 21 Sep 2017 10:23:30 +0000 (UTC) (envelope-from freebsd.lists@whitewinterwolf.com) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4946732AB; Thu, 21 Sep 2017 10:23:29 +0000 (UTC) (envelope-from freebsd.lists@whitewinterwolf.com) X-Originating-IP: 93.26.153.77 Received: from [10.137.2.15] (77.153.26.93.rev.sfr.net [93.26.153.77]) (Authenticated sender: lists@whitewinterwolf.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id E6DF01720E0; Thu, 21 Sep 2017 12:23:26 +0200 (CEST) Subject: Re: Re.: BadUSB - On Accessories that Turn Evil, by Karsten Nohl + Jakob Lell To: "Julian H. Stacey" , freebsd-usb@freebsd.org, freebsd-security@freebsd.org Cc: Hans Petter Selasky , Astrid Jekat References: <201709201807.v8KI6tQM078780@fire.js.berklix.net> From: "WhiteWinterWolf (Simon)" Message-ID: Date: Thu, 21 Sep 2017 12:23:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <201709201807.v8KI6tQM078780@fire.js.berklix.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 10:23:30 -0000 Hi Julian, You don't need microscopic chips or highly engineered devices to implement a working BadUSB attack. Nothing looks more as a Dell mouse than another Dell mouse, and a malicious mouse offers plenty of space to store all the chips you may want. USB sticks are also still widely found (they have all required processing and memory by default) either as promotional devices, to share documents or "lost" somewhere. Moreover, a lot of legitimate USB devices can be reprogrammed through USB. That's why, for instance, if you use a air-gapped computer you should use SD-Card instead of USB sticks to transfer data as a malware on your networked computer may "enhance" your USB stick with BadUSB features which would contaminate the air-gapped computer and establish a covert channel, exfiltrating data (in particular encryption keys and passwords). > Keyboard is the long identified danger, but maybe there are other dev types to protect against too This is not a "maybe". There was a practical demonstration for instance in a DefCon conference dedicated to BadUSB of a USB stick reprogrammed to act as a fake network device. The malicious device would very quickly: - Declare itself as a networking device. - Simulate a DHCP server on the fake network providing the address of a malicious DNS server. - Drop networking device features. - The new DNS server configuration remains kept by the host. As a result, this USB stick allows to change the DNS server of a host, opening the gate notably to man-in-the-middle attacks (and the whole process was quite unnoticeable, no black console window popping-up, AFAIR there was just a change in the network icon shape in the notification bar for a fraction of second...). * Regarding the solution you propose, I don't know how it would cope in the following situations: - Legitimate devices which dynamically change their USB configuration (their device type). Such change is not a malicious trick but is an integral part on how USB is designed and work. Example of devices legitimately changing their USB configuration on-the-fly include mobile devices which by default only use USB as a power-source and switch into something else when the user interactively selects an option in a device's menu. Another example is devices which upon connection first act as a mass storage device storing drivers installation files, and when the drivers are already installed on the system the driver "pings" the device which as a result drops mass storage capabilities and turns itself into its actual type. Some consumer-grade modems for instance were known to offer such feature to allow an easy installation of the driver. - I don't know how this suggestion handles USB hubs, either legitimate USB hubs or faked ones simulated by malicious BadUSB devices to get around USB configuration change restrictions (actually, my guess is that simulating a USB hub may effectively bypass the suggested security feature). * USB devices are identified by a class code (=the kind of device) and a manufacturer ID. The most promising counter-measure I've encountered so far against the BadUSB attack is a firewall-like system allowing to set the class codes expected on each physical USB port. This allows for instance to set the ports where you expect human interface devices (keyboard, mouse, etc.) to be connected, the ports where mass storage devices (and nothing else) are expected, and optionally a port where no device is accepted (you would use this port only as power source). I don't know how USB is implemented in FreeBSD, but such functionality might be implementable by intercepting the notifications of new USB devices configuration and rejecting configurations where the device class and USB port information do not match the rules. Regards, Simon. Le 20/09/2017 à 20:06, Julian H. Stacey a écrit : > Hi usb@ & security@ freebsd.org, > hps@ (cc'd) introduced a FreeBSD Sysctl Oct 2014: > hw.usb.disable_enumeration: 0 > dev.uhub.4.disable_enumeration: 0 > dev.uhub.3.disable_enumeration: 0 > dev.uhub.2.disable_enumeration: 0 > dev.uhub.1.disable_enumeration: 0 > dev.uhub.0.disable_enumeration: 0 > which added some protection against USB devices that turn evil. > https://lists.freebsd.org/pipermail/freebsd-usb/2014-October/013304.html > https://lists.freebsd.org/pipermail/freebsd-security/2014-October/007976.html > > A tiny diff to make it easier to grep sysctl descriptions: > http://www.berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sys/dev/usb/usb_hub.c.REL=12.0-CURRENT.diff > > Chips shrink, imagine one hidden in a small arm band Micro-USB > adapter cable, as sold in one Euro/Pound shops. A picture of similar > https://www.twist4-silikonarmbaender.de/ > Probably some are made in China, perhaps in PLA owned factories. > > Short cables, so to save losing it, it might be left plugged in. > At power on, a chip might do nothing but set a timer, & stay > in low power for 130 minutes, out waiting checkers before it starts > "Hi, I'm a keyboard + C:\n uname -a\n probes & commands" > > (Combi scanner / printers & PS2 keyboard + mouse converters both > share 2 devices on 1 cable, so a 2nd dev on a physical interface > isn't intrinsicaly suspicious.) > > To detect a Trojan cable, could one measure very low power consumption of a > supposedly passive cable not yet connected the other end to a device ? > My laptop + FreeBSD-current suggest low current detection is not possible ? > > usbconfig shows all currents in multiples of 100mA (0mA) > (0mA) (0mA) (0mA) (100mA) (100mA) (100mA) (200mA) (500mA) > > So probably not measurements made by the PC, but nominal ratings ? > & if it's merely the external device reporting its desired > rating, then useless to detect if a cable has a hidden device. > > I'm not familiar with USB chip functionalities available, > but I looked at the code: > > /usr/src/usr.sbin/usbconfig/dump.c > dump_device_info{ > usage = libusb20_dev_get_power_usage(pdev); > printf("%s, cfg=%u md=%s spd=%s pwr=%s (%umA)\n", ... usage); > > man libusb20_dev_get_power_usage > libusb20_dev_get_power_usage() returns the reported power usage in > milliamps for the given USB device. A power usage of zero typically > means that the device is self powered. > > /usr/src/lib/libusb/libusb20.c > pdev->methods->get_power_usage(pdev, &power_usage); > > ugen20_get_power_usage > > ioctl(pdev->file_ctrl, IOUSB(USB_GET_POWER_USAGE) > > /sys/dev/usb/usb_generic.c: case USB_GET_POWER_USAGE: > ugen_get_power_usage(f); > > /sys/dev/usb/usb_generic.c > return (udev->power) > > I suppose in desperation a dentist's X-Ray machine would give a view. > > It'd be worse if an organisation buried evil chips in Power Banks > (batteries to recharge smart phones etc). It would be impossible > to detect low power consumed by a sleeping chip, that continues to > sleep long after a phone is plugged in to charge. > Smaller battery packs are around company promotional gift prices. > > I recall the current FreeBSD sysctl provides switching per port, > but not per device type. I guess one could bodge a bit more security > by a script, approx: > > cp /etc/devd.conf.no_kbd /etc/devd.conf > kill -9 `cat /var/run.devd.pid` > /sbin/devd > sysctl hw.usb.disable_enumeration=0 # Defences open. > .... more specific port settings ? > echo "Now Insert within 10 sec." ; sleep 10 > sysctl hw.usb.disable_enumeration=1 > cp /etc/devd.conf.with_kbd /etc/devd.conf > kill -9 `cat /var/run.devd.pid` > /sbin/devd > > Keyboard is the long identified danger, but maybe there are > other dev types to protect against too, (ls /usr/share/man/man4), > Some devices such as 'da' I don't see as a problem, as for /dev/da > one can select on /etc/devd/*.conf "sernum" mount -o nosuid .. etc. > > Ideally the USB system might offer more fine tuned defence, to have > some better defence than above, but as that's minority interest, > security companies might need to contribute to development of that. > > Cheers, > Julian > From owner-freebsd-usb@freebsd.org Thu Sep 21 22:20:56 2017 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 166EDE26514; Thu, 21 Sep 2017 22:20:56 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "land.berklix.org", Issuer "land.berklix.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BF4A6D2C9; Thu, 21 Sep 2017 22:20:54 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from mart.js.berklix.net (pD9FA3C56.dip0.t-ipconnect.de [217.250.60.86]) (authenticated bits=128) by land.berklix.org (8.15.2/8.15.2) with ESMTPSA id v8LMJvnx044694 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Sep 2017 22:20:01 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id v8LMKfnt008965; Fri, 22 Sep 2017 00:20:41 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.7/8.14.7) with ESMTP id v8LMK45d026318; Fri, 22 Sep 2017 00:20:22 +0200 (CEST) (envelope-from jhs@berklix.com) Message-Id: <201709212220.v8LMK45d026318@fire.js.berklix.net> To: Hans Petter Selasky cc: freebsd-usb@freebsd.org, freebsd-security@freebsd.org, Astrid Jekat Subject: Re: Re.: BadUSB - On Accessories that Turn Evil, by Karsten Nohl + Jakob Lell From: "Julian H. Stacey" Organization: http://berklix.eu BSD Unix Linux Consultants, Munich Germany User-agent: EXMH on FreeBSD http://berklix.eu/free/ X-From: http://www.berklix.eu/~jhs/ In-reply-to: Your message "Wed, 20 Sep 2017 22:18:02 +0200." Date: Fri, 22 Sep 2017 00:20:03 +0200 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 22:20:56 -0000 Hi all Hans Petter Selasky wrote: > On 09/20/17 20:06, Julian H. Stacey wrote: > > A tiny diff to make it easier to grep sysctl descriptions: > > http://www.berklix.com/~jhs/src/bsd/fixes/FreeBSD/src/gen/sys/dev/usb/usb_hub.c.REL=12.0-CURRENT.diff > > Hi, > > Please wrap the long string in multiple pieces Done. > before committing it. See below > Looks good. Hope the sysctl has saved you some trouble :-) I'm not much exposed, but enthuse to others more exposed, how quickly you provided it once the risk was spotted :-). Hopefully those most at risk will enable it most, & like a firewall, may be ignorant if it saves them. I'm going to have my /etc/rc.conf enable it for all domains where `hostname` is not in my home domain. > --HPS > From: Gary Jennejohn > I suppose Hans means "submitting it." Julian should probably > open a bug report and attach his diff to it. Done, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222505 > Julian did at one time, many years ago, have a commit bit. But I > doubt he does now. Yes unfortunately my commit bit evaporated way back, lack of use. > From: "WhiteWinterWolf (Simon)" Thanks for a post with many good points, starting: > malicious mouse offers plenty of space to store all the chips you may Thanks Gary for pointing out German CT magazine issue 18/2017 https://www.heise.de/ct/ausgabe/2017-18-Gefahr-durch-angriffslustige-Hardware-3800729.html For those who can't read German: Normaly I just point to http://www.berklix.org/trans/ But currently as - Google have damaged their translator, no longer accept URLs - & Bing wont translate https, only http Temporarily there's http://www.berklix.org/trans/ct/ Cheers, Julian -- Julian H. Stacey, Computer Consultant, BSD Linux Unix Systems Engineer, Munich Reply below, Prefix '> '. Plain text, No .doc, base64, HTML, quoted-printable. http://berklix.eu/queen/ Petition to get 3.5 million UK votes back.