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]
Date:	Wed, 22 Jan 2014 21:26:34 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	christoph.paasch@...ouvain.be
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] tcp: metrics: Fix rcu-race when deleting
 multiple entries

From: Christoph Paasch <christoph.paasch@...ouvain.be>
Date: Tue, 21 Jan 2014 13:30:26 +0100

> In bbf852b96ebdc6d1 I introduced the tmlist, which allows to delete
> multiple entries from the cache that match a specified destination if no
> source-IP is specified.
> 
> However, as the cache is an RCU-list, we should not create this tmlist, as
> it will change the tcpm_next pointer of the element that will be deleted
> and so a thread iterating over the cache's entries while holding the
> RCU-lock might get "redirected" to this tmlist.
> 
> This patch fixes this, by reverting back to the old behavior prior to
> bbf852b96ebdc6d1, which means that we simply change the tcpm_next
> pointer of the previous element (pp) to jump over the one we are
> deleting.
> The difference is that we call kfree_rcu() directly on the cache entry,
> which allows us to delete multiple entries from the list.
> 
> Fixes: bbf852b96ebdc6d1 (tcp: metrics: Delete all entries matching a certain destination)
> Signed-off-by: Christoph Paasch <christoph.paasch@...ouvain.be>

Looks good, applied, thank you.
--
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