chore(deps): upgrade ratatui to 0.30 (RUSTSEC-2026-0253) - #2589
Open
1688mengdie wants to merge 1 commit into
Open
chore(deps): upgrade ratatui to 0.30 (RUSTSEC-2026-0253)#25891688mengdie wants to merge 1 commit into
1688mengdie wants to merge 1 commit into
Conversation
The locked lru 0.12.5 pulled in by ratatui 0.29 is unsound (RUSTSEC-2026-0253, later advisories reference RUSTSEC-2026-0002): LruCache::pop is not panic-safe, and eviction can cause a use-after-free or double free. The advisory requires lru >= 0.18.2, which ratatui 0.29 cannot satisfy because it pins lru ^0.12. Upgrade ratatui 0.29 -> 0.30 (ratatui-core 0.1.2 requires lru ^0.18, resolving lru to 0.18.2) and relax the bitflags pin from =2.11.1 to ^2, which ratatui-core 0.1.2 needs. ratatui 0.30 adds an associated Error type to the Backend trait, so the CLI startup loop now carries an explicit `B::Error: Send + Sync + 'static` bound. Only the CLI TUI startup path consumes this API. Test: cargo check --locked -p bitfun-cli --jobs 4; cargo tree --locked -i lru --depth 1; cargo test -p bitfun-cli --jobs 4; cargo fmt --check AI: lightly tested
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.
Summary
cargo auditreports the lockedlrudependency as unsound:RUSTSEC-2026-0253 (later advisories reference RUSTSEC-2026-0002).
LruCache::popis not panic-safe; when an eviction happens while apanic is unwinding, the cache can be left inconsistent, leading to a
use-after-free or double free.
Cargo.lockonmainpinslru 0.12.5through
ratatui 0.29.0, and the advisory requireslru >= 0.18.2,which
ratatui 0.29cannot satisfy because it pinslru ^0.12.On the CLI TUI startup path,
ratatuirenders the interactiveinterface; a panic during eviction on that path could trigger the
unsound behavior.
This PR upgrades
ratatuifrom 0.29 to 0.30:ratatui-core 0.1.2requires
lru ^0.18, which resolveslruto 0.18.2 and closes theadvisory. The upgrade requires two mechanical follow-ups, included in
the same commit because the intermediate states do not compile: the
bitflagspin is relaxed from=2.11.1to^2as required byratatui-core 0.1.2, and the CLI startup loop carries an explicitB::Error: Send + Sync + 'staticbound for the new associatedErrortype on the
Backendtrait. Only the CLI TUI startup path consumesthis API.
Fixes #2587
Type and Areas
Type: dependency
Areas: CLI TUI dependency
Verification
cargo check --locked -p bitfun-cli --jobs 4— passed (0 errors; 19 pre-existing warnings unchanged).cargo tree --locked -i lru --depth 1— resolvedlru v0.18.2throughratatui-core v0.1.2;cargo tree --locked -i ratatuishowsratatui v0.30.2consumed by the CLI.cargo test -p bitfun-cli --jobs 4— 685 lib tests passed; 3 pre-existing failures (plugin_source_cli) are identical on the baseline commit (same names, same panic locations), so they are unrelated to this change.cargo fmt --check -p bitfun-cli— one pre-existing diff inpeer_host/commands/dialog.rs, byte-identical on the baseline commit; no formatting change from this PR.Reviewer Notes
ratatui0.30 is the first 0.30.x release line; the lockfile resolves it to 0.30.2 andlruto exactly 0.18.2 (the advisory's minimum fixed version).src/apps/cli/src/ui/startup.rs; no behavior change is intended.Checklist
This is an AI-assisted change.