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] [day] [month] [year] [list]
Date:	Wed, 14 Mar 2012 12:33:08 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Jan Beulich <JBeulich@...e.com>
Cc:	Jeremy Fitzhardinge <jeremy@...p.org>,
	xen-devel <xen-devel@...ts.xen.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xenbus: don't free other end details too early

On Mon, Mar 05, 2012 at 05:11:31PM +0000, Jan Beulich wrote:
> The individual drivers' remove functions could legitimately attempt to
> access this information (for logging messages if nothing else). Note
> that I did not in fact observe a problem anywhere, but I came across
> this while looking into the reasons for what turned out to need the
> fix at https://lkml.org/lkml/2012/3/5/336 to vsprintf().

applied.
> 
> Signed-off-by: Jan Beulich <jbeulich@...e.com>
> 
> ---
>  drivers/xen/xenbus/xenbus_probe.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- 3.3-rc6/drivers/xen/xenbus/xenbus_probe.c
> +++ 3.3-rc6-xenbus-remove-details/drivers/xen/xenbus/xenbus_probe.c
> @@ -257,11 +257,12 @@ int xenbus_dev_remove(struct device *_de
>  	DPRINTK("%s", dev->nodename);
>  
>  	free_otherend_watch(dev);
> -	free_otherend_details(dev);
>  
>  	if (drv->remove)
>  		drv->remove(dev);
>  
> +	free_otherend_details(dev);
> +
>  	xenbus_switch_state(dev, XenbusStateClosed);
>  	return 0;
>  }
> 
> 
> 

> The individual drivers' remove functions could legitimately attempt to
> access this information (for logging messages if nothing else). Note
> that I did not in fact observe a problem anywhere, but I came across
> this while looking into the reasons for what turned out to need the
> fix at https://lkml.org/lkml/2012/3/5/336 to vsprintf().
> 
> Signed-off-by: Jan Beulich <jbeulich@...e.com>
> 
> ---
>  drivers/xen/xenbus/xenbus_probe.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- 3.3-rc6/drivers/xen/xenbus/xenbus_probe.c
> +++ 3.3-rc6-xenbus-remove-details/drivers/xen/xenbus/xenbus_probe.c
> @@ -257,11 +257,12 @@ int xenbus_dev_remove(struct device *_de
>  	DPRINTK("%s", dev->nodename);
>  
>  	free_otherend_watch(dev);
> -	free_otherend_details(dev);
>  
>  	if (drv->remove)
>  		drv->remove(dev);
>  
> +	free_otherend_details(dev);
> +
>  	xenbus_switch_state(dev, XenbusStateClosed);
>  	return 0;
>  }

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