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
| ||
|
Date: Fri, 23 Dec 2016 15:18:37 +0100 From: Pablo Neira Ayuso <pablo@...filter.org> To: Xin Long <lucien.xin@...il.com> Cc: network dev <netdev@...r.kernel.org>, netfilter-devel@...r.kernel.org, davem@...emloft.net, Marcelo Ricardo Leitner <marcelo.leitner@...il.com> Subject: Re: [PATCHv2 net] netfilter: check duplicate config when initializing in ipt_CLUSTERIP On Tue, Dec 20, 2016 at 07:14:34PM +0800, Xin Long wrote: > Now when adding an ipt_CLUSTERIP rule, it only checks duplicate config in > clusterip_config_find_get(). But after that, there may be still another > thread to insert a config with the same ip, then it leaves proc_create_data > to do duplicate check. > > It's more reasonable to check duplicate config by ipt_CLUSTERIP itself, > instead of checking it by proc fs duplicate file check. Before, when proc > fs allowed duplicate name files in a directory, It could even crash kernel > because of use-after-free. > > This patch is to check duplicate config under the protection of clusterip > net lock when initializing a new config and correct the return err. > > Note that it also moves proc file node creation after adding new config, as > proc_create_data may sleep, it couldn't be called under the clusterip_net > lock. clusterip_config_find_get returns NULL if c->pde is null to make sure > it can't be used until the proc file node creation is done. Applied, thanks.
Powered by blists - more mailing lists