]> 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 18:51:28 +0000 (19:51 +0100)
commit0e67805e805c1f3edd6f43adbe08ea14b552694b
tree5744321446fe8b10af9a6c845839a0558b8c1872
parentc7d644f76949ff3b103787bab070108fec6c2165
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