diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2026-10-28 12:25:35 +0100 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2026-11-05 13:31:11 +0100 |
| commit | e95b3be75ae0652d40a48a210f0cf5197b3b3783 (patch) | |
| tree | 7a6f1f454397704bfe25f0660c94b8e25cebd7cd /rust/kernel | |
| parent | 7af52bda65c0bbbf40894aa3df36ac1bb5697984 (diff) | |
netfilter: nf_tables: fix memleak when rule deletion fails with hardware offload
Allocate flow rule object after transaction has been allocation and rule
deactivation has been performed, otherwise memleak is possible. Let the
transaction unwind the existing rule deactivation from the abort path,
this needs to update nft_flow_rule_destroy() to skip release if
flow_rule is null.
While at this, remove check for non-null flow_rule in newrule error path
now that nft_flow_rule_destroy() is skipped if flow_rule is null.
Fixes: 63b48c73ff56 ("netfilter: nf_tables_offload: undo updates if transaction fails")
Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Link: https://patch.msgid.link/20261028062204.1079089-1-hdthky0@gmail.com/
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions
