netfilter: nf_tables: fix a missing check of nla_put_failure
authorKangjie Lu <kjlu@umn.edu>
Fri, 21 Dec 2018 06:46:23 +0000 (00:46 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:20:59 +0000 (09:20 +0100)
commitd398807976c904be4dfa2e7804d4ab43aa904774
tree19062bad58a0ae6c77e260c12eeb2edb90554f3c
parenta787b7ac3cc79cc8ad02e91385b9c7f5adebd31c
netfilter: nf_tables: fix a missing check of nla_put_failure

[ Upstream commit eb8950861c1bfd3eecc8f6faad213e3bca0dc395 ]

If nla_nest_start() may fail. The fix checks its return value and goes
to nla_put_failure if it fails.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c