netfilter: nf_conntrack: restrict runtime expect hashsize modifications
authorAlexey Dobriyan <adobriyan@gmail.com>
Mon, 8 Feb 2010 19:17:22 +0000 (11:17 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Feb 2010 15:37:53 +0000 (07:37 -0800)
commit 13ccdfc2af03e09e60791f7d4bc4ccf53398af7c upstream.

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>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/netfilter/nf_conntrack_expect.c

index 2032dfe25ca85a64daab1760fb1ce6b01fc96c7e..1b8ed66aa0bad5c1c981bc232d35da9a6d2eadd3 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)
 {