Skip to content

Commit a037f40

Browse files
committed
ipvs: properly dereference pe in ip_vs_add_service
jira LE-3201 cve CVE-2024-42322 Rebuild_History Non-Buildable kernel-rt-4.18.0-553.22.1.rt7.363.el8_10 commit-author Chen Hanxiao <[email protected]> commit cbd070a 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.22.1.rt7.363.el8_10/cbd070a4.failed Use pe directly to resolve sparse warning: net/netfilter/ipvs/ip_vs_ctl.c:1471:27: warning: dereference of noderef expression Fixes: 39b9722 ("ipvs: handle connections started by real-servers") Signed-off-by: Chen Hanxiao <[email protected]> Acked-by: Julian Anastasov <[email protected]> Acked-by: Simon Horman <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]> (cherry picked from commit cbd070a) Signed-off-by: Jonathan Maple <[email protected]> # Conflicts: # net/netfilter/ipvs/ip_vs_ctl.c
1 parent 3f0a201 commit a037f40

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
ipvs: properly dereference pe in ip_vs_add_service
2+
3+
jira LE-3201
4+
cve CVE-2024-42322
5+
Rebuild_History Non-Buildable kernel-rt-4.18.0-553.22.1.rt7.363.el8_10
6+
commit-author Chen Hanxiao <[email protected]>
7+
commit cbd070a4ae62f119058973f6d2c984e325bce6e7
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.22.1.rt7.363.el8_10/cbd070a4.failed
11+
12+
Use pe directly to resolve sparse warning:
13+
14+
net/netfilter/ipvs/ip_vs_ctl.c:1471:27: warning: dereference of noderef expression
15+
16+
Fixes: 39b972231536 ("ipvs: handle connections started by real-servers")
17+
Signed-off-by: Chen Hanxiao <[email protected]>
18+
Acked-by: Julian Anastasov <[email protected]>
19+
Acked-by: Simon Horman <[email protected]>
20+
Signed-off-by: Pablo Neira Ayuso <[email protected]>
21+
(cherry picked from commit cbd070a4ae62f119058973f6d2c984e325bce6e7)
22+
Signed-off-by: Jonathan Maple <[email protected]>
23+
24+
# Conflicts:
25+
# net/netfilter/ipvs/ip_vs_ctl.c
26+
diff --cc net/netfilter/ipvs/ip_vs_ctl.c
27+
index 2d211237ec4a,706c2b52a1ac..000000000000
28+
--- a/net/netfilter/ipvs/ip_vs_ctl.c
29+
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
30+
@@@ -1303,19 -1455,21 +1303,31 @@@ ip_vs_add_service(struct netns_ipvs *ip
31+
sched = NULL;
32+
}
33+
34+
++<<<<<<< HEAD
35+
+ /* Bind the ct retriever */
36+
+ RCU_INIT_POINTER(svc->pe, pe);
37+
+ pe = NULL;
38+
++=======
39+
+ ret = ip_vs_start_estimator(ipvs, &svc->stats);
40+
+ if (ret < 0)
41+
+ goto out_err;
42+
++>>>>>>> cbd070a4ae62 (ipvs: properly dereference pe in ip_vs_add_service)
43+
44+
/* Update the virtual service counters */
45+
if (svc->port == FTPPORT)
46+
atomic_inc(&ipvs->ftpsvc_counter);
47+
else if (svc->port == 0)
48+
atomic_inc(&ipvs->nullsvc_counter);
49+
- if (svc->pe && svc->pe->conn_out)
50+
+ if (pe && pe->conn_out)
51+
atomic_inc(&ipvs->conn_out_counter);
52+
53+
++<<<<<<< HEAD
54+
+ ip_vs_start_estimator(ipvs, &svc->stats);
55+
++=======
56+
+ /* Bind the ct retriever */
57+
+ RCU_INIT_POINTER(svc->pe, pe);
58+
+ pe = NULL;
59+
++>>>>>>> cbd070a4ae62 (ipvs: properly dereference pe in ip_vs_add_service)
60+
61+
/* Count only IPv4 services for old get/setsockopt interface */
62+
if (svc->af == AF_INET)
63+
* Unmerged path net/netfilter/ipvs/ip_vs_ctl.c

0 commit comments

Comments
 (0)