瀏覽代碼

netfilter: nf_conntrack: restrict runtime expect hashsize modifications

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>
Alexey Dobriyan 15 年之前
父節點
當前提交
13ccdfc2af
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/netfilter/nf_conntrack_expect.c

+ 1 - 1
net/netfilter/nf_conntrack_expect.c

@@ -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)
 {