netfilter: nf_conntrack: restrict runtime expect hashsize modifications
authorAlexey Dobriyan <adobriyan@gmail.com>
Mon, 8 Feb 2010 19:17:22 +0000 (11:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Feb 2010 19:17:22 +0000 (11:17 -0800)
Expectation hashtable size was simply glued to a variable with no code
to rehash expectations, so it was a bug to allow writing to it.
Make "expect_hashsize" readonly.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_expect.c

index fdf5d2a1d9b4cb7f620b6e8521eb5f0193720b9e..4ad7d1d809afb37021ff2a444664d87c5553a475 100644 (file)
@@ -569,7 +569,7 @@ static void exp_proc_remove(struct net *net)
 #endif /* CONFIG_PROC_FS */
 }
 
-module_param_named(expect_hashsize, nf_ct_expect_hsize, uint, 0600);
+module_param_named(expect_hashsize, nf_ct_expect_hsize, uint, 0400);
 
 int nf_conntrack_expect_init(struct net *net)
 {