]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: fix a race in nf_ct_ext_create()
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 21 Sep 2010 21:17:32 +0000 (21:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Sep 2010 20:13:33 +0000 (13:13 -0700)
commitf55d023ebf8c7adbb9de91735661a4458f17f870
tree11eb05f550c046b3099d52df146948dce0c12635
parente7ed6d56e6aac0a48350b3c3615330facb09712a
netfilter: fix a race in nf_ct_ext_create()

As soon as rcu_read_unlock() is called, there is no guarantee current
thread can safely derefence t pointer, rcu protected.

Fix is to copy t->alloc_size in a temporary variable.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_conntrack_extend.c