Skip to content

build(deps): move RustSec-flagged dependencies to patched releases - #2046

Merged
bplatz merged 8 commits into
mainfrom
chore/security-dependency-updates
Oct 14, 2026
Merged

bplatz merged 8 commits into
mainfrom
chore/security-dependency-updates

Conversation

@bplatz

@bplatz bplatz commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Moves dependencies flagged by cargo audit on main to patched releases. Some flagged crates can't move in this PR; they're listed under "Still flagged" with the reason for each.

Lockfile-only, semver-compatible

Crate From → to Advisories
aws-lc-sys 0.37.1 → 0.45.0 RUSTSEC-2026-0044 – 0048 (X.509 name constraints, PKCS7 verify bypasses, CRL scope, AES-CCM tag timing)
rustls 0.23.36 → 0.23.45 RUSTSEC-2026-0285
rustls-webpki 0.103.9 → 0.103.15 RUSTSEC-2026-0049, 0098, 0099, 0104 on the 0.103 line. The 0.101 copy stays; see below.
h2 0.4.13 → 0.4.20 RUSTSEC-2026-0258 on the 0.4 line
crossbeam-epoch 0.9.18 → 0.9.21 RUSTSEC-2026-0204
quinn-proto 0.11.13 → 0.11.19 RUSTSEC-2026-0037, 0185, 0338 – 0343
rust_decimal 1.42 → 1.43 drops rkyv 0.7 (RUSTSEC-2026-0235)

quinn-proto and rkyv are in the lockfile but not compiled into any build: reqwest's http3 and rust_decimal's rkyv features are off. They're bumped so the audit no longer reports them.

anyhow, cxx, event-listener, memmap2 and rand 0.8/0.9 move past their unsoundness advisories. spin and validit move off yanked releases.

Manifest bumps

  • imbl 3 → 7. imbl-sized-chunks 0.1.3 has a double free / use-after-free in Chunk removal (RUSTSEC-2026-0292). imbl 4, 5 and 6 still depend on it; 7 is the first release on 0.2. This also drops bitmaps (unmaintained, unsound). The only user is NoveltyFactState's OrdMap (get / insert / clone), which compiles unchanged. imbl 6 rewrote OrdMap as a B+tree; ordering and structural sharing are the same.
  • lru 0.12 → 0.18 (RUSTSEC-2026-0002, 0253). The API breaks in between don't touch our call sites (promote/demote now return bool, MSRV, hashbrown). Reasoner and query each declared their own lru = "0.12"; they now take the workspace version. aws-sdk-s3 still brings its own lru 0.16; see below.
  • testcontainers 0.23 → 0.28 (dev-only / aws-testcontainers). Drops tokio-tar, which has no fixed release (RUSTSEC-2025-0111).

The excluded packages get the same patch bumps: fluree-sql-bridge, scripts/local/load, testsuite-sparql, testsuite-shacl and wasm-probe. The three that path-depend on workspace crates also pick up imbl 7 and lru 0.18. wasm-probe's lockfile was still on the 4.1.6 crate versions and is resynced.

Still flagged

After this PR, cargo audit on the root lockfile still reports eight vulnerability rows and one unsoundness warning. None of them can be cleared by a lockfile update, and all were already reported on main.

The excluded packages have two more:

bplatz added 4 commits October 9, 2026 08:36
Lockfile-only, semver-compatible updates:

- aws-lc-sys 0.45 (RUSTSEC-2026-0044..0048)
- rustls 0.23.45 (RUSTSEC-2026-0285)
- rustls-webpki 0.103.15 (RUSTSEC-2026-0049, 0098, 0099, 0104)
- h2 0.4.20 (RUSTSEC-2026-0258)
- crossbeam-epoch 0.9.21 (RUSTSEC-2026-0204)
- quinn-proto 0.11.19 (RUSTSEC-2026-0037, 0185)
- rust_decimal 1.43, which drops rkyv 0.7 (RUSTSEC-2026-0235)

Also clears the unsoundness advisories on anyhow, cxx, event-listener,
memmap2 and rand, and moves spin, validit and num-bigint off yanked
releases. Applied to the root lockfile and to each excluded package's.
imbl-sized-chunks 0.1.3 has a double free / use-after-free in Chunk
removal (RUSTSEC-2026-0292). imbl 4 through 6 still depend on it; 7 is
the first release on the fixed 0.2. It also drops `bitmaps`, which is
unmaintained and unsound (RUSTSEC-2026-0247, RUSTSEC-2025-0167).

The only user is NoveltyFactState's OrdMap (get / insert / clone),
which compiles unchanged.
lru 0.12.5 is flagged for an IterMut Stacked Borrows violation
(RUSTSEC-2026-0002) and a use-after-free when a drop panics inside
pop (RUSTSEC-2026-0253). None of the API changes since 0.12 touch our
call sites. Reasoner and query each pinned their own `lru = "0.12"`;
they now take the workspace version.
testcontainers 0.23 depends on tokio-tar 0.3, which mis-parses PAX
headers and has no fixed release (RUSTSEC-2025-0111); 0.28 uses
astral-tokio-tar. Dev-only and the `aws-testcontainers` feature; the
LocalStack suites compile unchanged.
@bplatz bplatz added the bug Something isn't working as expected label Oct 9, 2026
@bplatz
bplatz requested a review from a team October 9, 2026 12:37
@aaj3f aaj3f mentioned this pull request Oct 13, 2026

@aaj3f aaj3f left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bplatz this is the shape I'd want for a dependency sweep, and at a design level no pushback from me. Patch bumps go in the lockfiles, the three majors only where the fix actually lives, and query/reasoner move onto the workspace lru so they can't drift off again. Two headline notes:

(1) After this merges, cargo audit still isn't clean. Eight vulnerability rows remain: rustls-webpki 0.101.7 ×3, quick-xml 0.36.2 / 0.39.4 ×2 each, and h2 0.3.27. All of them are older than this PR, and none has a lockfile fix. The webpki and h2 ones are the HTTP/1.1-pinned Iceberg S3 client, and since smithy's hyper-1 client has no HTTP/1-only knob, leaving that line is really a decision about the GCS workaround. That's yours, not this PR's. I'd just like the body to name all four, so the next audit run doesn't read as a regression.

(2) I think this should go in before v4.2.4 (#2041), but aws-lc-sys 0.45 has never been compiled for aarch64 Linux or inside the manylinux_2_28 wheel container. A workflow_dispatch of python-release.yml on this branch builds all four release wheels on the release runners and publishes nothing, so we don't have to find out on the tag. Good to merge whenever after that.

Full review below:


✅ Approve with nits.

Thanks @bplatz. This is a tidy sweep, and the table in the body made each row easy to check. I don't have cargo-audit installed, so I matched all six lockfiles, at main and at this head, against a fresh clone of the RustSec advisory DB with a small script over each advisory's patched/unaffected ranges. Every advisory the table names is cleared at the version it names. quinn-proto 0.11.19 also clears four the body doesn't list (2026-0338, 0339, 0340, 0342). Nothing below has to land before merge: one item is about the record, and the rest are cheap checks.

Should address:

  • 🟠 Name what's still flagged (Cargo.lock:7678, inline). Eight vulnerability rows remain in the root lockfile:

    • rustls-webpki 0.101.7: 2026-0098, 0099 and 0104, the same IDs the table lists as cleared, which holds for 0.103 only;
    • h2 0.3.27;
    • quick-xml 0.36.2 via fluree-doc-parse;
    • quick-xml 0.39.4 via object_store 0.13.

    None has a lockfile fix. A "not addressed, and why" paragraph in the body would cover it. The fluree-doc-parse bump is small enough that I'd fold it in if you agree.

Optional:

  • 🟡 aws-lc-sys 0.45 hasn't been built for aarch64 Linux or in manylinux_2_28, and a branch dispatch of python-release.yml would cover both without publishing (Cargo.lock:748, inline).
  • 🟡 imbl 7 under NoveltyFactState's per-flake get/insert hasn't been measured, and the on-demand bench compare doesn't include transact_commit / novelty_replay (Cargo.toml:77, inline).
  • 🟡 wasm-probe/Cargo.lock is one xxhash-rust edge short of --locked, the same edge 614801118 added to testsuite-shacl (wasm-probe/Cargo.lock:1098, inline).

What I checked and found clean:

  • The diff is lockfiles plus five manifest lines, with no .rs changes. cargo metadata --locked passes in the root, fluree-sql-bridge, scripts/local/load and both testsuites, both at this head and on a trial merge with #2041's head (which merges cleanly).
  • rust_decimal: db doesn't use it directly. Its only path in is byte-unit under openraft's config parsing (feature std only), and db's own decimals are bigdecimal (fluree-db-core/src/value.rs:149). So dropping rkyv 0.7 has no persisted-format or reindex implications, and rkyv no longer resolves at all.
  • aws-lc-sys 0.37 → 0.45: the source-build builder selection, the cc builder's dependency check, the NASM rule and the pregenerated-bindings target list are unchanged. So I don't see a new cmake/nasm/clang requirement for the four release targets. 0.45 does add auto-detection of a system AWS-LC, but it only adopts an install that defines OPENSSL_IS_AWSLC and ships bindings, and none of our workflows set the variables it reads.
  • CI on this head:
    • compiled aws-lc-sys 0.45 on Windows x86_64 MSVC, macOS aarch64 and Linux x86_64 (the three python jobs, test, clippy);
    • compiled imbl 7 (with its new wide SIMD dependency) and lru 0.18 for wasm32, and wasm-smoke ran the probe;
    • ran all fifteen LocalStack tests by name on testcontainers 0.28.

Adherence to repo commitments:

  • Patterns/abstractions: ✔ Majors are only where the advisory forces them, and the two private lru = "0.12" pins now take the workspace version.
  • Performance (speed first, memory second): ⚠️ No code changes. imbl 7 changes the persistent map under a per-flake path in fluree-db-novelty. Upstream reports it faster, but it isn't measured here (🟡 above).
  • Deployment targets: ⚠️ Reaches every host. CI covers Linux x86_64, macOS aarch64, Windows x86_64 and wasm32. aarch64 Linux, manylinux_2_28 and the fat-LTO release profile aren't built on a PR (🟡 above).
  • Testing: ✔ Full nextest on this head (14,169 passed), the LocalStack suites by name, the Python wheels on three OSes, and wasm-smoke.
  • Conventions: ⚠️ Commits are well split and each body names its advisories. The PR body should list what's still flagged (🟠 above).

Verified locally at 614801118: advisory matching of all six lockfiles against rustsec/advisory-db at base and head; cargo metadata --locked in all six workspaces, at the head and on a trial merge with #2041; cargo tree -i for each remaining advisory crate; the aws-lc-sys 0.37.1 vs 0.45.0 build scripts, read side by side; and the CI job logs, grepped for which jobs compiled what. I didn't run benches.

Approving so you can merge when ready. I'd just get the remainder into the body, and kick off the wheel build first if this is going into 4.2.4.

Comment thread Cargo.lock
[[package]]
name = "rustls-webpki"
version = "0.103.9"
version = "0.103.15"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Should address: cargo audit still reports eight vulnerability rows after this PR, and the table's rustls-webpki row reads as if all four of its advisories are gone.

There are two rustls-webpkis in this lockfile. 0.103.9 → 0.103.15 clears 2026-0049, 0098, 0099 and 0104, but 0.101.7 (line 7668) stays. 0098, 0099 and 0104 all apply to it, and there's no 0.101 fix (patched is >= 0.103.12 only). It's the rustls 0.21 / hyper 0.14 stack under http1_only_http_client() (fluree-db-iceberg/src/io/storage.rs:164-171), so it's in the default CLI, server and Python builds, on every Iceberg S3 read. The same client brings h2 0.3.27 (2026-0258). That one is compiled but never negotiated, since the connector advertises no ALPN.

Then there's quick-xml. 0.36.2 comes in via fluree-doc-parse's docx/pptx readers (2026-0194, 0195). 0194 is reachable through e.attributes() in fluree-doc-parse's crates/fluree-doc-docx/src/lib.rs:198 on a crafted document, which in db means the CLI's fluree doc. 0.39.4 comes in via object_store 0.13.2, and it's fixed only in object_store 0.14, which parquet 58 / delta_kernel 0.28 don't take yet. Every one of these advisories was published between April and August, so all of them were in main's audit when this was opened.

The failing scenario is just the record: someone runs cargo audit after this merges, or a scanner runs it against 4.2.4, and finds eight vulnerabilities after a PR titled "move RustSec-flagged dependencies to patched releases".

I'd add a short "not addressed, and why" section to the body:

  • webpki 0.101 / h2 0.3: smithy's hyper-1 client hard-codes enable_http1().enable_http2() and keeps its connector wrapper pub(crate) (aws-smithy-http-client 1.4.0). That's the reason Cargo.toml:130-131 gives for staying on hyper 0.14. Leaving it needs an upstream knob or our own HttpClient over hyper 1, and that's a call on the GCS workaround that's yours to make.
  • quick-xml 0.36: a bump in fluree-doc-parse (its main still says "0.36"), then a repin of Cargo.toml:200-205.
  • quick-xml 0.39: waits on object_store 0.14.

The fluree-doc-parse bump is small enough that if you agree, I'd rather it go in with this sweep than be the next one's.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. The body now has a "Still flagged" section covering all eight rows, each with a follow-up issue:

The audit also turned up three rows that weren't in the review, now in the body:

The quinn-proto row now lists 0338 – 0343. Today's advisory DB has 0341 and 0343 too, both fixed by 0.11.18.

Comment thread Cargo.lock
[[package]]
name = "aws-lc-sys"
version = "0.37.1"
version = "0.45.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Optional: aws-lc-sys 0.45 hasn't been built yet for two of the release configurations: aarch64-unknown-linux-gnu, and the manylinux_2_28 container the Linux wheels build in.

I read the 0.37.1 and 0.45.0 build scripts side by side. Builder selection for a source build, the cc builder's dependency check, the NASM rule and the pregenerated-bindings target list are all unchanged, so I don't expect the cmake/clang/nasm requirements to move. And this PR's CI did compile 0.45 on Windows x86_64 MSVC, macOS aarch64 and Linux x86_64 (the three python jobs, test, clippy). But nothing compiled it for aarch64 Linux, which is both a dist target and a wheel target, or inside manylinux_2_28. The Release workflow skips build-local-artifacts on pull requests (run 38156191378).

If this lands before v4.2.4 (#2041), any failure there shows up on the tag, and PyPI's publish doesn't wait for the CLI build. python-release.yml has workflow_dispatch, and publish only runs on a tag push. So gh workflow run python-release.yml --ref chore/security-dependency-updates builds all four release-profile wheels on the release runners and publishes nothing. That's the cheapest way I can think of to see aarch64 Linux and manylinux_2_28 before the tag does.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran it: Python release #38479051233, dispatched on 5163505 (this branch merged with main). All four release-profile wheels built with aws-lc-sys 0.45 and passed their tests on Python 3.10 and 3.14. That covers aarch64 Linux and x86_64 Linux in manylinux_2_28, macOS aarch64 and Windows x86_64. The tag-version check and publish to PyPI were skipped, so nothing was published.

Comment thread Cargo.toml
# Persistent/immutable data structures (structural sharing -> O(1) clone).
# Used by fluree-db-novelty's current-state fact index.
imbl = "3"
imbl = "7"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Optional: imbl 3 → 7 changes the persistent map under a per-flake path, and nothing in db has measured it.

NoveltyFactState (fluree-db-novelty/src/fact_state.rs:76-102) does an OrdMap::get, and usually an insert, for every flake apply_commit sees. imbl 6 rewrote OrdMap as a B+tree, and 7.0 lists more B-tree performance work, so I'd expect this to be neutral or better. I don't think it's a regression risk.

But transact_commit and novelty_replay are the benches that cover this path, and bench.yml's compare_only runs only the four query benches, so the on-demand compare wouldn't see it. A main-vs-branch run of those two would settle it. This is minor and non-blocking, but if you agree it's worth having the number, I'd rather it be on this PR than turn up later.

Commenting here because fluree-db-novelty/src/fact_state.rs is not in this diff.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Measured locally on macOS arm64: dev-fast profile, medium scale, criterion's full sample count, the branch merged with main, and imbl 3 vs 7 with nothing else changed.

Bench imbl 3 imbl 7 Change
novelty_replay/replay_chain 65.4 ms 61.0 ms −6.7%
transact_commit/populated_ledger 1.75 ms 1.94 ms +11%

The populated_ledger regression isn't the commit. That bench's measured closure takes ownership of the Fluree instance and the ledger, so dropping the whole 10k-node ledger falls inside the timed region, and that drop is most of the number. With the closure returning them instead, criterion drops them outside the timing. The commit then measures 132 µs on imbl 3 and 120 µs on imbl 7, 9% faster.

A standalone OrdMap bench agrees. It used a 60k-entry map keyed like FactKey:

  • imbl 7 builds the map 2× faster;
  • a clone followed by 60 inserts, which is a commit, runs 2.3× faster;
  • lookups run 25% faster;
  • only dropping a whole map is slower, 0.45 ms → 0.7–1.6 ms, since 16-wide nodes mean more allocations to free.

A whole fact-state map is dropped only when a ledger is closed or evicted, or when novelty is rebuilt after indexing. That doesn't happen per commit.

So imbl 7 is neutral to better on the per-flake path. Separately, populated_ledger mostly measures teardown, which is worth fixing in the bench outside this PR.

Comment thread wasm-probe/Cargo.lock
[[package]]
name = "fluree-db-transact"
version = "4.1.6"
version = "4.2.4-beta.2"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Nit: wasm-probe/Cargo.lock is still one line out of sync, so cargo metadata --locked fails in wasm-probe/.

fluree-db-transact's entry here is missing "xxhash-rust". #2008's 1ba743666 added that dependency (fluree-db-transact/Cargo.toml:63), and 614801118 refreshed that exact edge in testsuite-shacl/Cargo.lock, but not here. With the lockfile copied aside, cargo metadata --offline in wasm-probe/ adds that one line and nothing else.

CI doesn't notice because run-node.mjs runs wasm-pack build without --locked, so cargo rewrites the lockfile silently. It's one line, though, and the body says this lockfile is resynced, so I'd rather that be fully true in this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f674bec. It was exactly that one xxhash-rust line. After merging main (5163505), cargo metadata --locked passes in all six workspaces.

…ash-rust

The same edge 6148011 added to testsuite-shacl. Without it,
cargo metadata --locked fails in wasm-probe/.
@bplatz
bplatz merged commit f072d86 into main Oct 14, 2026
24 checks passed
@bplatz
bplatz deleted the chore/security-dependency-updates branch October 14, 2026 00:04
aaj3f added a commit that referenced this pull request Oct 14, 2026
…2068) into fix/write-fidelity-part2

Two conflicts, both with #2056, which fixed the same debug assertion this
branch fixed in 9b7cc1a (the resolver's reserved-namespace guard
rejected f:message, f:author and f:reverts in txn-meta):

- fluree-db-indexer/src/run_index/resolve/resolver.rs: took main's
  version, the guard deciding through fluree_vocab::txn_meta::may_hold.
  This branch's widened is_system_txn_meta_entry admitted the same five
  names and goes; the file now equals main's.
- fluree-db-api/tests/it_txn_meta.rs: kept both sides' tests, this
  branch's an_index_build_keeps_the_user_message_and_author (a file
  ledger through a full rebuild) beside #2056's.

template_sink.rs, trig_meta.rs, txn_meta.rs, admin.rs and fluree-vocab
merged cleanly: #2056's predicate check in the txn-meta path sits beside
this branch's statement hashing and does not touch it.
aaj3f added a commit that referenced this pull request Oct 14, 2026
Brings in #2102 (one HTTP status table), #2068, #2056, #2053, #2046,
#2045 and the v4.2.4 release.

- api error.rs: main's exhaustive status_code / error_type tables, with
  ApiError::ConfigUnavailable and TransactError::ConfigUnavailable
  classified as 500 err:storage/ReadFailure in both, and rows for them
  and RequestOverrideRefused in every_variant.
- server error.rs: main's derivation from ApiError; this branch's
  ConfigUnavailable arms move to the API tables.
- consensus: SubmissionError keeps both ConfigUnavailable and
  CommitContention.
- server routes/transact.rs: both submission arms and test rows.
- transaction.rs, tx_builder.rs: main's txn_attempts loops, with this
  branch's request-governance argument on every stage_plan / stage_all
  call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants