CVE-2024-34360: Insufficient Information (NVD-CWE-noinfo)
value: go-spacemesh is a Go implementation of the Spacemesh protocol full node. Nodes can publish activations transactions (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. This vulnerability is fixed in go-spacemesh 1.5.2-hotfix1 and Spacemesh API 1.37.1.
CWE description: There is insufficient information about the issue to classify it; details are unkown or unspecified.
Published: 2024-05-14T15:38Z
Repository: https://github.com/spacemeshos/api
Language: Other
Files changed: release/go/spacemesh/v1/types.pb.go, spacemesh/v1/types.proto
Commit date: 2024-05-07 14:57:28 +0200
Commit message: Add malfeasance type for incorrect previous ATX (#2)


Diff: diff --git a/release/go/spacemesh/v1/types.pb.go b/release/go/spacemesh/v1/types.pb.go
index 7686421..8fd6906 100644
--- a/release/go/spacemesh/v1/types.pb.go
+++ b/release/go/spacemesh/v1/types.pb.go
@@ -73,32 +73,35 @@ func (Layer_LayerStatus) EnumDescriptor() ([]byte, []int) {
 }
 
 type MalfeasanceProof_MalfeasanceType int32
 
 const (
-	MalfeasanceProof_MALFEASANCE_UNSPECIFIED MalfeasanceProof_MalfeasanceType = 0
-	MalfeasanceProof_MALFEASANCE_ATX         MalfeasanceProof_MalfeasanceType = 1
-	MalfeasanceProof_MALFEASANCE_BALLOT      MalfeasanceProof_MalfeasanceType = 2
-	MalfeasanceProof_MALFEASANCE_HARE        MalfeasanceProof_MalfeasanceType = 3
-	MalfeasanceProof_MALFEASANCE_POST_INDEX  MalfeasanceProof_MalfeasanceType = 4
+	MalfeasanceProof_MALFEASANCE_UNSPECIFIED        MalfeasanceProof_MalfeasanceType = 0
+	MalfeasanceProof_MALFEASANCE_ATX                MalfeasanceProof_MalfeasanceType = 1
+	MalfeasanceProof_MALFEASANCE_BALLOT             MalfeasanceProof_MalfeasanceType = 2
+	MalfeasanceProof_MALFEASANCE_HARE               MalfeasanceProof_MalfeasanceType = 3
+	MalfeasanceProof_MALFEASANCE_POST_INDEX         MalfeasanceProof_MalfeasanceType = 4
+	MalfeasanceProof_MALFEASANCE_INCORRECT_PREV_ATX MalfeasanceProof_MalfeasanceType = 5
 )
 
 // Enum value maps for MalfeasanceProof_MalfeasanceType.
 var (
 	MalfeasanceProof_MalfeasanceType_name = map[int32]string{
 		0: "MALFEASANCE_UNSPECIFIED",
 		1: "MALFEASANCE_ATX",
 		2: "MALFEASANCE_BALLOT",
 		3: "MALFEASANCE_HARE",
 		4: "MALFEASANCE_POST_INDEX",
+		5: "MALFEASANCE_INCORRECT_PREV_ATX",
 	}
 	MalfeasanceProof_MalfeasanceType_value = map[string]int32{
-		"MALFEASANCE_UNSPECIFIED": 0,
-		"MALFEASANCE_ATX":         1,
-		"MALFEASANCE_BALLOT":      2,
-		"MALFEASANCE_HARE":        3,
-		"MALFEASANCE_POST_INDEX":  4,
+		"MALFEASANCE_UNSPECIFIED":        0,
+		"MALFEASANCE_ATX":                1,
+		"MALFEASANCE_BALLOT":             2,
+		"MALFEASANCE_HARE":               3,
+		"MALFEASANCE_POST_INDEX":         4,
+		"MALFEASANCE_INCORRECT_PREV_ATX": 5,
 	}
 )
 
 func (x MalfeasanceProof_MalfeasanceType) Enum() *MalfeasanceProof_MalfeasanceType {
 	p := new(MalfeasanceProof_MalfeasanceType)
@@ -1460,11 +1463,11 @@ var file_spacemesh_v1_types_proto_rawDesc = []byte{
 	0x42, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
 	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d,
 	0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
 	0x6f, 0x6e, 0x49, 0x64, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
 	0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x84, 0x03,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa8, 0x03,
 	0x0a, 0x10, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f,
 	0x6f, 0x66, 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x5f, 0x69, 0x64,
 	0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65,
 	0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, 0x52,
 	0x09, 0x73, 0x6d, 0x65, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x05, 0x6c, 0x61,
@@ -1476,31 +1479,34 @@ var file_spacemesh_v1_types_proto_rawDesc = []byte{
 	0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x2e, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61,
 	0x73, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12,
 	0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20,
 	0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14,
 	0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70,
-	0x72, 0x6f, 0x6f, 0x66, 0x22, 0x8d, 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73,
+	0x72, 0x6f, 0x6f, 0x66, 0x22, 0xb1, 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73,
 	0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x41, 0x4c, 0x46,
 	0x45, 0x41, 0x53, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
 	0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x41, 0x4c, 0x46, 0x45, 0x41, 0x53,
 	0x41, 0x4e, 0x43, 0x45, 0x5f, 0x41, 0x54, 0x58, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x41,
 	0x4c, 0x46, 0x45, 0x41, 0x53, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54,
 	0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x41, 0x4c, 0x46, 0x45, 0x41, 0x53, 0x41, 0x4e, 0x43,
 	0x45, 0x5f, 0x48, 0x41, 0x52, 0x45, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x41, 0x4c, 0x46,
 	0x45, 0x41, 0x53, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x5f, 0x49, 0x4e, 0x44,
-	0x45, 0x58, 0x10, 0x04, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61,
-	0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73,
-	0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
-	0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x6f, 0x73, 0x2f,
-	0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x73,
-	0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63,
-	0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c,
-	0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53,
-	0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70,
-	0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
-	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65,
-	0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x45, 0x58, 0x10, 0x04, 0x12, 0x22, 0x0a, 0x1e, 0x4d, 0x41, 0x4c, 0x46, 0x45, 0x41, 0x53, 0x41,
+	0x4e, 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x52,
+	0x45, 0x56, 0x5f, 0x41, 0x54, 0x58, 0x10, 0x05, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d,
+	0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54,
+	0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74,
+	0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73,
+	0x68, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f,
+	0x67, 0x6f, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x3b,
+	0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58,
+	0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31,
+	0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2,
+	0x02, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47,
+	0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61,
+	0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 
 var (
 	file_spacemesh_v1_types_proto_rawDescOnce sync.Once
 	file_spacemesh_v1_types_proto_rawDescData = file_spacemesh_v1_types_proto_rawDesc
diff --git a/spacemesh/v1/types.proto b/spacemesh/v1/types.proto
index f1ae5fc..2e49f09 100644
--- a/spacemesh/v1/types.proto
+++ b/spacemesh/v1/types.proto
@@ -125,10 +125,11 @@ message MalfeasanceProof {
         MALFEASANCE_UNSPECIFIED = 0;
         MALFEASANCE_ATX = 1;
         MALFEASANCE_BALLOT = 2;
         MALFEASANCE_HARE = 3;
         MALFEASANCE_POST_INDEX = 4;
+        MALFEASANCE_INCORRECT_PREV_ATX = 5;
     }
     MalfeasanceType kind = 3;
     string debug_info = 4;
     bytes proof = 5;
 }
\ No newline at end of file

Vulnerable code: 	MalfeasanceProof_MALFEASANCE_UNSPECIFIED MalfeasanceProof_MalfeasanceType = 0
	MalfeasanceProof_MALFEASANCE_ATX         MalfeasanceProof_MalfeasanceType = 1
	MalfeasanceProof_MALFEASANCE_BALLOT      MalfeasanceProof_MalfeasanceType = 2
	MalfeasanceProof_MALFEASANCE_HARE        MalfeasanceProof_MalfeasanceType = 3
	MalfeasanceProof_MALFEASANCE_POST_INDEX  MalfeasanceProof_MalfeasanceType = 4
		"MALFEASANCE_UNSPECIFIED": 0,
		"MALFEASANCE_ATX":         1,
		"MALFEASANCE_BALLOT":      2,
		"MALFEASANCE_HARE":        3,
		"MALFEASANCE_POST_INDEX":  4,
	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x84, 0x03,
	0x72, 0x6f, 0x6f, 0x66, 0x22, 0x8d, 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73,
	0x45, 0x58, 0x10, 0x04, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x70, 0x61,
	0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73,
	0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
	0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x6f, 0x73, 0x2f,
	0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x73,
	0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x70, 0x61, 0x63,
	0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0c,
	0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x53,
	0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x53, 0x70,
	0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65,
	0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
Fixed code: 	MalfeasanceProof_MALFEASANCE_UNSPECIFIED        MalfeasanceProof_MalfeasanceType = 0
	MalfeasanceProof_MALFEASANCE_ATX                MalfeasanceProof_MalfeasanceType = 1
	MalfeasanceProof_MALFEASANCE_BALLOT             MalfeasanceProof_MalfeasanceType = 2
	MalfeasanceProof_MALFEASANCE_HARE               MalfeasanceProof_MalfeasanceType = 3
	MalfeasanceProof_MALFEASANCE_POST_INDEX         MalfeasanceProof_MalfeasanceType = 4
	MalfeasanceProof_MALFEASANCE_INCORRECT_PREV_ATX MalfeasanceProof_MalfeasanceType = 5
		5: "MALFEASANCE_INCORRECT_PREV_ATX",
		"MALFEASANCE_UNSPECIFIED":        0,
		"MALFEASANCE_ATX":                1,
		"MALFEASANCE_BALLOT":             2,
		"MALFEASANCE_HARE":               3,
		"MALFEASANCE_POST_INDEX":         4,
		"MALFEASANCE_INCORRECT_PREV_ATX": 5,
	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa8, 0x03,
	0x72, 0x6f, 0x6f, 0x66, 0x22, 0xb1, 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x6c, 0x66, 0x65, 0x61, 0x73,
	0x45, 0x58, 0x10, 0x04, 0x12, 0x22, 0x0a, 0x1e, 0x4d, 0x41, 0x4c, 0x46, 0x45, 0x41, 0x53, 0x41,
	0x4e, 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x52,
	0x45, 0x56, 0x5f, 0x41, 0x54, 0x58, 0x10, 0x05, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d,
	0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54,
	0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74,
	0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73,
	0x68, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f,
	0x67, 0x6f, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x3b,
	0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58,
	0x58, 0xaa, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31,
	0xca, 0x02, 0x0c, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0xe2,
	0x02, 0x18, 0x53, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x5c, 0x47,
	0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x70, 0x61,
	0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
	0x6f, 0x33,
        MALFEASANCE_INCORRECT_PREV_ATX = 5;