]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
netfilter: ipset: do not call ipset_nest_end after nla_nest_cancel
authorPan Bian <bianpan2016@163.com>
Mon, 10 Dec 2018 13:39:37 +0000 (14:39 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit6c46333e3dbb43b2b8f4219684fd285c7056b2cb
tree4642f2b933752a7b9c2342af8be90c4313b10b1a
parent503eca3257f88982813455ed908cbe25f902be46
netfilter: ipset: do not call ipset_nest_end after nla_nest_cancel

BugLink: https://bugs.launchpad.net/bugs/1837477
[ Upstream commit 708abf74dd87f8640871b814faa195fb5970b0e3 ]

In the error handling block, nla_nest_cancel(skb, atd) is called to
cancel the nest operation. But then, ipset_nest_end(skb, atd) is
unexpected called to end the nest operation. This patch calls the
ipset_nest_end only on the branch that nla_nest_cancel is not called.

Fixes: 45040978c899 ("netfilter: ipset: Fix set:list type crash when flush/dump set in parallel")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/netfilter/ipset/ip_set_list_set.c