kernel-ark/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
..
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 [PATCH] turn many #if $undefined_string into #ifdef $undefined_string 2005-07-27 16:26:08 -07:00
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 [SCSI] lpfc 8.1.10 : Add support for dev_loss_tmo_callbk and fast_io_fail_tmo_callbk 2006-09-04 21:25:21 -05:00
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 [SCSI] lpfc 8.1.7 : Fix failing firmware download due to mailbox delays needing to be longer 2006-08-06 11:28:03 -05:00
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 [SCSI] lpfc: minor syntax fixes 2006-03-06 10:20:56 -06:00
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
lpfc.h [SCSI] lpfc 8.1.11 : Add soft_wwnn sysfs attribute, rename soft_wwn_enable 2006-12-03 09:34:43 -06:00
Makefile [SCSI] lpfc: Update copyright notices 2005-07-02 19:08:29 -05:00