lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADvTj4o9GL5p6eZq+0Q_Pw_ZKuYHvAtav79==CJDdnTj7q+bBg@mail.gmail.com>
Date:   Thu, 10 Sep 2020 12:51:47 -0600
From:   James Hilliard <james.hilliard1@...il.com>
To:     Hector Martin <hector@...cansoft.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Johan Hovold <johan@...nel.org>,
        Lars Melin <larsm17@...il.com>,
        Oliver Neukum <oneukum@...e.de>, linux-usb@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Russ Dill <Russ.Dill@...il.com>
Subject: Re: [PATCH v2] usb: serial: Repair FTDI FT232R bricked eeprom

On Thu, Sep 10, 2020 at 3:57 AM Hector Martin <hector@...cansoft.com> wrote:
>
> On 10/09/2020 18.52, James Hilliard wrote:
> > So I'm having trouble coming up with a reliable way to fix this in userspace,
> > I've already got quite a few moving parts there as is and most of what I
> > come up with seems like it would not work reliably, at least for automatically
> > repairing the eeprom.
>
> I'm confused as to why this is hard to fix in userspace. You already
> said you have userspace code binding to the proper VID/PID, so your code
> won't find the bricked device. Then it's just a matter of having a udev
> rule run the unbricker when it detects the bad device (which should
> issue a USB reset when it's done reprogramming, making the device appear
> as the right VID/PID), thus effectively doing the same thing the kernel
> does. If this is embedded and not using udev, then substitute whatever
> equivalent you have. If you're polling for the device at runtime instead
> and don't have a device manager, just poll for the VID 0 device too and
> apply the fix.
Wouldn't you have to do a bunch of stuff like unbind the ftdi_sio driver before
you can issue usb control commands from userspace?

I haven't tested this yet but my assumption was that either a kernel driver
or libusb can issue usb control messages, but both can not be bound to
a device at the same time. I figured this wouldn't have come up when you
tested your python script since the script likely predated adding the brick PID
to the ftdi_sio Linux kernel driver.

Maybe it makes sense to add a sysfs interface for reading/writing eeprom values
without having to unbind the ftdi_sio driver.
>
> I can't think of a scenario where this would be difficult to fix in
> userspace...
>
> --
> Hector Martin (hector@...cansoft.com)
> Public Key: https://mrcn.st/pub

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ