]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netfilter: ipset: Fix data race between add and list header in all hash types
authorJozsef Kadlecsik <kadlec@netfilter.org>
Thu, 14 May 2026 08:55:11 +0000 (10:55 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 16 May 2026 11:21:41 +0000 (13:21 +0200)
commitc0c42a0fb27144c1cd7509f94bec0d3bcca98c72
treeb675203894747f0dbc44a7197b748793bddd256a
parent4322dcde6b4173c2d8e8e6118ed290794263bcc8
netfilter: ipset: Fix data race between add and list header in all hash types

The "ipset list -terse" command is actually a dump operation which
may run parallel with "ipset add" commands, which can trigger an
internal resizing of the hash type of sets just being dumped. However,
dumping just the header part of the set was not protected against
underlying resizing. Fix it by protecting the header dumping part
as well.

Fixes: c4c997839cf9 ("netfilter: ipset: Fix parallel resizing and listing of the same set")
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipset/ip_set_core.c