linux-stable-rt/drivers/scsi/lpfc
Anton Blanchard 07da60c1f4 [SCSI] lpfc: fix oops when parsing dodgy VPD
We have seen two cases where VPD on an emulex card has been incorrect
and we end up walking off the end of memory. It looks like someone made
an update (increased the length of a string) without increasing the
Length field. Then we do:

	Length -= (3+i);

And since Length is unsigned it becomes very large and we loop forever
in the encapsulating:

	while (Length > 0) {

If we make Length signed then we fall out of the loop and proceed on.

Its important to note we have only seen this in the lab and it may be
the only two cases of this in existence, but since the rest of the code
has been written to be resilient against bad VPD we may as well fix this
too.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-01 10:02:00 -05:00
..
Makefile
lpfc.h [SCSI] lpfc 8.1.11 : Add soft_wwnn sysfs attribute, rename soft_wwn_enable 2006-12-03 09:34:43 -06:00
lpfc_attr.c [SCSI] lpfc 8.1.11 : Add soft_wwnn sysfs attribute, rename soft_wwn_enable 2006-12-03 09:34:43 -06:00
lpfc_compat.h
lpfc_crtn.h IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
lpfc_ct.c [SCSI] lpfc 8.1.11 : Discovery Fixes 2006-12-03 09:28:43 -06:00
lpfc_disc.h
lpfc_els.c [SCSI] lpfc 8.1.11 : Fix Memory leaks 2006-12-03 09:29:36 -06:00
lpfc_hbadisc.c [SCSI] lpfc 8.1.11 : Add soft_wwnn sysfs attribute, rename soft_wwn_enable 2006-12-03 09:34:43 -06:00
lpfc_hw.h [SCSI] lpfc 8.1.11 : Misc Fixes 2006-12-03 09:35:04 -06:00
lpfc_init.c [SCSI] lpfc: fix oops when parsing dodgy VPD 2007-04-01 10:02:00 -05:00
lpfc_logmsg.h [SCSI] lpfc 8.1.11 : Adjust LOG_FCP logging 2006-12-03 09:29:57 -06:00
lpfc_mbox.c
lpfc_mem.c [SCSI] scsi: lpfc error path fix 2007-01-06 09:05:18 -06:00
lpfc_nportdisc.c [SCSI] lpfc 8.1.11 : Fix Memory leaks 2006-12-03 09:29:36 -06:00
lpfc_scsi.c [SCSI] lpfc 8.1.11 : Misc Fixes 2006-12-03 09:35:04 -06:00
lpfc_scsi.h
lpfc_sli.c [SCSI] lpfc: add PCI error recovery support 2007-02-16 09:42:38 -06:00
lpfc_sli.h [SCSI] lpfc 8.1.11 : Fix lpfc_multi_ring_support 2006-12-03 09:29:18 -06:00
lpfc_version.h [SCSI] lpfc 8.1.11 : Change version number to 8.1.11 2006-12-03 09:35:20 -06:00