grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix invalid USB descriptor endless loop.


From: Aleš Nesrsta
Subject: Re: [PATCH] Fix invalid USB descriptor endless loop.
Date: Wed, 18 Sep 2013 00:06:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130806 Thunderbird/17.0.8

Hi Christian,
sorry for delay, I am too busy in last time.

> Hi,
>
> I discovered that on some PC's the USB stack would produce an invalid > descriptor upon query without an error.
> I don't know why this is the case, maybe broken hardware but I
> seriously doubt it.
> GRUB doesn't handle TT's at all, Clearing TT's or resetting them.
> Maybe thats a case for stuck transactions?
> The descriptor would contain 0 in length, or atleast the code would
> think that offset was the length
> and cause an endless loop.

I have minimal practical experiences with TT's.
Theoretically, AFAIK, it should normally work without special intervention - but of course the praxis could be different or I possibly missed something important...


Maybe this type of parsing is completely avoidable but for now I just added a 
break condition.
GRUB should not hang on faulty devices.

I cannot comment it (mainly the first sentence) - I am not original author of the most of GRUB USB code and this part of usb.c I didn't touched/studied yet (with some small exceptions) - I believed it works fine...:-) I have no time currently to think about this situation more deeply, but from my point of view, if this situation can really happen and cannot be avoided by another way, this patch could be OK.


But it will be very good to know also the reason why the broken descriptor is read from device and no another error is indicated. Which devices are affected? And which descriptor(s) exactly? Are these devices working well under Windows? Are affected still the same devices and in every case (at every connect)? And on every port of PC? Could you send detailed Linux lsusb output of "broken" devices? Or possibly whole detailed lsusb output, to be able to see the way how the device is connected to USB controller.

BR, Ales



BR,
Christian



_______________________________________________
Grub-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/grub-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]