netfilter: nft_set_rbtree: skip end interval element from gc

commit 60c0c230c6f046da536d3df8b39a20b9a9fd6af0 upstream.

rbtree lazy gc on insert might collect an end interval element that has
been just added in this transactions, skip end interval elements that
are not yet active.

BUG=b/325656688
TEST=presubmit
RELEASE_NOTE=Fixed CVE-2024-26581 in the Linux kernel.

cos-patch: security-high
Fixes: f718863aca46 ("netfilter: nft_set_rbtree: fix overlap expiration walk")
Cc: [email protected]
Reported-by: lonial con <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
(cherry picked from commit 1296c110c5a0b45a8fcf58e7d18bc5da61a565cb)
Signed-off-by: Robert Kolchmeyer <[email protected]>
Change-Id: If8cc1a513a524d4e45cd8a7eceaab97aa9109410
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/65390
Reviewed-by: Oleksandr Tymoshenko <[email protected]>
Tested-by: Cusky Presubmit Bot <[email protected]>
1 file changed