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-next>] [day] [month] [year] [list]
Message-Id: <1482407910-13295-1-git-send-email-arvind.yadav.cs@gmail.com>
Date:   Thu, 22 Dec 2016 17:28:30 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     mirq-linux@...e.qmqm.pl
Cc:     linux-kernel@...r.kernel.org
Subject: [v1] misc: cb710: core:- Handle return NULL error from pcim_iomap_table

Here, If pcim_iomap_table will fail. It will return NULL.
Kernel can run into a NULL-pointer dereference.
This error check will avoid NULL pointer dereference.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
 drivers/misc/cb710/core.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c
index fb397e7..7b60019 100644
--- a/drivers/misc/cb710/core.c
+++ b/drivers/misc/cb710/core.c
@@ -248,6 +248,8 @@ static int cb710_probe(struct pci_dev *pdev,
 	spin_lock_init(&chip->irq_lock);
 	chip->pdev = pdev;
 	chip->iobase = pcim_iomap_table(pdev)[0];
+	if (!chip->iobase)
+		return -ENOMEM;
 
 	pci_set_drvdata(pdev, chip);
 
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ