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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 11 Oct 2009 08:18:58 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Josua Dietze <digidietze@...isberghof.de>,
	Ben Efros <ben@...doctor.com>,
	fangxiaozhi <huananhu@...wei.com>, Greg KH <greg@...ah.com>,
	Kernel development list <linux-kernel@...r.kernel.org>,
	USB list <linux-usb@...r.kernel.org>,
	Hugh Blemings <hugh@...mings.org>
Subject: Re: USB serial regression 2.6.31.1 -> 2.6.31.2


> The device presented two LUNs on the mass-storage interface.  LUN 0 was 
> the emulated CDROM (named "Mass Storage") and LUN 1 was direct-access 
> (named "SD Storage").  LUN 0 appeared to work normally, although it 
> reported Not Ready, No Medium Present errors.  LUN 1 did the same 
> thing, but in its response to the REQUEST SENSE command it set the 
> additional-sense-length byte to 0x12 instead of 0x0a, for no apparent 
> reason.  This caused usb-storage to assume the device supported SANE 
> SENSE, which presumably it doesn't.

Interesting. Under the windows, the device exposes a CD-ROM (which
contains windows SW for it). It also has an micro-SD connector as some
kind of "bonus" though I've never used it.

> Further REQUEST SENSE commands therefore requested 96 bytes of data
> instead of the standard 18 bytes.  With LUN 0 this worked okay.  But 
> with LUN 1 it didn't; the device reported a failure of the REQUEST 
> SENSE.  This is what caused usb-storage to issue the device reset.

Might be interesting to see what happens with a micro-SD actually in the
slot. Also, doing a device-reset on a multi-function device because one
of the functions isn't too happy may be a tad harsh no ?

> After the reset usb-storage continued to ask for 96 bytes of sense
> data, and LUN 1 continued to fail the commands.  Hence the repeated
> resets.

Ok.

> Thus the two bugs in the Huawei device are: Incorrect 
> additional-sense-length byte for LUN 1, and incorrect CSW for a 96-byte 
> REQUEST SENSE on LUN 1.
> 
> I can see two approaches for working around this.  The first is to make
> the SENSE SENSE test more discriminating.  For example, test for
> additional-sense-length values larger than 0x12 instead of larger than
> 0x0a.  Ben Efros, would this be acceptable?
> 
> The second approach is to add a SINGLE_LUN flag to all the Huawei 
> entries in unusual_devs.h.  It's not clear that this is a good idea; if 
> one of those devices really does have an SD card then people might want 
> to be able to use it.

They do have an SD slot indeed.

Any pointer to the piece of code I can tweak to change 0xa to 0x12
(SENSE stuff) to see if that helps ?

Cheers,
Ben.

> Alan Stern
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ