{"record":{"id":"0332136143eef732","repo":"shadow1ng/fscan","slug":"unknown-fastpathpdu-type-0x-x","errorCode":null,"errorMessage":"Unknown FastPathPDU type 0x%x","messagePattern":"Unknown FastPathPDU type 0x%x","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"libs/grdp/protocol/pdu/data.go","lineNumber":930,"sourceCode":"\t\t// 绘图指令，认证检测不需要处理\n\t\treturn nil, errors.New(fmt.Sprintf(\"Unsupport FastPathPDU type 0x%x\", code))\n\tcase FASTPATH_UPDATETYPE_BITMAP:\n\t\td = &FastPathBitmapUpdateDataPDU{}\n\tcase FASTPATH_UPDATETYPE_PALETTE:\n\tcase FASTPATH_UPDATETYPE_SYNCHRONIZE:\n\tcase FASTPATH_UPDATETYPE_SURFCMDS:\n\t\t//d = &FastPathSurfaceCmds{}\n\tcase FASTPATH_UPDATETYPE_PTR_NULL:\n\tcase FASTPATH_UPDATETYPE_PTR_DEFAULT:\n\tcase FASTPATH_UPDATETYPE_PTR_POSITION:\n\tcase FASTPATH_UPDATETYPE_COLOR:\n\t\t//d = &FastPathColorPdu{}\n\tcase FASTPATH_UPDATETYPE_CACHED:\n\tcase FASTPATH_UPDATETYPE_POINTER:\n\tcase FASTPATH_UPDATETYPE_LARGE_POINTER:\n\tdefault:\n\t\tglog.Debugf(\"Unknown FastPathPDU type 0x%x\", code)\n\t\treturn f, errors.New(fmt.Sprintf(\"Unknown FastPathPDU type 0x%x\", code))\n\t}\n\tif d != nil {\n\t\terr = d.Unpack(r)\n\t\tif err != nil {\n\t\t\t//glog.Error(\"Unpack:\", err)\n\t\t\treturn nil, err\n\t\t}\n\t} else {\n\t\treturn nil, errors.New(fmt.Sprintf(\"Unsupport FastPathPDU type 0x%x\", code))\n\t}\n\n\tf.Data = d\n\treturn f, nil\n}\n\ntype ShareControlHeader struct {\n\tTotalLength uint16 `struc:\"little\"`\n\tPDUType     uint16 `struc:\"little\"`","sourceCodeStart":912,"sourceCodeEnd":948,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/libs/grdp/protocol/pdu/data.go#L912-L948","documentation":"The default branch of the fast-path update switch in pdu/data.go fires when the update code from the server is not any known FASTPATH_UPDATETYPE_* value. The library logs a debug line and returns 'Unknown FastPathPDU type 0x%x' because the PDU cannot be classified or decoded.","triggerScenarios":"Receiving a fast-path update PDU whose type byte falls outside the implemented set (ORDERS, BITMAP, PALETTE, SYNCHRONIZE, SURFCMDS, CACHED, POINTER, LARGE_POINTER) — e.g. a reserved/future update type or corrupted stream bytes misaligned so the type nibble is wrong.","commonSituations":"Connecting to a newer Windows/terminal server using an update type this grdp version doesn't know; stream desynchronization from an earlier parse bug making garbage bytes look like an update header; testing against non-MS RDP servers with proprietary update codes.","solutions":["Update the grdp library to a version supporting the newer FastPath update types.","Log/inspect the code value in the debug output to identify what the server is sending, then add a case for that constant in parseFastPathUpdate.","Verify the stream is not desynchronized: check that preceding PDU parsing consumed exactly the right number of bytes.","If the type is benign for your use case, change the default branch to skip instead of erroring."],"exampleFix":"// before (data.go ~930)\ndefault:\n    glog.Debugf(\"Unknown FastPathPDU type 0x%x\", code)\n    return f, errors.New(fmt.Sprintf(\"Unknown FastPathPDU type 0x%x\", code))\n// after\ndefault:\n    glog.Warnf(\"skipping unknown FastPathPDU type 0x%x\", code)\n    return f, nil","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"client.On(\"error\", func(err error) {\n    if strings.Contains(err.Error(), \"Unknown FastPathPDU type\") {\n        glog.Warn(\"unknown fast-path update from server: \", err)\n        return\n    }\n    glog.Error(\"rdp error: \", err)\n})","preventionTips":["Keep the grdp library updated for newer server update types","Watch debug logs for the 0x%x code to identify unhandled server types","Validate the stream isn't desynchronized after any parse error"],"tags":["rdp","grdp","unknown-pdu-type","protocol"],"backgroundTag":"invalid-enum-value","analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}