netfilter: nf_tables: fix out of memory error handling
authorFlorian Westphal <fw@strlen.de>
Tue, 22 Aug 2023 17:49:52 +0000 (19:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 14:11:03 +0000 (16:11 +0200)
commited3fe5f9020c90125dfb40c1ae808d915ede68d8
treee2b52730e22f5b1844568d690c7e04ca1af5b1c3
parent41841b585e53babdfb0fa6fdfa54f6d7c28c1206
netfilter: nf_tables: fix out of memory error handling

[ Upstream commit 5e1be4cdc98c989d5387ce94ff15b5ad06a5b681 ]

Several instances of pipapo_resize() don't propagate allocation failures,
this causes a crash when fault injection is enabled for gfp_kernel slabs.

Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges")
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_set_pipapo.c