Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-fjx5-qpf4-xjf2: Parsing borsh messages with ZST which are not-copy/clone is unsound

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.

ghsa
#git
  1. GitHub Advisory Database
  2. GitHub Reviewed
  3. GHSA-fjx5-qpf4-xjf2

Parsing borsh messages with ZST which are not-copy/clone is unsound

Moderate severity GitHub Reviewed Published Apr 17, 2023 to the GitHub Advisory Database • Updated Apr 17, 2023

Package

cargo borsh (Rust)

Affected versions

<= 0.10.3

Description

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

  • near/borsh-rs#19
  • https://rustsec.org/advisories/RUSTSEC-2023-0033.html

Published to the GitHub Advisory Database

Apr 17, 2023

Last updated

Apr 17, 2023

GHSA ID

GHSA-fjx5-qpf4-xjf2

Source code

ghsa: Latest News

GHSA-g5x8-v2ch-gj2g: Vaultwarden HTML injection vulnerability