Skip to content

Commit 065c732

Browse files
daymxnrlazo
andauthored
Bump protobuf to 3.25.5 (#6343)
Per [b/371058443](https://b.corp.google.com/issues/371058443), This bumps our protobuf deps to `3.25.5` to address [CVE 2024-7254](GHSA-735f-pc8j-v9w8). All relevant libraries should have a changelog attached, unless I missed any. This PR also fixes the following: - [b/371223043](https://b.corp.google.com/issues/371223043) -> Migrate protobuf deps to version catalog Fixes #6336 --------- Co-authored-by: Rodrigo Lazo <[email protected]>
1 parent b49d448 commit 065c732

File tree

29 files changed

+53
-35
lines changed

29 files changed

+53
-35
lines changed

build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ ext {
5454
robolectricVersion = libs.versions.robolectric.get()
5555
androidxTestCoreVersion = libs.versions.androidx.test.core.get()
5656
androidxTestJUnitVersion = libs.versions.androidx.test.junit.get()
57-
protocVersion = libs.versions.protoc.get()
58-
javaliteVersion = libs.versions.javalite.get()
59-
protobufJavaUtilVersion = libs.versions.protobufjavautil.get()
6057
}
6158

6259
apply plugin: com.google.firebase.gradle.plugins.PublishingPlugin
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Unreleased
2-
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
34

encoders/firebase-encoders-proto/firebase-encoders-proto.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ java {
3232

3333
protobuf {
3434
protoc {
35-
artifact = "com.google.protobuf:protoc:$protocVersion"
35+
artifact = libs.protoc.get().toString()
3636
}
3737
}
3838

@@ -47,7 +47,7 @@ dependencies {
4747
testAnnotationProcessor project(':encoders:firebase-encoders-processor')
4848

4949
testImplementation 'com.google.guava:guava:31.0-jre'
50-
testImplementation "com.google.protobuf:protobuf-java-util:$protobufJavaUtilVersion"
50+
testImplementation libs.protobuf.java.util
5151
testImplementation "com.google.truth:truth:$googleTruthVersion"
5252
testImplementation 'com.google.truth.extensions:truth-proto-extension:1.0'
5353
testImplementation 'junit:junit:4.13.1'

encoders/protoc-gen-firebase-encoders/protoc-gen-firebase-encoders.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ plugins {
2222

2323
protobuf {
2424
protoc {
25-
artifact = "com.google.protobuf:protoc:$protocVersion"
25+
artifact = libs.protoc.get().toString()
2626
}
2727
}
2828

encoders/protoc-gen-firebase-encoders/tests/tests.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies {
2626

2727
protobuf {
2828
protoc {
29-
artifact = "com.google.protobuf:protoc:$protocVersion"
29+
artifact = libs.protoc.get().toString()
3030
}
3131
plugins {
3232
firebaseEncoders {
@@ -51,7 +51,7 @@ dependencies {
5151

5252
testImplementation project(":encoders:firebase-encoders")
5353
testImplementation project(":encoders:firebase-encoders-proto")
54-
testImplementation "com.google.protobuf:protobuf-java:3.21.9"
54+
testImplementation libs.protobuf.java
5555
testImplementation "com.google.truth:truth:1.0.1"
5656
testImplementation 'junit:junit:4.13.1'
5757
}

firebase-config/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
2-
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
34

45
# 22.0.0
56
* [changed] Bump internal dependencies

firebase-crashlytics-ndk/firebase-crashlytics-ndk.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ dependencies {
124124

125125
androidTestImplementation "androidx.test:core:$androidxTestCoreVersion"
126126
androidTestImplementation 'androidx.test:runner:1.4.0'
127-
androidTestImplementation "com.google.protobuf:protobuf-javalite:$javaliteVersion"
127+
androidTestImplementation libs.protobuf.java.lite
128128
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:2.28.1'
129129
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.28.1'
130130
androidTestImplementation 'org.mockito:mockito-core:3.4.3'

firebase-crashlytics/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Unreleased
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
4+
25

36
# 19.2.0
47
* [fixed] Improved data consistency for rapid user actions.

firebase-crashlytics/firebase-crashlytics.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ dependencies {
104104
androidTestImplementation(libs.androidx.test.runner)
105105
androidTestImplementation(libs.androidx.test.junit)
106106
androidTestImplementation("com.google.firebase:firebase-encoders-json:18.0.1")
107-
androidTestImplementation("com.google.protobuf:protobuf-java:3.21.11")
107+
androidTestImplementation(libs.protobuf.java)
108108
androidTestImplementation(libs.truth)
109109
androidTestImplementation("com.linkedin.dexmaker:dexmaker:2.28.3")
110110
androidTestImplementation(libs.mockito.dexmaker)

firebase-dataconnect/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Unreleased
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
24

35
# 16.0.0-beta01
46
* [feature] Initial release of the Data Connect SDK (public preview). Learn how to
@@ -19,3 +21,4 @@
1921
([#6299](https://github.com/firebase/firebase-android-sdk/pull/6299))
2022
* [changed] Added `equals` and `hashCode` methods to `GeneratedConnector`.
2123
([#6177](https://github.com/firebase/firebase-android-sdk/pull/6177))
24+

firebase-firestore/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
2-
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
34

45
# 25.1.0
56
* [feature] Add support for the VectorValue type. [#6154](//github.com/firebase/firebase-android-sdk/pull/6154)

firebase-firestore/firebase-firestore.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protobuf {
3636
// Configure the protoc executable
3737
protoc {
3838
// Download from repositories
39-
artifact = "com.google.protobuf:protoc:$protocVersion"
39+
artifact = libs.protoc.get().toString()
4040
}
4141
plugins {
4242
grpc {
@@ -164,7 +164,7 @@ dependencies {
164164
testImplementation 'org.mockito:mockito-core:2.25.0'
165165
testImplementation "org.robolectric:robolectric:$robolectricVersion"
166166

167-
testCompileOnly "com.google.protobuf:protobuf-java:$protocVersion"
167+
testCompileOnly libs.protobuf.java
168168

169169
androidTestImplementation "androidx.annotation:annotation:1.1.0"
170170
androidTestImplementation 'androidx.test:rules:1.5.0'

firebase-firestore/ktx/ktx.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ dependencies {
7171
testImplementation 'org.mockito:mockito-core:2.25.0'
7272
testImplementation "org.robolectric:robolectric:$robolectricVersion"
7373

74-
testCompileOnly "com.google.protobuf:protobuf-java:$protocVersion"
74+
testCompileOnly libs.protobuf.java
7575
}

firebase-inappmessaging-display/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
2-
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
34

45
# 21.0.0
56
* [fixed] Fixed bad token exception while showing FIAM

firebase-inappmessaging/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
2-
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
34

45
# 21.0.0
56
* [fixed] Fixed bad token exception while showing FIAM

firebase-inappmessaging/firebase-inappmessaging.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protobuf {
3232
// Configure the protoc executable
3333
protoc {
3434
// Download from repositories
35-
artifact = "com.google.protobuf:protoc:$protocVersion"
35+
artifact = libs.protoc.get().toString()
3636
}
3737
plugins {
3838
grpc {

firebase-messaging/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Unreleased
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
4+
25

36
# 24.0.2
47
* [changed] Included message priority when logging to Firelog.

firebase-messaging/firebase-messaging.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protobuf {
2525
protobuild project(path: ':encoders:protoc-gen-firebase-encoders', configuration: 'shadow')
2626
}
2727
protoc {
28-
artifact = "com.google.protobuf:protoc:$protocVersion"
28+
artifact = libs.protoc.get().toString()
2929
}
3030
plugins {
3131
firebaseEncoders {

firebase-ml-modeldownloader/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Unreleased
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
24

35

46
# 25.0.0

firebase-ml-modeldownloader/firebase-ml-modeldownloader.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protobuf {
3434
// Configure the protoc executable
3535
protoc {
3636
// Download from repositories
37-
artifact = "com.google.protobuf:protoc:$protocVersion"
37+
artifact = libs.protoc.get().toString()
3838
}
3939
generateProtoTasks {
4040
all().each { task ->
@@ -121,7 +121,7 @@ dependencies {
121121
testImplementation 'androidx.test:runner:1.5.1'
122122
testImplementation "androidx.test.ext:junit:$androidxTestJUnitVersion"
123123
testImplementation 'com.github.tomakehurst:wiremock-standalone:2.26.3'
124-
testImplementation "com.google.protobuf:protobuf-java-util:$protobufJavaUtilVersion"
124+
testImplementation libs.protobuf.java.util
125125
testImplementation "com.google.truth:truth:$googleTruthVersion"
126126
testImplementation 'com.google.truth.extensions:truth-proto-extension:1.0'
127127
testImplementation 'junit:junit:4.13-beta-2'

firebase-perf/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
2-
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
34

45
# 21.0.1
56
* [fixed] Fixed an `ExceptionInInitializerError` where the `url.openStream()` causes a crash if

firebase-perf/firebase-perf.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ firebaseLibrary {
3636

3737
protobuf {
3838
protoc {
39-
artifact = "com.google.protobuf:protoc:$protocVersion"
39+
artifact = libs.protoc.get().toString()
4040
}
4141
generateProtoTasks {
4242
all().each { task ->
@@ -104,7 +104,7 @@ dependencies {
104104
implementation "androidx.annotation:annotation:1.1.0"
105105
implementation "androidx.lifecycle:lifecycle-process:2.3.1"
106106
implementation "com.google.android.gms:play-services-tasks:18.0.1"
107-
implementation "com.google.protobuf:protobuf-javalite:$javaliteVersion"
107+
implementation libs.protobuf.java.lite
108108
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
109109
implementation 'androidx.annotation:annotation:1.7.0'
110110
implementation 'androidx.appcompat:appcompat:1.2.0'
@@ -130,7 +130,7 @@ dependencies {
130130
exclude group: 'com.google.firebase', module: 'firebase-common'
131131
exclude group: 'com.google.firebase', module: 'firebase-components'
132132
}
133-
testCompileOnly "com.google.protobuf:protobuf-java:3.21.9"
133+
testCompileOnly libs.protobuf.java
134134
testImplementation "androidx.test:core:$androidxTestCoreVersion"
135135
testImplementation "com.google.truth:truth:$googleTruthVersion"
136136
testImplementation "org.robolectric:robolectric:$robolectricVersion"

firebase-perf/ktx/ktx.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ dependencies {
5959
testImplementation 'org.mockito:mockito-core:2.25.0'
6060
testImplementation "org.robolectric:robolectric:$robolectricVersion"
6161

62-
testCompileOnly "com.google.protobuf:protobuf-java:3.21.9"
62+
testCompileOnly libs.protobuf.java
6363
}

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ coroutines = "1.7.3"
99
dagger = "2.43.2"
1010
grpc = "1.62.2"
1111
grpcKotlin = "1.4.1"
12-
javalite = "3.21.11"
12+
javalite = "3.25.5"
1313
kotlin = "1.8.22"
1414
mockk = "1.13.11"
1515
serialization-plugin = "1.8.22"
16-
protoc = "3.21.11"
16+
protoc = "3.25.5"
1717
truth = "1.4.2"
1818
robolectric = "4.12"
19-
protobufjavautil = "3.21.11"
19+
protobufjavautil = "3.25.5"
2020
kotest = "5.9.0" # Do not use 5.9.1 because it reverts the fix for https://github.com/kotest/kotest/issues/3981
2121
quickcheck = "0.6"
2222
serialization = "1.5.1"

protolite-well-known-types/protolite-well-known-types.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ firebaseLibrary {
2626

2727
protobuf {
2828
protoc {
29-
artifact = "com.google.protobuf:protoc:$protocVersion"
29+
artifact = "com.google.protobuf:protoc:3.21.11"
3030
}
3131
generateProtoTasks {
3232
all().each { task ->
@@ -68,5 +68,5 @@ dependencies {
6868
exclude group: "com.google.protobuf", module: "protobuf-java"
6969
}
7070

71-
implementation "com.google.protobuf:protobuf-javalite:$javaliteVersion"
71+
implementation "com.google.protobuf:protobuf-javalite:3.21.11"
7272
}

transport/transport-backend-cct/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Unreleased
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
24

35

46
# 3.3.0

transport/transport-backend-cct/transport-backend-cct.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protobuf {
2929
// Configure the protoc executable
3030
protoc {
3131
// Download from repositories
32-
artifact = "com.google.protobuf:protoc:$protocVersion"
32+
artifact = libs.protoc.get().toString()
3333
}
3434
generateProtoTasks {
3535
all().each { task ->
@@ -71,7 +71,7 @@ dependencies {
7171

7272
testImplementation "androidx.test:core:$androidxTestCoreVersion"
7373
testImplementation 'com.github.tomakehurst:wiremock:3.0.1'
74-
testImplementation "com.google.protobuf:protobuf-java-util:$protobufJavaUtilVersion"
74+
testImplementation libs.protobuf.java.util
7575
testImplementation "com.google.truth:truth:$googleTruthVersion"
7676
testImplementation 'com.google.truth.extensions:truth-proto-extension:1.0'
7777
testImplementation 'junit:junit:4.13.1'

transport/transport-runtime/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Unreleased
2+
* [changed] Updated protobuf dependency to `3.25.5` to fix
3+
[CVE-2024-7254](https://github.com/advisories/GHSA-735f-pc8j-v9w8).
24

35

46
# 3.3.0

transport/transport-runtime/transport-runtime.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies {
2626

2727
protobuf {
2828
protoc {
29-
artifact = "com.google.protobuf:protoc:$protocVersion"
29+
artifact = libs.protoc.get().toString()
3030
}
3131
plugins {
3232
firebaseEncoders {

0 commit comments

Comments
 (0)