GHSA-f95p-4cv5-8w8x

Suggest an improvement
Source
https://github.com/advisories/GHSA-f95p-4cv5-8w8x
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-f95p-4cv5-8w8x/GHSA-f95p-4cv5-8w8x.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-f95p-4cv5-8w8x
Published
2024-12-04T18:26:13Z
Modified
2024-12-04T18:26:13Z
Summary
linkme fails to ensure slice elements match the slice's declared type
Details

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.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [],
    "severity": "LOW",
    "github_reviewed": true,
    "github_reviewed_at": "2024-12-04T18:26:13Z"
}
References

Affected packages

crates.io / linkme

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.3.24