]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: cttimeout: ctnl_timeout_find_get() returns incorrect pointer to type
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 3 Sep 2018 11:53:22 +0000 (13:53 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 10 Sep 2018 23:31:10 +0000 (01:31 +0200)
commit552364065e9a19a263b91dbfc2eddc16a8cc0f00
tree0715c30db8197db3471ab7fc85ffc36cc76baf3d
parent4d883997cac0b61af0e3df04e420749dab1395df
netfilter: cttimeout: ctnl_timeout_find_get() returns incorrect pointer to type

Compiler did not catch incorrect typing in the rcu hook assignment.

 % nfct add timeout test-tcp inet tcp established 100 close 10 close_wait 10
 % iptables -I OUTPUT -t raw -p tcp -j CT --timeout test-tcp
 dmesg - xt_CT: Timeout policy `test-tcp' can only be used by L3 protocol number 25000

The CT target bails out with incorrect layer 3 protocol number.

Fixes: b64caa900ce4 ("netfilter: cttimeout: decouple timeout policy from nfnetlink_cttimeout object")
Reported-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink_cttimeout.c