Replace tiberius with mssql (maintained fork with security fixes) - #81
Open
joelparkerhenderson wants to merge 1 commit into
Open
Replace tiberius with mssql (maintained fork with security fixes)#81joelparkerhenderson wants to merge 1 commit into
joelparkerhenderson wants to merge 1 commit into
Conversation
tiberius currently has three unpatched RUSTSEC advisories (RUSTSEC-2026-0098, -0099, -0104) in its rustls-webpki dependency, a fix PR (tiberius-rs/tiberius#419) open since 2026-05-12 with no maintainer response, 11 reachable panic sites from untrusted server input (tiberius-rs/tiberius#424, #425), and a maintainer handover request (tiberius-rs/tiberius#427) unanswered for 11+ days. Renames the src_tiberius feature and tiberius module to src_mssql / mssql, and swaps the dependency to mssql (https://crates.io/crates/mssql, https://github.com/mssql-rust/mssql-rust), a fork that keeps the same Client/ColumnData/ToSql/etc. API tiberius had. Mechanical rename across: connector_arrow/Cargo.toml - dependency + feature rename connector_arrow/src/lib.rs - module declaration connector_arrow/src/errors.rs - error conversion variant connector_arrow/src/tiberius/* - renamed to src/mssql/*, types renamed connector_arrow/tests/it/* - renamed to match, TIBERIUS_URL -> MSSQL_URL Justfile, README.md - env var and support-matrix updates Two comments explicitly note behavior inherited from tiberius (a decimal precision restriction, and a lifetime-transmute workaround) rather than silently relabeling them, since I haven't independently verified whether the mssql fork has fixed either. Verified against the published mssql 1.0.1 crate: cargo check --features all cargo check --features all --tests Both pass. This is a breaking change: src_tiberius is renamed to src_mssql, and the connector_arrow::tiberius module/types are now connector_arrow::mssql. The crate is pre-1.0 (0.12.1), so this can ship as a minor version bump. An equally-maintained alternative fork, tiberius-ng (https://github.com/MattJackson/tiberius-ng), also fixes these issues and keeps the tiberius name/API if you'd prefer that direction instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HmakCYmBF3qUgiW7ctoFJm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
This project depends on the Rust crate
tiberiuswhich has security problems and maintenance problems. Specifics below.Solution
There are two recent forks of the crate that provide the security updates and PRs.
mssql(mssql-rust/mssql-rust) — maintained by Joel Henderson (me)tiberius-ng(MattJackson/tiberius-ng) — maintained by Matt JacksonEither fork is fine IMHO. You'll want to test them because they're both quite new. I prefer the name
mssqlbecause I work with Microsoft extensively and I'm working with their security teams; Matt preferstiberius-ngbecause it's more similar to the original — happy to redo this PR against that fork if you'd rather go that direction.I'm opening this here (rather than only in a downstream consumer) because
PRQL/prqldepends onconnector_arrow::tiberius::TiberiusConnection<S>, which hardcodesclient: tiberius::Client<S>— a concrete type, not a generic. That means a downstream project can't switch offtiberiuson its own; the change has to land here first. I've filed PRQL/prql with that context and a link back to this PR.Code change
This renames
src_tiberius/tiberiustosrc_mssql/mssqlthroughout —mssql's API(
Client,ColumnData,ToSql,QueryStream,BulkLoadRequest,TokenRow,numeric::Numeric,error::Error, etc.) matchestiberius's, so this is a mechanical port, not a rewrite:connector_arrow/Cargo.toml— dependency + feature renameconnector_arrow/src/lib.rs— module declarationconnector_arrow/src/errors.rs— error conversion variantconnector_arrow/src/tiberius/*→connector_arrow/src/mssql/*(all 5 files, types renamedTiberius*→Mssql*)connector_arrow/tests/it/*— renamed to match,TIBERIUS_URL→MSSQL_URLJustfile,README.md— env var and support-matrix updatesTwo comments are left explicitly noting behavior inherited from tiberius (a decimal-precision
restriction in
mod.rs, and a lifetime-transmute workaround inappend.rs) rather than silentlyrelabeling them, since I haven't independently verified whether the
mssqlfork has fixed eitherone yet.
This is a breaking change:
src_tiberiusbecomessrc_mssql, andconnector_arrow::tiberiusbecomes
connector_arrow::mssql. The crate is pre-1.0 (0.12.1), so this can ship as a minorversion bump under Cargo's semver rules.
Verified against the published
mssql1.0.1 crate:Both pass.
Security specifics
Err. Tracked by the RustSec working group at advisory-db#3148.Drafted with Claude Code; I reviewed and take responsibility for the change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HmakCYmBF3qUgiW7ctoFJm