Skip to content

Commit 6cac6c2

Browse files
committed
HBASE-28089 Upgrade BouncyCastle to fix CVE-2023-33201 (#5407)
- Upgrades to v1.76, i.e. the latest version - Replaces *-jdk15on with *-jdk18on - Excludes *-jdk15on from everywhere else, to avoid conflicts with *-jdk18on Signed-off-by: Duo Zhang <zhangduo@apache.org> Reviewed-by: Aman Poonia <aman.poonia.29@gmail.com> (cherry picked from commit 8b2ca86)
1 parent f80b2a0 commit 6cac6c2

File tree

10 files changed

+52
-15
lines changed

10 files changed

+52
-15
lines changed

hbase-asyncfs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
</dependency>
7676
<dependency>
7777
<groupId>org.bouncycastle</groupId>
78-
<artifactId>bcprov-jdk15on</artifactId>
78+
<artifactId>bcprov-jdk18on</artifactId>
7979
<scope>test</scope>
8080
</dependency>
8181
<dependency>

hbase-common/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@
154154
</dependency>
155155
<dependency>
156156
<groupId>org.bouncycastle</groupId>
157-
<artifactId>bcprov-jdk15on</artifactId>
157+
<artifactId>bcprov-jdk18on</artifactId>
158158
<scope>test</scope>
159159
</dependency>
160160
<dependency>
161161
<groupId>org.bouncycastle</groupId>
162-
<artifactId>bcpkix-jdk15on</artifactId>
162+
<artifactId>bcpkix-jdk18on</artifactId>
163163
<scope>test</scope>
164164
</dependency>
165165
</dependencies>

hbase-endpoint/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</dependency>
102102
<dependency>
103103
<groupId>org.bouncycastle</groupId>
104-
<artifactId>bcprov-jdk15on</artifactId>
104+
<artifactId>bcprov-jdk18on</artifactId>
105105
<scope>test</scope>
106106
</dependency>
107107
<dependency>

hbase-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
</dependency>
153153
<dependency>
154154
<groupId>org.bouncycastle</groupId>
155-
<artifactId>bcprov-jdk15on</artifactId>
155+
<artifactId>bcprov-jdk18on</artifactId>
156156
<scope>test</scope>
157157
</dependency>
158158
<dependency>

hbase-http/pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
</dependency>
108108
<dependency>
109109
<groupId>org.bouncycastle</groupId>
110-
<artifactId>bcprov-jdk15on</artifactId>
110+
<artifactId>bcprov-jdk18on</artifactId>
111111
<scope>test</scope>
112112
</dependency>
113113
<dependency>
@@ -170,12 +170,24 @@
170170
<artifactId>apacheds-core</artifactId>
171171
<version>${apacheds.version}</version>
172172
<scope>test</scope>
173+
<exclusions>
174+
<exclusion>
175+
<groupId>org.bouncycastle</groupId>
176+
<artifactId>bcprov-jdk15on</artifactId>
177+
</exclusion>
178+
</exclusions>
173179
</dependency>
174180
<dependency>
175181
<groupId>org.apache.directory.server</groupId>
176182
<artifactId>apacheds-protocol-ldap</artifactId>
177183
<version>${apacheds.version}</version>
178184
<scope>test</scope>
185+
<exclusions>
186+
<exclusion>
187+
<groupId>org.bouncycastle</groupId>
188+
<artifactId>bcprov-jdk15on</artifactId>
189+
</exclusion>
190+
</exclusions>
179191
</dependency>
180192
<dependency>
181193
<groupId>org.apache.directory.server</groupId>

hbase-mapreduce/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
</dependency>
214214
<dependency>
215215
<groupId>org.bouncycastle</groupId>
216-
<artifactId>bcprov-jdk15on</artifactId>
216+
<artifactId>bcprov-jdk18on</artifactId>
217217
<scope>test</scope>
218218
</dependency>
219219
</dependencies>

hbase-resource-bundle/src/main/resources/supplemental-models.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,10 +586,10 @@ under the License.
586586
<supplement>
587587
<project>
588588
<groupId>org.bouncycastle</groupId>
589-
<artifactId>bcpkix-jdk15on</artifactId>
589+
<artifactId>bcpkix-jdk18on</artifactId>
590590

591591
<licenses>
592-
<!-- bcpkix-jdk15on is licensed under the Bouncy Castle License, which is equivalent to the MIT License -->
592+
<!-- bcpkix-jdk18on is licensed under the Bouncy Castle License, which is equivalent to the MIT License -->
593593
<license>
594594
<name>MIT License</name>
595595
<url>http://www.opensource.org/licenses/mit-license.php</url>

hbase-rest/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230
<!--Test-->
231231
<dependency>
232232
<groupId>org.bouncycastle</groupId>
233-
<artifactId>bcprov-jdk15on</artifactId>
233+
<artifactId>bcprov-jdk18on</artifactId>
234234
<scope>test</scope>
235235
</dependency>
236236
<dependency>

hbase-server/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@
331331
</dependency>
332332
<dependency>
333333
<groupId>org.bouncycastle</groupId>
334-
<artifactId>bcprov-jdk15on</artifactId>
334+
<artifactId>bcprov-jdk18on</artifactId>
335335
<scope>test</scope>
336336
</dependency>
337337
<dependency>
338338
<groupId>org.bouncycastle</groupId>
339-
<artifactId>bcpkix-jdk15on</artifactId>
339+
<artifactId>bcpkix-jdk18on</artifactId>
340340
<scope>test</scope>
341341
</dependency>
342342
<dependency>

pom.xml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@
850850
<joni.version>2.1.43</joni.version>
851851
<jcodings.version>1.0.57</jcodings.version>
852852
<spy.version>2.12.2</spy.version>
853-
<bouncycastle.version>1.70</bouncycastle.version>
853+
<bouncycastle.version>1.76</bouncycastle.version>
854854
<skyscreamer.version>1.5.1</skyscreamer.version>
855855
<kerby.version>1.0.1</kerby.version>
856856
<commons-crypto.version>1.1.0</commons-crypto.version>
@@ -1615,7 +1615,7 @@
16151615
</dependency>
16161616
<dependency>
16171617
<groupId>org.bouncycastle</groupId>
1618-
<artifactId>bcprov-jdk15on</artifactId>
1618+
<artifactId>bcprov-jdk18on</artifactId>
16191619
<version>${bouncycastle.version}</version>
16201620
<scope>test</scope>
16211621
</dependency>
@@ -1627,7 +1627,7 @@
16271627
</dependency>
16281628
<dependency>
16291629
<groupId>org.bouncycastle</groupId>
1630-
<artifactId>bcpkix-jdk15on</artifactId>
1630+
<artifactId>bcpkix-jdk18on</artifactId>
16311631
<version>${bouncycastle.version}</version>
16321632
<scope>test</scope>
16331633
</dependency>
@@ -2393,6 +2393,23 @@
23932393
</rules>
23942394
</configuration>
23952395
</execution>
2396+
<execution>
2397+
<id>banned-bouncycastle-jdk15on</id>
2398+
<goals>
2399+
<goal>enforce</goal>
2400+
</goals>
2401+
<configuration>
2402+
<rules>
2403+
<bannedDependencies>
2404+
<excludes>
2405+
<exclude>org.bouncycastle:*-jdk15on</exclude>
2406+
</excludes>
2407+
<message>Use org.bouncycastle:*-jdk18on instead</message>
2408+
<searchTransitive>true</searchTransitive>
2409+
</bannedDependencies>
2410+
</rules>
2411+
</configuration>
2412+
</execution>
23962413
<execution>
23972414
<id>check-aggregate-license</id>
23982415
<goals>
@@ -4064,6 +4081,14 @@
40644081
<groupId>org.slf4j</groupId>
40654082
<artifactId>slf4j-reload4j</artifactId>
40664083
</exclusion>
4084+
<exclusion>
4085+
<groupId>org.bouncycastle</groupId>
4086+
<artifactId>bcprov-jdk15on</artifactId>
4087+
</exclusion>
4088+
<exclusion>
4089+
<groupId>org.bouncycastle</groupId>
4090+
<artifactId>bcpkix-jdk15on</artifactId>
4091+
</exclusion>
40674092
</exclusions>
40684093
</dependency>
40694094
<dependency>

0 commit comments

Comments
 (0)