tech-kern archive

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

Re: [PATCH] Re: Reboot resistant USB bug



> [T]he pn533 chip from NXP [...] has at least two bugs in its USB
> implementation:

> - Large transfer can overwrite the chip USB configuration descriptors
> - In some situation the chip fails to update the toggle bit in USB
>   frame.
> [...]
> I found three situations where the NetBSD kernel USB implementation
> would break the day.  Here are the proposed patches to fix the
> situation:

> 1) Provide fake USB descriptors 
> https://ftp.espci.fr/shadow/manu/desc_fake.patch

> When we detect the USB descriptors are corrupted (type and size make
> no sense), we provide hard-coded configuration, interface and
> endpoint descriptors.  We trigger that on appropriate USB product ID
> and vendor ID from the USB device descriptor, which fortunately is
> not corrupted.

Shouldn't you do that always for that <vendor,product>, since the
descriptors could get overwritten by garbage which happens to contain
reasonable-looking type and size values?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index