# GHSA-f95p-4cv5-8w8x: linkme fails to ensure slice elements match the slice's declared type

- Severity: Low (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-03-05T12:00:00.000Z
- Modified: 2025-10-28T06:29:24.336Z
- Also known as: RUSTSEC-2024-0407

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- linkme (crates.io): before 0.3.24; from 0.0.0-0 before 0.3.24

## References

- <https://github.com/dtolnay/linkme/issues/82> (report, web)
- <https://github.com/dtolnay/linkme> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0407.html> (advisory, web)
- <https://crates.io/crates/linkme> (package)

## Sources

- GitHub Advisory Database: [GHSA-f95p-4cv5-8w8x](https://github.com/advisories/GHSA-f95p-4cv5-8w8x), CC-BY-4.0, modified 2025-10-28
- RustSec Advisory Database: [RUSTSEC-2024-0407](https://rustsec.org/advisories/RUSTSEC-2024-0407.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-f95p-4cv5-8w8x · Whole record: https://cve.day/GHSA-f95p-4cv5-8w8x.json · Rebuilt by cve.day 2026-11-25T22:56:43.226Z
