Skip to content

Rust bridge update#492

Merged
n13 merged 3 commits into
mainfrom
rust_bridge_update
May 20, 2026
Merged

Rust bridge update#492
n13 merged 3 commits into
mainfrom
rust_bridge_update

Conversation

@n13
Copy link
Copy Markdown
Collaborator

@n13 n13 commented May 20, 2026

  • update flutter rust bridge
  • update SPM migration - this failed the build, might be unrelated but good to have
  • added fix_ios_build.sh in case it happens again

SPM error in Flutter see here: flutter/flutter#162196

@v12-auditor
Copy link
Copy Markdown

v12-auditor Bot commented May 20, 2026

Note

Complete: Audit complete. V12 found one issue worth reviewing.

Open the full results here.

FindingSeverityDetails
F-67845 🟡 Medium
Malformed SSE lengths can abort process

The regenerated FRB bridge now preallocates Vec storage directly from attacker-controlled SSE length prefixes in SseDecode for Vec<u8>, Vec<String>, and Vec<Vec<u8>>. Exported FFI dispatchers accept raw pointer/length inputs and route them to wrappers like compute_address_hash_hex, decode_ur, and aggregate_proofs, which invoke these decoders before calling deserializer.end(). A forged positive length can therefore trigger Vec::with_capacity(len_ as usize) before any element bytes are consumed or the claimed data_len is checked. FRB only catches unwinding panics; if that infallible allocation path hits real memory exhaustion, Rust aborts the process via handle_alloc_error instead of returning a normal Dart-visible decode error.

Analyzed one file, diff 724019b...50dc3fb.

Copy link
Copy Markdown
Collaborator

@dewabisma dewabisma left a comment

Choose a reason for hiding this comment

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

LGTM!

Not sure about that hacky fix, I didn't get any error but if it fix yours then GTG.

Also, please fix the CI error.

Seems the problem is the same as what I get, I solved it by running melos bootstrap locally then check the package.lock update in.

@n13
Copy link
Copy Markdown
Collaborator Author

n13 commented May 20, 2026

Hmm bootstrap didn't create any new lock files but format formatted a bunch of files

@n13 n13 merged commit 4c8efde into main May 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants