]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netfilter: nft_set_rbtree: check for partial overlaps in anonymous sets
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 6 Feb 2026 12:33:44 +0000 (13:33 +0100)
committerFlorian Westphal <fw@strlen.de>
Fri, 6 Feb 2026 12:36:07 +0000 (13:36 +0100)
commit4780ec142cbb24b794129d3080eee5cac2943ffc
tree90be104a8cdc312ce4b767c9c825d61e82212cb8
parent7f9203f41aae8eea74fba6a3370da41332eabcda
netfilter: nft_set_rbtree: check for partial overlaps in anonymous sets

Userspace provides an optimized representation in case intervals are
adjacent, where the end element is omitted.

The existing partial overlap detection logic skips anonymous set checks
on start elements for this reason.

However, it is possible to add intervals that overlap to this anonymous
where two start elements with the same, eg. A-B, A-C where C < B.

      start     end
A        B
      start  end
        A     C

Restore the check on overlapping start elements to report an overlap.

Fixes: c9e6978e2725 ("netfilter: nft_set_rbtree: Switch to node list walk for overlap detection")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nft_set_rbtree.c