GHSA-fjx5-qpf4-xjf2

Source
https://github.com/advisories/GHSA-fjx5-qpf4-xjf2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/04/GHSA-fjx5-qpf4-xjf2/GHSA-fjx5-qpf4-xjf2.json
Aliases
Published
2023-04-17T16:32:26Z
Modified
2023-11-08T04:19:03.348979Z
Details

Affected versions of borsh cause undefined behavior when zero-sized-types (ZST) are parsed and the Copy/Clone traits are not implemented/derived. For instance if 1000 instances of a ZST are deserialized, and the ZST is not copy (this can be achieved through a singleton), then accessing/writing to deserialized data will cause a segmentation fault.

There is currently no way for borsh to read data without also providing a Rust type. Therefore, if you are not using ZST for serialization, then you are not affected by this issue.

References

Affected packages

crates.io / borsh

Package

Name
borsh

Affected ranges

Type
SEMVER
Events
Introduced
0The exact introduced commit is unknown
Fixed
1.0.0-alpha.1

Database specific

{
    "last_known_affected_version_range": "<= 0.10.3"
}