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]
Message-ID: <20130621095101.GA14648@zion.uk.xensource.com>
Date:	Fri, 21 Jun 2013 10:51:01 +0100
From:	Wei Liu <wei.liu2@...rix.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
CC:	Ian Campbell <ian.campbell@...rix.com>,
	<xen-devel@...ts.xensource.com>, <netdev@...r.kernel.org>,
	<kernel-janitors@...r.kernel.org>, <wei.liu2@...rix.com>
Subject: Re: [patch] xen-netback: double free on unload

On Fri, Jun 21, 2013 at 09:20:08AM +0300, Dan Carpenter wrote:
> There is a typo here, "i" vs "j", so we would crash on module_exit().
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> index a0b50ad..130bcb2 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -1968,8 +1968,8 @@ static void __exit netback_fini(void)
>  		del_timer_sync(&netbk->net_timer);
>  		kthread_stop(netbk->task);
>  		for (j = 0; j < MAX_PENDING_REQS; j++) {
> -			if (netbk->mmap_pages[i])
> -				__free_page(netbk->mmap_pages[i]);
> +			if (netbk->mmap_pages[j])
> +				__free_page(netbk->mmap_pages[j]);

Nice catch, thanks.


Wei.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ