lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 29 Nov 2013 11:16:47 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Jens Axboe <axboe@...nel.dk>
Cc:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Akhil Bhansali <bhansaliakhil@...il.com>,
	rchinthekindi <rchinthekindi@...c-inc.com>,
	Mike Snitzer <snitzer@...hat.com>,
	Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] skd: wrong limiter in skd_acquire_msix()

On some paths, there can be fewer than SKD_MAX_MSIX_COUNT (13) elements
in the skdev->msix_entries[] array so we would be going past the end of
the array.

Fixes: e67f86b31ae5 ('Add support for sTec's pci-e flash card Kronos')
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
Static checker stuff.  Compile tested only.

diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 9199c93be926..d0f3e4e81cc5 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -3989,7 +3989,7 @@ static int skd_acquire_msix(struct skd_device *skdev)
 	}
 
 	/* Enable MSI-X vectors for the base queue */
-	for (i = 0; i < SKD_MAX_MSIX_COUNT; i++) {
+	for (i = 0; i < skdev->msix_count; i++) {
 		qentry = &skdev->msix_entries[i];
 		snprintf(qentry->isr_name, sizeof(qentry->isr_name),
 			 "%s%d-msix %s", DRV_NAME, skdev->devno,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ