GHSA-jcqq-g64v-gcm7

Suggest an improvement
Source
https://github.com/advisories/GHSA-jcqq-g64v-gcm7
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/05/GHSA-jcqq-g64v-gcm7/GHSA-jcqq-g64v-gcm7.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-jcqq-g64v-gcm7
Aliases
Related
Published
2024-05-10T15:33:40Z
Modified
2024-05-14T19:54:27Z
Severity
  • 8.2 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N CVSS Calculator
Summary
Previous ATX is not checked to be the newest valid ATX by Smesher when validating incoming ATX
Details

Impact

Nodes can publish ATXs which reference the incorrect previous ATX of the Smesher that created the ATX. ATXs are expected to form a single chain from the newest to the first ATX ever published by an identity. Allowing Smeshers to reference an earlier (but not the latest) ATX as previous breaks this protocol rule and can serve as an attack vector where Nodes are rewarded for holding their PoST data for less than one epoch but still being eligible for rewards.

Patches

  • API needs to be extended to be able to fetch events from a node that dected malicious behavior of this regard by the node
  • go-spacemesh needs to be patched to a) not allow publishing these ATXs any more and b) create malfeasance proofs for identities that published invalid ATXs in the past.

Workarounds

n/a

References

Spacemesh protocol whitepaper: https://spacemesh.io/blog/spacemesh-white-paper-1/, specifically sections 4.4.2 ("ATX Contents") and 4.4.3 ("ATX validity")

Database specific
{
    "nvd_published_at": "2024-05-14T15:38:45Z",
    "cwe_ids": [
        "CWE-754"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2024-05-10T15:33:40Z"
}
References

Affected packages

Go / github.com/spacemeshos/go-spacemesh

Package

Name
github.com/spacemeshos/go-spacemesh
View open source insights on deps.dev
Purl
pkg:golang/github.com/spacemeshos/go-spacemesh

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.5.2-hotfix1

Go / github.com/spacemeshos/api

Package

Name
github.com/spacemeshos/api
View open source insights on deps.dev
Purl
pkg:golang/github.com/spacemeshos/api

Affected ranges

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