Skip to content

Commit 99292e6

Browse files
committed
netfilter: ipset: Add list flush to cancel_gc
jira LE-3201 cve CVE-2024-39503 Rebuild_History Non-Buildable kernel-rt-4.18.0-553.27.1.rt7.368.el8_10 commit-author Alexander Maltsev <[email protected]> commit c1193d9 Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-rt-4.18.0-553.27.1.rt7.368.el8_10/c1193d9b.failed Flushing list in cancel_gc drops references to other lists right away, without waiting for RCU to destroy list. Fixes race when referenced ipsets can't be destroyed while referring list is scheduled for destroy. Fixes: 97f7cf1 ("netfilter: ipset: fix performance regression in swap operation") Signed-off-by: Alexander Maltsev <[email protected]> Acked-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]> (cherry picked from commit c1193d9) Signed-off-by: Jonathan Maple <[email protected]> # Conflicts: # net/netfilter/ipset/ip_set_list_set.c
1 parent ad2099a commit 99292e6

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
netfilter: ipset: Add list flush to cancel_gc
2+
3+
jira LE-3201
4+
cve CVE-2024-39503
5+
Rebuild_History Non-Buildable kernel-rt-4.18.0-553.27.1.rt7.368.el8_10
6+
commit-author Alexander Maltsev <[email protected]>
7+
commit c1193d9bbbd379defe9be3c6de566de684de8a6f
8+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
9+
Will be included in final tarball splat. Ref for failed cherry-pick at:
10+
ciq/ciq_backports/kernel-rt-4.18.0-553.27.1.rt7.368.el8_10/c1193d9b.failed
11+
12+
Flushing list in cancel_gc drops references to other lists right away,
13+
without waiting for RCU to destroy list. Fixes race when referenced
14+
ipsets can't be destroyed while referring list is scheduled for destroy.
15+
16+
Fixes: 97f7cf1cd80e ("netfilter: ipset: fix performance regression in swap operation")
17+
Signed-off-by: Alexander Maltsev <[email protected]>
18+
Acked-by: Jozsef Kadlecsik <[email protected]>
19+
Signed-off-by: Pablo Neira Ayuso <[email protected]>
20+
(cherry picked from commit c1193d9bbbd379defe9be3c6de566de684de8a6f)
21+
Signed-off-by: Jonathan Maple <[email protected]>
22+
23+
# Conflicts:
24+
# net/netfilter/ipset/ip_set_list_set.c
25+
diff --cc net/netfilter/ipset/ip_set_list_set.c
26+
index 7501303ebfa2,54e2a1dd7f5f..000000000000
27+
--- a/net/netfilter/ipset/ip_set_list_set.c
28+
+++ b/net/netfilter/ipset/ip_set_list_set.c
29+
@@@ -552,7 -548,10 +552,14 @@@ list_set_cancel_gc(struct ip_set *set
30+
struct list_set *map = set->data;
31+
32+
if (SET_WITH_TIMEOUT(set))
33+
++<<<<<<< HEAD
34+
+ del_timer_sync(&map->gc);
35+
++=======
36+
+ timer_shutdown_sync(&map->gc);
37+
+
38+
+ /* Flush list to drop references to other ipsets */
39+
+ list_set_flush(set);
40+
++>>>>>>> c1193d9bbbd3 (netfilter: ipset: Add list flush to cancel_gc)
41+
}
42+
43+
static const struct ip_set_type_variant set_variant = {
44+
* Unmerged path net/netfilter/ipset/ip_set_list_set.c

0 commit comments

Comments
 (0)