Skip to content

Commit 5123cfa

Browse files
committed
[deps](mongodb) Upgrade native connector security dependencies
### Background The native MongoDB connector prepares C client libraries for BE and a Java dependency bundle for FE. Compression providers are included in the FE archive. ### What problem does this PR solve? Issue Number: None Related PR: #70249 PR Type: Release/Dependency Problem Summary: The new dependency bundle pins MongoDB C Driver 2.5.7 and inherits snappy-java 1.1.10.5, which contain known upstream security defects. Upgrade the C driver and libbson together to 2.5.8, and pin snappy-java 1.1.10.10 within the MongoDB module. ### Details - **Versions:** MongoDB C Driver/libbson 2.5.7 to 2.5.8; MongoDB module snappy-java 1.1.10.5 to 1.1.10.10. - **Upstream changes:** Include cursor-response, compressed-reply, GridFS, allocation, buffer-boundary and stream-handling fixes. - **Compatibility:** Preserve the existing native build options and module isolation; update the archive checksum and distribution version metadata together. - **Rollback:** Revert these dependency pins and distribution metadata. ### Testing - Build and install the native libraries with the third-party build script; link the BE CMake targets and run BSON/ObjectId, client lifecycle and snapshot-options smoke checks. Both native libraries report 2.5.8. - Package the MongoDB FE module with Checkstyle and the connector import gate; inspect the six runtime jars and archive staging, and run BSON/read-options and Snappy/Zstd JNI round trips. - Reproduce oversized allocation with snappy-java 1.1.10.5 and verify rejection using the packaged 1.1.10.10 jar, with a 64 MiB JVM heap. - Verify the official C archive digest, configured checksum, upstream notices, managed-prefix rejection, shell syntax and diff whitespace. - Full FE build and cross-platform coverage remain for CI. ### Release note None ### Check List (For Author) - Behavior changed: No query behavior change; update prepared dependency versions. - Does this need documentation: No. - Pre-submission status: Partially verified: scoped dependency builds and smoke checks pass; full Doris build and other platforms remain for CI. ### AI Disclosure - Tool: OpenAI Codex. - Generated: Dependency updates and this message. - Human review: Pending maintainer review; agent self-review completed.
1 parent 39bc832 commit 5123cfa

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎dist/LICENSE-dist.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ Other dependencies:
15161516
* darts-clone (double-array trie, compiled into the kuromoji dictionary) -- licenses/LICENSE-darts-clone.txt
15171517
* mecab-ipadic (IPADIC) 2.7.0-20250920 (Japanese dictionary data shipped under be/dict/kuromoji) -- licenses/LICENSE-ipadic.txt
15181518

1519-
* MongoDB C Driver (libmongoc/libbson): 2.5.7 -- Apache License 2.0; bundled notices in licenses/LICENSE-mongo-c-driver.txt
1519+
* MongoDB C Driver (libmongoc/libbson): 2.5.8 -- Apache License 2.0; bundled notices in licenses/LICENSE-mongo-c-driver.txt
15201520
* MongoDB Java Sync Driver (sync/core/bson/bson-record-codec): 5.14.0 -- Apache License 2.0
1521-
* snappy-java (MongoDB bundle): 1.1.10.5 -- Apache License 2.0
1521+
* snappy-java (MongoDB bundle): 1.1.10.10 -- Apache License 2.0
15221522
* zstd-jni (MongoDB bundle): 1.5.7-25 -- licenses/LICENSE-zstd-jni.txt

‎fe/fe-connector/fe-connector-mongodb/pom.xml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ under the License.
3333
<description>Client dependency bundle for the native MongoDB connector.</description>
3434
<properties>
3535
<mongodb.driver.version>5.14.0</mongodb.driver.version>
36+
<!-- Override the older FE-wide pin to reject oversized Snappy allocations and fix stream handling. -->
37+
<mongodb.snappy-java.version>1.1.10.10</mongodb.snappy-java.version>
3638
<mongodb.zstd-jni.version>1.5.7-25</mongodb.zstd-jni.version>
3739
</properties>
3840
<dependencyManagement>
@@ -56,6 +58,7 @@ under the License.
5658
<dependency>
5759
<groupId>org.xerial.snappy</groupId>
5860
<artifactId>snappy-java</artifactId>
61+
<version>${mongodb.snappy-java.version}</version>
5962
<scope>runtime</scope>
6063
</dependency>
6164
<dependency>

‎thirdparty/vars.sh‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,11 @@ LIBRDKAFKA_SOURCE=librdkafka-2.16.0
229229
LIBRDKAFKA_MD5SUM="6d2c62921241863d2bc95c58be27af6f"
230230

231231
# MongoDB C Driver (libmongoc and libbson are released and built together).
232-
MONGO_C_DRIVER_DOWNLOAD="https://github.com/mongodb/mongo-c-driver/releases/download/2.5.7/mongo-c-driver-2.5.7.tar.gz"
233-
MONGO_C_DRIVER_NAME=mongo-c-driver-2.5.7.tar.gz
234-
MONGO_C_DRIVER_SOURCE=mongo-c-driver-2.5.7
235-
MONGO_C_DRIVER_MD5SUM="8035df5f01e2e8cf7d55e46008207df3"
232+
# 2.5.8 fixes malformed cursor namespaces and compressed-reply buffer leaks.
233+
MONGO_C_DRIVER_DOWNLOAD="https://github.com/mongodb/mongo-c-driver/releases/download/2.5.8/mongo-c-driver-2.5.8.tar.gz"
234+
MONGO_C_DRIVER_NAME=mongo-c-driver-2.5.8.tar.gz
235+
MONGO_C_DRIVER_SOURCE=mongo-c-driver-2.5.8
236+
MONGO_C_DRIVER_MD5SUM="e088246c56b3de5c658aff8e00f166ed"
236237

237238
# zstd
238239
ZSTD_DOWNLOAD="https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"

0 commit comments

Comments
 (0)