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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0c53415d-3394-455a-a6b5-99d3efb92318@suse.com>
Date: Wed, 29 May 2024 14:27:54 +0200
From: Jürgen Groß <jgross@...e.com>
To: yskelg@...il.com, Stefano Stabellini <sstabellini@...nel.org>,
 Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>
Cc: skhan@...uxfoundation.org, sj@...nel.org,
 Austin Kim <austindh.kim@...il.com>, shjy180909@...il.com,
 linux-kernel@...r.kernel.org, xen-devel@...ts.xenproject.org,
 linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] xen/xenbus: handle potential dangling pointer issue in
 xen_pcibk_xenbus_probe

On 29.05.24 14:22, yskelg@...il.com wrote:
> From: Yunseong Kim <yskelg@...il.com>
> 
> If 'xen_pcibk_init_devices()' fails. This ensures that 'pdev->xdev' does
> not point to 'xdev' when 'pdev' is freed.
> 
> Signed-off-by: Yunseong Kim <yskelg@...il.com>
> ---
>   drivers/xen/xen-pciback/xenbus.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c
> index b11e401f1b1e..348d6803b8c0 100644
> --- a/drivers/xen/xen-pciback/xenbus.c
> +++ b/drivers/xen/xen-pciback/xenbus.c
> @@ -54,6 +54,7 @@ static struct xen_pcibk_device *alloc_pdev(struct xenbus_device *xdev)
>   	INIT_WORK(&pdev->op_work, xen_pcibk_do_op);
>   
>   	if (xen_pcibk_init_devices(pdev)) {
> +		pdev->xdev = NULL;
>   		kfree(pdev);
>   		pdev = NULL;
>   	}

NAK.

This doesn't make any sense, as pdev is freed.


Juergen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ