GHSA-f95p-4cv5-8w8x json
linkme fails to ensure slice elements match the slice's declared type
published 2y ago modified last yr. also RUSTSEC-2024-0407
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
Affected versions allow populating a DistributedSlice of T with elements of an arbitrary other type that coerces to T. For example, elements of type `&&str` could end up in a slice of type `[&str]`, since `&&str` coerces to `&str` via a deref coercion.
The flaw was corrected by implementing typechecking for distributed slice elements in such a way that coercion no longer occurs. The element's type must be a subtype of the slice's declared element type.
Patch / fix
- crates.io linkme 0.3.24
Is GHSA-f95p-4cv5-8w8x in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | linkme | <0.3.24 >=0.0.0-0, <0.3.24 |
0.3.24 |
References
-
github.com
/dtolnay/linkme/issues/82
web, report
-
github.com
/dtolnay/linkme
package
-
rustsec.org
/advisories/RUSTSEC-2024-0407.html
web, advisory
-
crates.io
/crates/linkme
package
Sources
- GitHub Advisory GHSA-f95p-4cv5-8w8x
- OSV RUSTSEC-2024-0407
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.