Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 2014 21:02:46 +0000 (UTC)
From:      Zbigniew Bodek <zbb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r275583 - head/sys/arm/mv
Message-ID:  <201412072102.sB7L2kom024031@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zbb
Date: Sun Dec  7 21:02:45 2014
New Revision: 275583
URL: https://svnweb.freebsd.org/changeset/base/275583

Log:
  Fix buffer overflow in Marvell PCI/PCIe driver
  
  Buffer overflow occured when more than one MSI was allocated.
  
  Submitted by:    Wojciech Macek <wma@semihalf.com>
  Obtained from:   Semihalf

Modified:
  head/sys/arm/mv/mv_pci.c

Modified: head/sys/arm/mv/mv_pci.c
==============================================================================
--- head/sys/arm/mv/mv_pci.c	Sun Dec  7 20:32:24 2014	(r275582)
+++ head/sys/arm/mv/mv_pci.c	Sun Dec  7 21:02:45 2014	(r275583)
@@ -1171,7 +1171,7 @@ mv_pcib_alloc_msi(device_t dev, device_t
 
 	for (i = start; i < start + count; i++) {
 		setbit(&sc->sc_msi_bitmap, i);
-		irqs[i] = MSI_IRQ + i;
+		*irqs++ = MSI_IRQ + i;
 	}
 	debugf("%s: start: %x count: %x\n", __func__, start, count);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412072102.sB7L2kom024031>