]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
netfilter: nf_ct_helper: warn when not applying default helper assignment
authorJiri Kosina <jkosina@suse.cz>
Wed, 1 Feb 2017 20:01:54 +0000 (21:01 +0100)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 1 Mar 2017 14:13:35 +0000 (07:13 -0700)
commit7809fadb3ed3b760c67007e8016554a116283103
tree235c4ed4c1b53fa88b2dad6eb8add62f9f57a0d3
parent8ec644402987858ef3309249749a3a988d064798
netfilter: nf_ct_helper: warn when not applying default helper assignment

BugLink: http://bugs.launchpad.net/bugs/1668993
commit dfe75ff8ca74f54b0fa5a326a1aa9afa485ed802 upstream.

Commit 3bb398d925 ("netfilter: nf_ct_helper: disable automatic helper
assignment") is causing behavior regressions in firewalls, as traffic
handled by conntrack helpers is now by default not passed through even
though it was before due to missing CT targets (which were not necessary
before this commit).

The default had to be switched off due to security reasons [1] [2] and
therefore should stay the way it is, but let's be friendly to firewall
admins and issue a warning the first time we're in situation where packet
would be likely passed through with the old default but we're likely going
to drop it on the floor now.

Rewrite the code a little bit as suggested by Linus, so that we avoid
spaghettiing the code even more -- namely the whole decision making
process regarding helper selection (either automatic or not) is being
separated, so that the whole logic can be simplified and code (condition)
duplication reduced.

[1] https://cansecwest.com/csw12/conntrack-attack.pdf
[2] https://home.regit.org/netfilter-en/secure-use-of-helpers/

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
net/netfilter/nf_conntrack_helper.c