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: <c7846023-b7cd-2c65-7203-f5a0b44a7c98@citrix.com>
Date:   Thu, 21 Jun 2018 14:05:56 +0100
From:   Ross Lagerwall <ross.lagerwall@...rix.com>
To:     Ben Hutchings <ben.hutchings@...ethink.co.uk>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>
CC:     <stable@...r.kernel.org>,
        Sasha Levin <alexander.levin@...rosoft.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4.4 059/268] xen-netfront: Fix race between device setup
 and open

On 06/11/2018 03:29 PM, Ben Hutchings wrote:
> On Mon, 2018-05-28 at 12:00 +0200, Greg Kroah-Hartman wrote:
>> 4.4-stable review patch.  If anyone has any objections, please let me know.
>>
>> ------------------
>>
>> From: Ross Lagerwall <ross.lagerwall@...rix.com>
>>
>> [ Upstream commit f599c64fdf7d9c108e8717fb04bc41c680120da4 ]
> [...]
>> --- a/drivers/net/xen-netfront.c
>> +++ b/drivers/net/xen-netfront.c
> [...]
>> @@ -1839,6 +1824,7 @@ static int talk_to_netback(struct xenbus
>>   		goto out;
> 
> This "goto out" is outside the locked section...
> 
>>   	}
>>   
>> +	rtnl_lock();
>>   	if (info->queues)
>>   		xennet_destroy_queues(info);
>>   
>> @@ -1849,6 +1835,7 @@ static int talk_to_netback(struct xenbus
>>   		info->queues = NULL;
>>   		goto out;
>>   	}
>> +	rtnl_unlock();
>>   
>>   	/* Create shared ring, alloc event channel -- for each queue */
>>   	for (i = 0; i < num_queues; ++i) {
>> @@ -1945,8 +1932,10 @@ abort_transaction_no_dev_fatal:
>>   	xenbus_transaction_end(xbt, 1);
>>    destroy_ring:
>>   	xennet_disconnect_backend(info);
>> +	rtnl_lock();
>>   	xennet_destroy_queues(info);
>>    out:
>> +	rtnl_unlock();
> 
> ...so this will be an unmatched unlock.
> 
> You need to add another label below the rtnl_unlock().
> 

Thanks for spotting this. I've sent patches to the list to fix this and 
another issue with the original patch.

Regards,
-- 
Ross Lagerwall

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ