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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Jun 2012 21:03:14 -0700
From:	Anirban Chakraborty <anirban.chakraborty@...gic.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
CC:	Sony Chacko <sony.chacko@...gic.com>,
	Dept-Eng Linux Driver <Linux-Driver@...gic.com>,
	netdev <netdev@...r.kernel.org>,
	"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [patch] qlcnic: off by one in qlcnic_init_pci_info()



On 6/14/12 11:34 AM, "Dan Carpenter" <dan.carpenter@...cle.com> wrote:

>The adapter->npars[] array has QLCNIC_MAX_PCI_FUNC elements.  We
>allocate it that way a few lines earlier in the function.  So this test
>is off by one.
>
>Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
>diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
>b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
>index 33c3e46..212c121 100644
>--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
>+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
>@@ -479,7 +479,7 @@ qlcnic_init_pci_info(struct qlcnic_adapter *adapter)
> 
> 	for (i = 0; i < QLCNIC_MAX_PCI_FUNC; i++) {
> 		pfn = pci_info[i].id;
>-		if (pfn > QLCNIC_MAX_PCI_FUNC) {
>+		if (pfn >= QLCNIC_MAX_PCI_FUNC) {
> 			ret = QL_STATUS_INVALID_PARAM;
> 			goto err_eswitch;
> 		}

Thanks for the patch.

Acked-by: Anirban Chakraborty <anirban.chakraborty@...gic.com>


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists