]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: ipset: Hold module reference while requesting a module
authorPhil Sutter <phil@nwl.cc>
Fri, 29 Nov 2024 15:30:38 +0000 (16:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:08 +0000 (20:03 +0100)
commitba5e070f36682d07ca7ad2a953e6c9d96be19dca
tree0d3240828ec5730df70e7ab17583798a497d1973
parent152a8c179f2e812562e1333a1b24b2623db7dbd5
netfilter: ipset: Hold module reference while requesting a module

[ Upstream commit 456f010bfaefde84d3390c755eedb1b0a5857c3c ]

User space may unload ip_set.ko while it is itself requesting a set type
backend module, leading to a kernel crash. The race condition may be
provoked by inserting an mdelay() right after the nfnl_unlock() call.

Fixes: a7b4f989a629 ("netfilter: ipset: IP set core support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/ipset/ip_set_core.c