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] [day] [month] [year] [list]
Message-ID: <20130806121701.GQ22756@redhat.com>
Date:	Tue, 6 Aug 2013 14:17:01 +0200
From:	Veaceslav Falico <vfalico@...hat.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, fubar@...ibm.com, andy@...yhouse.net
Subject: Re: [PATCH net-next] bonding: fix send_peer_notif leekage on rtnl
 lock congestion

On Mon, Aug 05, 2013 at 04:12:12PM -0700, David Miller wrote:
>From: Veaceslav Falico <vfalico@...hat.com>
>Date: Mon,  5 Aug 2013 21:47:33 +0200
>
>> @@ -2999,7 +3002,10 @@ void bond_activebackup_arp_mon(struct work_struct *work)
>>  		if (!rtnl_trylock()) {
>>  			read_lock(&bond->lock);
>>  			delta_in_ticks = 1;
>> -			should_notify_peers = false;
>> +			if (should_notify_peers) {
>> +				bond->send_peer_notif++;
>
>I doubt this increment to a shared datastructure is safe with
>the locks you hold here.
>
>You don't hold RTNL and you only have bond->lock as a reader.

You're right, we can race here. This whole locking juggling should be
changed.

Self-NAK for this, I'll rework it.
--
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