]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_ct_helper: disable automatic helper re-assignment of different type
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 18 Jun 2012 15:29:53 +0000 (17:29 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 18 Jun 2012 23:24:52 +0000 (01:24 +0200)
commit381b81e8a053e15dbc99faa7365628926558c0b6
treee88905596468131aa76f99709a1c4e6972f529b6
parentfb950a64f95909e6d61ce4cabd16ccb85a5d8e1c
netfilter: nf_ct_helper: disable automatic helper re-assignment of different type

This patch modifies __nf_ct_try_assign_helper in a way that invalidates support
for the following scenario:

1) attach the helper A for first time when the conntrack is created
2) attach new (different) helper B due to changes the reply tuple caused by NAT

eg. port redirection from TCP/21 to TCP/5060 with both FTP and SIP helpers
loaded, which seems to be a quite unorthodox scenario.

I can provide a more elaborated patch to support this scenario but explicit
helper attachment provides a better solution for this since now the use can
attach the helpers consistently, without relying on the automatic helper
lookup magic.

This patch fixes a possible out of bound zeroing of the conntrack helper
extension if the helper B uses more memory for its private data than
helper A.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_helper.c