{"record":{"id":"c58f423854dd328d","repo":"hyperledger/fabric","slug":"asn-encoding-failed","errorCode":null,"errorMessage":"ASN encoding failed","messagePattern":"ASN encoding failed","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/common/cluster/clusterservice.go","lineNumber":148,"sourceCode":"\ttlsBinding, err := GetTLSSessionBinding(stream.Context(), bindingFieldsHash)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"session binding read failed\")\n\t}\n\n\tif !bytes.Equal(tlsBinding, authReq.SessionBinding) {\n\t\treturn nil, errors.New(\"session binding mismatch\")\n\t}\n\n\tmsg, err := asn1.Marshal(AuthRequestSignature{\n\t\tVersion:        int64(authReq.Version),\n\t\tTimestamp:      EncodeTimestamp(authReq.Timestamp),\n\t\tFromId:         strconv.FormatUint(authReq.FromId, 10),\n\t\tToId:           strconv.FormatUint(authReq.ToId, 10),\n\t\tSessionBinding: tlsBinding,\n\t\tChannel:        authReq.Channel,\n\t})\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"ASN encoding failed\")\n\t}\n\n\tmembership := s.MembershipByChannel[authReq.Channel]\n\tif membership == nil {\n\t\treturn nil, errors.Errorf(\"channel %s not found in config\", authReq.Channel)\n\t}\n\n\tfromIdentity := membership.MemberMapping[authReq.FromId]\n\tif fromIdentity == nil {\n\t\treturn nil, errors.Errorf(\"node %d is not member of channel %s\", authReq.FromId, authReq.Channel)\n\t}\n\n\ttoIdentity := membership.MemberMapping[authReq.ToId]\n\tif toIdentity == nil {\n\t\treturn nil, errors.Errorf(\"node %d is not member of channel %s\", authReq.ToId, authReq.Channel)\n\t}\n\n\tequal, err := CompareCertPublicKeys(toIdentity, s.NodeIdentity)","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/common/cluster/clusterservice.go#L130-L166","documentation":"VerifyAuthRequest wraps a failure of asn1.Marshal on the AuthRequestSignature structure (version, timestamp, IDs, TLS session binding, channel). Marshal fails when a field cannot be encoded in ASN.1 — e.g. a string containing characters invalid for its ASN.1 tag — indicating a malformed or hostile remote request.","triggerScenarios":"Thrown at orderer/common/cluster/clusterservice.go:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Drop the request; the remote node is sending malformed authentication requests","Check for version skew between cluster nodes producing incompatible AuthRequest fields"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}