PT-2020-17639 · Rust · Lexer Crate
Published
2020-11-10
·
Updated
2022-05-03
·
CVE-2020-36458
CVSS v3.1
8.1
High
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
lexer crate through 2020-11-10
Description
The issue is related to the implementation of Sync for ReaderResult<T, E> with a trait bound of T: Send, E: Send, which can lead to data races and memory corruption when multiple threads access &T or &E concurrently. This is because matching on the public enum ReaderResult<T, E> provides access to &T and &E, allowing access to non-Sync types T or E.
Recommendations
For lexer crate through 2020-11-10, consider changing the trait bounds imposed on T and E to be T: Sync, E: Sync to resolve the issue. As a temporary workaround, consider restricting concurrent access to ReaderResult<T, E> instances to minimize the risk of memory corruption.
Exploit
Fix
Command Injection
Race Condition
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Lexer Crate