Rust advisories / portaudio-rs
Vulnerability CriticalRUSTSEC-2019-0022 · portaudio-rs
RUSTSEC-2019-0022: Stream callback function is not unwind safe
Short answerA security vulnerability in the portaudio-rs crate: Stream callback function is not unwind safe. Critical severity (CVSS 9.8). Fixed in 0.3.2: update to a fixed version.
| Crate | portaudio-rs |
|---|---|
| Type | Vulnerability (code-execution, memory-corruption) |
| Affected versions | Before 0.3.2. |
| Fixed in | 0.3.2 |
| Severity | Critical, CVSS 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2019-09-14 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2019-16881, GHSA-qpjr-ch72-2qq4 |
What to do
- See which version you have:
cargo tree -i portaudio-rs(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p portaudio-rs. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleportaudio-rs = "0.3.2") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
Affected versions of this crate is not panic safe within callback functions stream_callback and stream_finished_callback.
The call to user-provided closure might panic before a mem::forget call, which then causes a use after free that grants attacker to control the callback function pointer.
This allows an attacker to construct an arbitrary code execution .
The flaw was reported by Phosphorus15.
References
- Package: crates.io/crates/portaudio-rs
- Advisory: rustsec.org/advisories/RUSTSEC-2019-0022.html
- Report: github.com/mvdnes/portaudio-rs/issues/20
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?