netfilter: nft_flow_offload: reset dst in route object after setting up flow

[ Upstream commit 9e0f043038 ]

dst is transferred to the flow object, route object does not own it
anymore.  Reset dst in route object, otherwise if flow_offload_add()
fails, error path releases dst twice, leading to a refcount underflow.

Fixes: a3c90f7a23 ("netfilter: nf_tables: flow offload expression")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Pablo Neira Ayuso 2024-02-21 12:32:58 +01:00 • committed by Greg Kroah-Hartman
commit 558b00a30e
2 changed files with 14 additions and 4 deletions