Commit d1404e1
committed
### What changes were proposed in this pull request?
This PR aims to upgrade `okhttp` to 4.12.0 and `okio` to 3.9.0
### Why are the changes needed?
okhttp depends on okio which has to be upgraded as well.
The new okhttp version fixes the following vulnerabilities:
1)
CVE-2023-0833 - A flaw was found in Red Hat's AMQ-Streams,
which ships a version of the OKHttp component with an
information disclosure flaw via an exception triggered
by a header containing an illegal value. This issue could allow
an authenticated attacker to access information outside of their
regular permissions.
CVSSv3 Score:- 5.5(Medium)
https://nvd.nist.gov/vuln/detail/CVE-2023-0833
2)
CVE-2021-0341 - In verifyHostName of OkHostnameVerifier.java,
there is a possible way to accept a certificate for the wrong
domain due to improperly used crypto. This could lead to remote
information disclosure with no additional execution privileges
needed. User interaction is not needed for exploitation.
CVSSv3 Score:- 7.5(High)
https://nvd.nist.gov/vuln/detail/CVE-2021-0341
square/okhttp#6724
There are two places in the Spark repository where the okhttp dependency comes
in as transitive dependency:
1)
[INFO] +- org.apache.hadoop:hadoop-cloud-storage:jar:3.4.0:compile
[INFO] | +- org.apache.hadoop:hadoop-annotations:jar:3.4.0:compile
[INFO] | +- org.apache.hadoop:hadoop-aliyun:jar:3.4.0:compile
[INFO] | | +- com.aliyun.oss:aliyun-sdk-oss:jar:3.13.2:compile
[INFO] | | | +- org.jdom:jdom2:jar:2.0.6:compile
[INFO] | | | +- com.aliyun:aliyun-java-sdk-core:jar:4.5.10:compile
[INFO] | | | | +- org.ini4j:ini4j:jar:0.5.4:compile
[INFO] | | | | +- io.opentracing:opentracing-api:jar:0.33.0:compile
[INFO] | | | | \- io.opentracing:opentracing-util:jar:0.33.0:compile
[INFO] | | | | \- io.opentracing:opentracing-noop:jar:0.33.0:compile
[INFO] | | | +- com.aliyun:aliyun-java-sdk-ram:jar:3.1.0:compile
[INFO] | | | \- com.aliyun:aliyun-java-sdk-kms:jar:2.11.0:compile
[INFO] | | \- org.codehaus.jettison:jettison:jar:1.5.4:compile
[INFO] | +- org.apache.hadoop:hadoop-azure-datalake:jar:3.4.0:compile
[INFO] | | \- com.microsoft.azure:azure-data-lake-store-sdk:jar:2.3.9:compile
[INFO] | \- org.apache.hadoop:hadoop-huaweicloud:jar:3.4.0:compile
[INFO] | \- com.huaweicloud:esdk-obs-java:jar:3.20.4.2:compile
[INFO] | +- com.jamesmurty.utils:java-xmlbuilder:jar:1.2:compile
[INFO] | +- com.squareup.okhttp3:okhttp:jar:3.14.2:compile
[INFO] | \- com.squareup.okio:okio:jar:1.17.6:compile
The Hadoop team has attempted to remove okhttp from their codebase:
remove okhttp usage: https://issues.apache.org/jira/browse/HADOOP-18890
Unfortunately the hadoop-huaweicloud dependency is still there which
pulls in the vulnerable okhttp 3.x version.
https://github.com/apache/hadoop/blob/trunk/hadoop-cloud-storage-project/hadoop-cloud-storage/pom.xml#L137C19-L137C37
3.4.0 is the only available version here:
https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-huaweicloud
2)
[INFO] +- org.apache.spark:spark-kubernetes_2.13:jar:4.0.0-SNAPSHOT:compile
[INFO] | +- io.fabric8:kubernetes-httpclient-okhttp:jar:6.13.3:compile
[INFO] | | +- io.fabric8:kubernetes-client-api:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-core:jar:6.13.3:compile
[INFO] | | | | \- io.fabric8:kubernetes-model-common:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-gatewayapi:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-resource:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-rbac:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-admissionregistration:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-apps:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-autoscaling:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-apiextensions:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-batch:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-certificates:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-coordination:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-discovery:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-events:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-extensions:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-flowcontrol:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-networking:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-metrics:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-policy:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-scheduling:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-storageclass:jar:6.13.3:compile
[INFO] | | | +- io.fabric8:kubernetes-model-node:jar:6.13.3:compile
[INFO] | | | \- org.snakeyaml:snakeyaml-engine:jar:2.7:compile
[INFO] | | +- com.squareup.okhttp3:okhttp:jar:3.12.12:compile
[INFO] | | | \- com.squareup.okio:okio:jar:1.17.6:compile
[INFO] | | \- com.squareup.okhttp3:logging-interceptor:jar:3.12.12:compile
The kubernetes-client's maintainers do not want upgrade to okhttp 4.x
because it's based on Kotlin, they recommend to exclude 3.x. Related documentation:
https://github.com/fabric8io/kubernetes-client/blob/main/doc/KubernetesClientWithIPv6Clusters.md
My proposed solution based on the above finding:
I think we should exclude the 3.x version and switch to use okhttp 4.x.
It is binary backwards compatible with okhttp 3.x. More details are here:
https://square.github.io/okhttp/upgrading_to_okhttp_4/
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
1 parent 8566bc6 commit d1404e1
File tree
5 files changed
+171
-4
lines changed- dev/deps
- hadoop-cloud
- resource-managers/kubernetes
- core
- integration-tests
5 files changed
+171
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
192 | | - | |
| 195 | + | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| |||
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
226 | | - | |
227 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
174 | 219 | | |
175 | 220 | | |
176 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
235 | 237 | | |
236 | 238 | | |
237 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
82 | 140 | | |
83 | 141 | | |
84 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
71 | 129 | | |
72 | 130 | | |
73 | 131 | | |
| |||
0 commit comments