On Mon, Aug 14, 2006 at 12:34:56PM -0400, Alan Stern wrote:
Does anyone object to the patch below? It would help at least one person;
I'm concerned that it might cause trouble somewhere else.
@@ -526,6 +519,12 @@ static int scsi_probe_lun(struct scsi_de
if (response_len > 255)
response_len = first_inquiry_len; /* sanity */
+ /* Sanitize the Vendor, Product, and Revision fields. */
+ for (i = 8; i < 36; ++i) {
+ if (inq_result[i] < 0x20 || inq_result[i] > 0x7e)
+ inq_result[i] = ' ';
+ }
+
/*
This does affect all subsequent usage of the inquiry data, doesn't it? I.e.
- comparison against blacklist entries for device flags,
- readout in dmesg,
- contents of sysfs attributes,
- text in procfs?
--
Stefan Richter
-=====-=-==- =--- -===-
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html