Files
kernel_arpi/include/uapi/linux
Florian Westphal c5ee4cbd0f netfilter: ctnetlink: disable helper autoassign
[ Upstream commit d1ca60efc53d665cf89ed847a14a510a81770b81 ]

When userspace, e.g. conntrackd, inserts an entry with a specified helper,
its possible that the helper is lost immediately after its added:

ctnetlink_create_conntrack
  -> nf_ct_helper_ext_add + assign helper
    -> ctnetlink_setup_nat
      -> ctnetlink_parse_nat_setup
         -> parse_nat_setup -> nfnetlink_parse_nat_setup
	                       -> nf_nat_setup_info
                                 -> nf_conntrack_alter_reply
                                   -> __nf_ct_try_assign_helper

... and __nf_ct_try_assign_helper will zero the helper again.

Set IPS_HELPER bit to bypass auto-assign logic, its unwanted, just like
when helper is assigned via ruleset.

Dropped old 'not strictly necessary' comment, it referred to use of
rcu_assign_pointer() before it got replaced by RCU_INIT_POINTER().

NB: Fixes tag intentionally incorrect, this extends the referenced commit,
but this change won't build without IPS_HELPER introduced there.

Fixes: 6714cf5465 ("netfilter: nf_conntrack: fix explicit helper attachment and NAT")
Reported-by: Pham Thanh Tuyen <phamtyn@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-02-16 12:56:25 +01:00
..
2021-09-14 08:46:08 +02:00
2021-01-25 18:44:44 +01:00
2021-08-17 11:47:53 -04:00
2020-12-28 14:21:31 +00:00
2021-02-09 10:58:19 +01:00
2021-06-10 20:59:05 -04:00
2021-08-25 10:37:05 -07:00
2021-03-04 17:58:15 -08:00
2021-08-23 13:19:09 +02:00
2021-08-23 13:19:09 +02:00
2021-08-10 13:32:40 -04:00
2021-02-08 13:01:24 +01:00
2021-10-06 12:05:51 +00:00
2021-06-03 15:31:34 -07:00
2021-02-26 09:41:03 -08:00
2021-05-21 15:03:50 +02:00
2021-03-10 09:34:06 +01:00
2021-07-06 10:37:46 -05:00
2021-01-16 23:19:26 +01:00
2021-03-10 09:34:06 +01:00
2021-06-23 12:56:08 -07:00
2021-01-07 16:17:32 +01:00
2021-06-12 13:16:45 -07:00