]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
netfilter: ctnetlink: Fix regression in CTA_STATUS processing
authorKevin Cernekee <cernekee@chromium.org>
Thu, 26 Jan 2017 22:49:43 +0000 (14:49 -0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 6 Feb 2017 11:48:26 +0000 (12:48 +0100)
commita963d710f367f68cd13d562a07db55ccb8daade9
treef2f33bbecd14af82f866c6297ac6f5607ba8a90f
parentdfe75ff8ca74f54b0fa5a326a1aa9afa485ed802
netfilter: ctnetlink: Fix regression in CTA_STATUS processing

The libnetfilter_conntrack userland library always sets IPS_CONFIRMED
when building a CTA_STATUS attribute.  If this toggles the bit from
0->1, the parser will return an error.  On Linux 4.4+ this will cause any
NFQA_EXP attribute in the packet to be ignored.  This breaks conntrackd's
userland helpers because they operate on unconfirmed connections.

Instead of returning -EBUSY if the user program asks to modify an
unchangeable bit, simply ignore the change.

Also, fix the logic so that user programs are allowed to clear
the bits that they are allowed to change.

Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_conntrack_common.h
net/netfilter/nf_conntrack_netlink.c