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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1290104216-31326-1-git-send-email-segoon@openwall.com>
Date:	Thu, 18 Nov 2010 21:16:54 +0300
From:	Vasiliy Kulikov <segoon@...nwall.com>
To:	kernel-janitors@...r.kernel.org
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/4] x86: platform: olpc: fix potential NULL pointer dereference

pdev is never NULL here, instead we should check pcidev as
it is returned from pci_get_device() and may be NULL.
This code dereferences NULL in pci_enable_device_io() call.

Signed-off-by: Vasiliy Kulikov <segoon@...nwall.com>
---
 Compile tested.

 arch/x86/platform/olpc/olpc-xo1.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/platform/olpc/olpc-xo1.c b/arch/x86/platform/olpc/olpc-xo1.c
index f5442c0..c35d03a 100644
--- a/arch/x86/platform/olpc/olpc-xo1.c
+++ b/arch/x86/platform/olpc/olpc-xo1.c
@@ -94,7 +94,7 @@ static int __devinit olpc_xo1_probe(struct platform_device *pdev)
 
 	pcidev = pci_get_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA,
 				NULL);
-	if (!pdev)
+	if (!pcidev)
 		return -ENODEV;
 
 	r = setup_bases(pcidev);
-- 
1.7.0.4

--
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