Skip to content
OpenAdvisories
Low GHSA-f95p-4cv5-8w8x RUSTSEC-2024-0407

linkme fails to ensure slice elements match the slice's declared type

Published Dec 4, 2024 · Updated Oct 28, 2025 · Assigned by GHSA

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.

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io linkme < 0.3.24 0.3.24 GHSA-f95p-4cv5-8w8x
crates.io linkme >= 0.0.0-0, < 0.3.24 0.3.24 RUSTSEC-2024-0407

References