{"record":{"id":"252da048c4e42b3b","repo":"shadow1ng/fscan","slug":"unsupport-fastpathpdu-type-0x-x","errorCode":null,"errorMessage":"Unsupport FastPathPDU type 0x%x","messagePattern":"Unsupport FastPathPDU type 0x%x","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"libs/grdp/protocol/pdu/data.go","lineNumber":913,"sourceCode":"\tFASTPATH_OUTPUT_COMPRESSION_USED = 0x2\n)\n\nconst (\n\tFASTPATH_FRAGMENT_SINGLE = (0x0 << 4)\n\tFASTPATH_FRAGMENT_LAST   = (0x1 << 4)\n\tFASTPATH_FRAGMENT_FIRST  = (0x2 << 4)\n\tFASTPATH_FRAGMENT_NEXT   = (0x3 << 4)\n)\n\nfunc readFastPathUpdatePDU(r io.Reader, code uint8) (*FastPathUpdatePDU, error) {\n\tf := &FastPathUpdatePDU{}\n\tvar err error\n\tvar d UpdateData\n\t//glog.Debugf(\"FastPathPDU type %s(0x%x)\", FastPathUpdateType(code), code)\n\tswitch code {\n\tcase FASTPATH_UPDATETYPE_ORDERS:\n\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}","sourceCodeStart":895,"sourceCodeEnd":931,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/libs/grdp/protocol/pdu/data.go#L895-L931","documentation":"In pdu/data.go, parseFastPathUpdate switches on the FastPath update code received from the RDP server. FASTPATH_UPDATETYPE_ORDERS (drawing/rendering order PDUs) is explicitly not implemented for this library's use case (credential-check connections don't need graphics), so it is rejected with 'Unsupport FastPathPDU type 0x%x' instead of being decoded.","triggerScenarios":"Calling the client against an RDP server that sends a fast-path update with code FASTPATH_UPDATETYPE_ORDERS — i.e. the server starts transmitting drawing orders (GDI graphics orders) during or after session setup. The caller sees this via the library's 'error' event / returned error from the PDU update parser.","commonSituations":"Connecting to a full desktop RDP session that begins rendering GDI drawing orders instead of bitmap updates; servers configured with a low graphics mode or older GDI-first remoting; mismatch where the client capability negotiation led the server to choose orders-based encoding the library deliberately ignores.","solutions":["Treat this as expected for auth/cert-check usage: if you only need handshake validation, catch/ignore this specific error and treat the connection as verified.","If you need graphics, prefer servers/scenarios that produce bitmap updates (FASTPATH_UPDATETYPE_BITMAP), which the parser handles.","Implement a FastPathOrdersUpdateDataPDU: in data.go, replace the error return with a stub decoder that consumes/skips the orders PDU bytes.","Check the server's RDP capability flags / graphics mode (e.g. disable 'draw GDI+' or orders-heavy modes) so it sends bitmap updates."],"exampleFix":"// before (data.go ~913)\ncase FASTPATH_UPDATETYPE_ORDERS:\n    return nil, errors.New(fmt.Sprintf(\"Unsupport FastPathPDU type 0x%x\", code))\n// after\ncase FASTPATH_UPDATETYPE_ORDERS:\n    // consume the orders PDU without decoding\n    return nil, nil","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"client.On(\"error\", func(err error) {\n    if strings.Contains(err.Error(), \"Unsupport FastPathPDU type\") {\n        glog.Warn(\"ignoring unsupported fast-path update (orders): \", err)\n        return\n    }\n    glog.Error(\"rdp error: \", err)\n})","preventionTips":["Only run this library against sessions expected to send bitmap updates, or for auth-only checks","Patch data.go to treat FASTPATH_UPDATETYPE_ORDERS as a no-op if you don't need drawing orders","Check server graphics mode / capability negotiation before connecting"],"tags":["rdp","grdp","unsupported-pdu","protocol"],"backgroundTag":"unsupported-operation","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"}