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:	Mon, 12 Mar 2012 21:47:38 -0600
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Jiang Liu <liuj97@...il.com>
Cc:	Yinghai Lu <yinghai@...nel.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Jiang Liu <jiang.liu@...wei.com>,
	Ashok Raj <ashok.raj@...el.com>,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Youquan Song <youquan.song@...el.com>,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	chenkeping@...wei.com
Subject: Re: [PATCH 3/5] Fix an access-after-free issue in function pci_stop_and_remove_bus()

On Sun, Mar 11, 2012 at 11:48 AM, Jiang Liu <liuj97@...il.com> wrote:
> If pci_stop_and_remove_bus() is called to remove a pci root bus,
> the host_bridge structure may have already been freed after returning
> from pci_remove_bus(), so don't access the structure any more.

pci_stop_and_remove_bus() hasn't been merged yet, so any fixes should
be incorporated into Yinghai's patch that adds it.

> Signed-off-by: Jiang Liu <jiang.liu@...wei.com>
> ---
>  drivers/pci/remove.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
> index 75b0092..25f368e 100644
> --- a/drivers/pci/remove.c
> +++ b/drivers/pci/remove.c
> @@ -194,9 +194,6 @@ void pci_stop_and_remove_bus(struct pci_bus *bus)
>
>        pci_remove_bus(bus);
>
> -       if (host_bridge)
> -               host_bridge->bus = NULL;
> -
>        if (pci_bridge)
>                pci_bridge->subordinate = NULL;
>  }
> --
> 1.7.5.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