Skip to content
Commit b389139f authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nf_tables: fix underflow in chain reference counter



Set element addition error path decrements reference counter on chains
twice: once on element release and again via nft_data_release().

Then, d6b47866 ("netfilter: nf_tables: fix underflow in object
reference counter") incorrectly fixed this by removing the stateful
object reference count decrement.

Restore the stateful object decrement as in b91d9036 ("netfilter:
nf_tables: fix leaking object reference count") and let
nft_data_release() decrement the chain reference counter, so this is
done only once.

Fixes: d6b47866 ("netfilter: nf_tables: fix underflow in object reference counter")
Fixes: 628bd3e4 ("netfilter: nf_tables: drop map element references from preparation phase")
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 3e704897
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment