9.8critical
Use after free in portaudio-rs
- Severity
- 9.8critical CVSS:3.1 by NVD
- Exploit likelihood
- 2.51% (higher than 85% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-qpjr-ch72-2qq4RUSTSEC-2019-0022
Description
An issue was discovered in the portaudio-rs crate through 0.3.1 for Rust. There is a use-after-free with resultant arbitrary code execution because of a lack of unwind safety in stream_callback and stream_finished_callback.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| portaudio-rs (crates.io) | before 0.3.2, from 0.0.0-0 before 0.3.2-0 | GitHub Advisory Database, RustSec Advisory Database |
| portaudio-rs_project portaudio-rs | up to 0.3.1 | NVD |
All scores
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| RustSec Advisory Database | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
An issue was discovered in the portaudio-rs crate through 0.3.1 for Rust. There is a use-after-free with resultant arbitrary code execution because of a lack of unwind safety in stream_callback and stream_finished_callback.
GitHub Advisory Database
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 .
RustSec Advisory Database
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.
NVD (es)
Se detectó un problema en el paquete (crate) portaudio-rs versiones hasta 0.3.1 para Rust. Se presenta un uso de la memoria previamente liberada con una ejecución de código arbitraria resultante debido a la falta de seguridad del desempaquetado en las funciones stream_callback y stream_finished_callback.
References
| https://rustsec.org/advisories/RUSTSEC-2019-0022.html | advisory, exploit, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2019-16881 | advisory | |
| https://github.com/mvdnes/portaudio-rs/issues/20 | report, web | |
| https://github.com/mvdnes/portaudio-rs/commit/7466df019f6739732fd91401017942c22364ef61 | web | |
| https://github.com/mvdnes/portaudio-rs | package | |
| https://crates.io/crates/portaudio-rs | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2019-16881 changed 2024-08-05 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qpjr-ch72-2qq4 changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2019-0022 changed 2023-11-08 | CC0-1.0 |
| NVD | CVE-2019-16881 changed 2026-06-17 | Public domain |