Skip to content

Commit 9a936da

Browse files
renovate[bot]Convex, Inc.
authored andcommitted
Update Rust crate tonic to v0.12.3 [SECURITY] (#30272)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [tonic](https://redirect.github.com/hyperium/tonic) | dependencies | minor | `0.11` -> `0.12` | | [tonic](https://redirect.github.com/hyperium/tonic) | workspace.dependencies | patch | `0.12.1` -> `0.12.3` | ### GitHub Vulnerability Alerts #### [CVE-2024-47609](https://redirect.github.com/hyperium/tonic/security/advisories/GHSA-4jwc-w2hc-78qv) ### Impact **note:** this only affects v0.12.0 - v0.12.2 When using `tonic::transport::Server` there is a remote DoS attack that can cause the server to exit cleanly on accepting a tcp/tls stream. This can be triggered via causing the accept call to error out with errors there were not covered correctly causing the accept loop to exit. More information can be found [here](https://redirect.github.com/hyperium/tonic/issues/1897) ### Patches Upgrading to tonic `0.12.3` and above contains the fix. ### Workarounds A custom accept loop is a possible workaround. --- ### Release Notes <details> <summary>hyperium/tonic (tonic)</summary> ### [`v0.12.3`](https://redirect.github.com/hyperium/tonic/blob/HEAD/CHANGELOG.md#0123-2024-08-29) [Compare Source](https://redirect.github.com/hyperium/tonic/compare/v0.12.2...v0.12.3) ##### Features - **server:** Added support for grpc max_connection_age ([#&#8203;1865](https://redirect.github.com/hyperium/tonic/issues/1865)) - **build:** Add `#[deprecated]` to deprecated client methods ([#&#8203;1879](https://redirect.github.com/hyperium/tonic/issues/1879)) - **build:** plumb skip_debug through prost Builder and add test ([#&#8203;1900](https://redirect.github.com/hyperium/tonic/issues/1900)) ##### Bug Fixes - **build:** Revert "fix tonic-build cargo build script outputs ([#&#8203;1821](https://redirect.github.com/hyperium/tonic/issues/1821))" which accidentally increases MSRV ([#&#8203;1898](https://redirect.github.com/hyperium/tonic/issues/1898)) - **server:** ignore more error kinds in incoming socket stream ([#&#8203;1885](https://redirect.github.com/hyperium/tonic/issues/1885)) - **transport**: do not shutdown server on broken connections ([#&#8203;1948](https://redirect.github.com/hyperium/tonic/issues/1948)) ### [`v0.12.2`](https://redirect.github.com/hyperium/tonic/blob/HEAD/CHANGELOG.md#0122-2024-08-23) [Compare Source](https://redirect.github.com/hyperium/tonic/compare/v0.12.1...v0.12.2) ##### Features - Move TimeoutExpired out of transport ([#&#8203;1826](https://redirect.github.com/hyperium/tonic/issues/1826)) - Move ConnectError type from transport ([#&#8203;1828](https://redirect.github.com/hyperium/tonic/issues/1828)) - **channel:** allow setting max_header_list_size ([#&#8203;1835](https://redirect.github.com/hyperium/tonic/issues/1835)) - **router:** Add RoutesBuilder constructor ([#&#8203;1855](https://redirect.github.com/hyperium/tonic/issues/1855)) - **tls:** Rename tls-roots feature with tls-native-roots ([#&#8203;1860](https://redirect.github.com/hyperium/tonic/issues/1860)) - **router:** Rename Routes::into_router with into_axum_router ([#&#8203;1862](https://redirect.github.com/hyperium/tonic/issues/1862)) - **router:** Implement from axum::Router for Routes ([#&#8203;1863](https://redirect.github.com/hyperium/tonic/issues/1863)) - **channel:** Re-enable TLS based on Cargo features in generated clients ([#&#8203;1866](https://redirect.github.com/hyperium/tonic/issues/1866)) - **server:** allow setting max_header_list_size ([#&#8203;1870](https://redirect.github.com/hyperium/tonic/issues/1870)) - **build:** Expose formatted service name ([#&#8203;1684](https://redirect.github.com/hyperium/tonic/issues/1684)) - **reflection:** add back support for v1alpha reflection protocol ([#&#8203;1888](https://redirect.github.com/hyperium/tonic/issues/1888)) ##### Bug Fixes - **router:** Add missing unimplemented fallback to RoutesBuilder ([#&#8203;1864](https://redirect.github.com/hyperium/tonic/issues/1864)) - **server:** Prevent server from exiting on ECONNABORTED ([#&#8203;1874](https://redirect.github.com/hyperium/tonic/issues/1874)) - **web:** fix panic in trailer parsing on multiple trailers ([#&#8203;1880](https://redirect.github.com/hyperium/tonic/issues/1880)) - **web:** fix empty trailer parsing causing infinite parser loop ([#&#8203;1883](https://redirect.github.com/hyperium/tonic/issues/1883)) ### [`v0.12.1`](https://redirect.github.com/hyperium/tonic/blob/HEAD/CHANGELOG.md#0121-2024-07-17) [Compare Source](https://redirect.github.com/hyperium/tonic/compare/v0.12.0...v0.12.1) ##### Bug Fixes - Reduce tokio-stream feature ([#&#8203;1795](https://redirect.github.com/hyperium/tonic/issues/1795)) ### [`v0.12.0`](https://redirect.github.com/hyperium/tonic/blob/HEAD/CHANGELOG.md#0120-2024-07-08) [Compare Source](https://redirect.github.com/hyperium/tonic/compare/v0.11.0...v0.12.0) This breaking release updates tonic to the hyper `1.0` ecosystem and also updates to prost `v0.13.0`. ##### Features - **build:** Custom codecs for generated code ([#&#8203;1599](https://redirect.github.com/hyperium/tonic/issues/1599)) ([18a2b30](https://redirect.github.com/hyperium/tonic/commit/18a2b30922460be02829706cf9dd0cd1ec6a19c1)) - **channel:** Make channel feature additive ([#&#8203;1574](https://redirect.github.com/hyperium/tonic/issues/1574)) ([b947e1a](https://redirect.github.com/hyperium/tonic/commit/b947e1ac0727ceb0a0267a30854ada4ba18931db)) - **codec:** Make error when not utf8 value in compression encoding ([#&#8203;1768](https://redirect.github.com/hyperium/tonic/issues/1768)) ([f8e1f87](https://redirect.github.com/hyperium/tonic/commit/f8e1f87eb862676147fd6215b58c9090d259104d)) - Implement http_body::Body::size_hint for custom body ([#&#8203;1713](https://redirect.github.com/hyperium/tonic/issues/1713)) ([9728c01](https://redirect.github.com/hyperium/tonic/commit/9728c01132bd64dca046675198edc751c4547966)) - Make boxed function public ([#&#8203;1754](https://redirect.github.com/hyperium/tonic/issues/1754)) ([2cc868f](https://redirect.github.com/hyperium/tonic/commit/2cc868f80b20379d6635ac182f523b4971d016b7)) - Relax GrpcMethod lifetime ([#&#8203;1598](https://redirect.github.com/hyperium/tonic/issues/1598)) ([68bf17d](https://redirect.github.com/hyperium/tonic/commit/68bf17d67ad71af44c34d565566c3dd58ea3ab87)) - **tls:** Add ability to add multiple ca certificates ([#&#8203;1724](https://redirect.github.com/hyperium/tonic/issues/1724)) ([3457f92](https://redirect.github.com/hyperium/tonic/commit/3457f9203226f88524b31bf5d64ce6e5ec7c993c)) - **tls:** Use rustls_pki_types::CertificateDer to describe DER encoded certificate ([#&#8203;1707](https://redirect.github.com/hyperium/tonic/issues/1707)) ([96a8cbc](https://redirect.github.com/hyperium/tonic/commit/96a8cbc04d0cad6d30d2944dba6b32aac8975f91)) - **tls:** Remove tls roots implicit configuration ([#&#8203;1731](https://redirect.github.com/hyperium/tonic/issues/1731)) ([de73617](https://redirect.github.com/hyperium/tonic/commit/de736171f20ec5d485c26ee5eda4a9ccf5fc75e5)) - **transport:** Make service router independent from transport ([#&#8203;1572](https://redirect.github.com/hyperium/tonic/issues/1572)) ([da48235](https://redirect.github.com/hyperium/tonic/commit/da482359933f52e84c0263b28a5a83ab1efe6c33)) - **transport:** Make transport server and channel independent ([#&#8203;1630](https://redirect.github.com/hyperium/tonic/issues/1630)) ([654289f](https://redirect.github.com/hyperium/tonic/commit/654289fdc24f56d6845ec0ceb233deb46b640fac)) - **transport:** Rename reexported axum body ([#&#8203;1752](https://redirect.github.com/hyperium/tonic/issues/1752)) ([5d7bfc2](https://redirect.github.com/hyperium/tonic/commit/5d7bfc22c590982463f2d93464b0a7fb90e17083)) - Use http::Extensions directly ([#&#8203;1710](https://redirect.github.com/hyperium/tonic/issues/1710)) ([ed95d27](https://redirect.github.com/hyperium/tonic/commit/ed95d2762146f001970b74941f3bad77b7560426)) ##### Bug Fixes - **tonic:** flush accumulated ready messages when status received ([#&#8203;1756](https://redirect.github.com/hyperium/tonic/issues/1756)) ([d312dcc](https://redirect.github.com/hyperium/tonic/commit/d312dcc0ec362cb12f6e54072622761d7466a650)), closes [#&#8203;1423](https://redirect.github.com/hyperium/tonic/issues/1423) ##### BREAKING CHANGES - `tonic` and crates updated to hyper 1.0 ([#&#8203;1670](https://redirect.github.com/hyperium/tonic/issues/1670)) - `tonic` and crates updated to prost 0.13 ([#&#8203;1779](https://redirect.github.com/hyperium/tonic/issues/1779)) - `tonic_reflection::server` is updated to use the generated `tonic_reflection::pb::v1` code. - Make compression encoding configuration more malleable ([#&#8203;1757](https://redirect.github.com/hyperium/tonic/issues/1757)) - Removed implicit configuration of client TLS roots setup ([#&#8203;1731](https://redirect.github.com/hyperium/tonic/issues/1731)) [v1.8.8]: https://redirect.github.com/fullstorydev/grpcurl/releases/tag/v1.8.8 [proto]: https://redirect.github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1/reflection.proto [grpcurl]: https://redirect.github.com/fullstorydev/grpcurl </details> --- ### Configuration 📅 **Schedule**: Branch creation - "" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/get-convex/convex). GitOrigin-RevId: 6afe9dbab05f64afcf70356203949080bd58053c
1 parent 8aa594d commit 9a936da

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

Cargo.lock

Lines changed: 9 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ tokio-metrics-collector = { version = "0.2.1" }
134134
tokio-process-stream = { version = "0.4.0" }
135135
tokio-stream = { version = "0.1", features = [ "io-util", "sync", "signal" ] }
136136
tokio-tungstenite = { version = "0.21.0", features = [ "native-tls-vendored" ] }
137-
tonic = { version = "0.12.1", features = [ "gzip" ] }
138-
tonic-build = "0.12.1"
139-
tonic-health = "0.12.1"
137+
tonic = { version = "0.12.3", features = [ "gzip" ] }
138+
tonic-build = "0.12.3"
139+
tonic-health = "0.12.3"
140140
tower = { version = "0.4", features = [ "limit", "timeout" ] }
141141
tower-cookies = "0.10"
142142
tower-http = { version = "0.5", features = [ "trace", "cors", "decompression-br" ] }

crates/fivetran_common/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fn main() -> Result<()> {
6565
}
6666
tonic_build::configure()
6767
.btree_map(["."])
68-
.compile(&proto_files, &[protos_dir])?;
68+
.compile_protos(&proto_files, &[protos_dir])?;
6969

7070
Ok(())
7171
}

crates/pb_build/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn pb_build(features: Vec<&'static str>, mut extra_includes: Vec<&'static st
8181
for (proto_path, rust_path) in external_paths {
8282
builder = builder.extern_path(proto_path, rust_path);
8383
}
84-
builder.compile(&paths, &includes)?;
84+
builder.compile_protos(&paths, &includes)?;
8585

8686
// We sort the package names just so we're generating the lib.rs
8787
// deterministically to avoid NOOP commits.

0 commit comments

Comments
 (0)