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] [day] [month] [year] [list]
Date:	Tue, 8 Feb 2011 13:10:43 -0800
From:	Jesse Barnes <jbarnes@...tuousgeek.org>
To:	Jesper Juhl <jj@...osbits.net>
Cc:	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: Avoid potential NULL pointer dereference in
 pci_scan_bridge

On Mon, 24 Jan 2011 21:14:33 +0100 (CET)
Jesper Juhl <jj@...osbits.net> wrote:

> pci_add_new_bus() calls pci_alloc_child_bus() which calls pci_alloc_bus() 
> that allocates memory dynamically with kzalloc(). The return value of 
> kzalloc() is the pointer that's eventually returned from 
> pci_add_new_bus(), so since kzalloc() can fail and return NULL so can 
> pci_add_new_bus(). Thus we may end up dereferencing a NULL pointer in 
> drivers/pci/probe.c::pci_scan_bridge(). Seems to me we should test for 
> this and bail out if it happens rather than crashing.
> Also removed some trailing whitespace that bugged me while looking at 
> this.
> 
> Signed-off-by: Jesper Juhl <jj@...osbits.net>
> ---

Applied to linux-next (in the absence of actual reports I'll be
conservative), thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center
--
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