netfilter: nfnetlink_cthelper: cap to maximum number of expectation per master on updates
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 netfilter: nfnetlink_cthelper: cap to maximum number of expectation per master on updates
Really cap it to NF_CT_EXPECT_MAX_CNT (255) on updates.
The commit ("netfilter: nfnetlink_cthelper: cap to maximum number of expectation per master") only covers creation of helpers, not updates.
Fixes 397c8300972f ("netfilter: nf_conntrack_helper: cap maximum number of expectation at helper registration")
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- net/netfilter/nfnetlink_cthelper.c | 2 ++ 1 file changed, 2 insertions(+)
net/netfilter/nfnetlink_cthelper.c +2 -0
@@ -314,6 +314,8 @@ nfnl_cthelper_update_policy_one(const struct nf_conntrack_expect_policy *policy, new_policy->max_expected =ntohl (nla_get_be32 (tb[NFCTH_POLICY_EXPECT_MAX ])); +if (!new_policy->max_expected) + new_policy->max_expected =NF_CT_EXPECT_MAX_CNT ;if (new_policy->max_expected >NF_CT_EXPECT_MAX_CNT )return -EINVAL ;
Signature · 1 line
2.47.3