[PATCH 1/2] multipath-tools: fix the bug while processing vpd 0x83 designation descriptors

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

 



This patch fixes the bug while processing the vpd 0x83 designation descriptors.
Removing the buggy check(> sizeof(buf))while loping the descriptors. Sizeof(buf) will 
always return 8 (in 64 bit machine). Descriptor length can be more than 8 bytes in 
some cases. This was causing problems while configuring my storage with alua.

Signed-off-by: Babu Moger <babu.moger@xxxxxxxxxx>
---
--- multipath-tools/libmultipath/prioritizers/alua_rtpg.c.orig	2012-02-21 16:14:55.000000000 -0600
+++ multipath-tools/libmultipath/prioritizers/alua_rtpg.c	2012-02-21 16:16:41.000000000 -0600
@@ -184,9 +184,6 @@ get_target_port_group(int fd)
 
 		rc = -RTPG_NO_TPG_IDENTIFIER;
 		FOR_EACH_VPD83_DSCR(vpd83, dscr) {
-			if ((((char *) dscr) - ((char *) vpd83)) > sizeof(buf))
-				break;
-
 			if (vpd83_dscr_istype(dscr, IDTYPE_TARGET_PORT_GROUP)) {
 				struct vpd83_tpg_dscr *	p;
 


--
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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux