{"record":{"id":"0a5a2aca1f6e0609","repo":"shadow1ng/fscan","slug":"xid-mismatch","errorCode":null,"errorMessage":"xid mismatch","messagePattern":"xid mismatch","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/nfs.go","lineNumber":99,"sourceCode":"\tRead([]byte) (int, error)\n\tWrite([]byte) (int, error)\n}, program, version uint32) error {\n\txid := uint32(0x12340000 + program)\n\trpcCall := p.buildRPCCall(xid, program, version, 0, nil)\n\trpcFragment := p.wrapRPCFragment(rpcCall)\n\n\tif _, err := conn.Write(rpcFragment); err != nil {\n\t\treturn err\n\t}\n\n\treply, err := readRPCFragment(conn, 512)\n\tif err != nil || len(reply) < 24 {\n\t\treturn fmt.Errorf(\"short response\")\n\t}\n\n\treplyXID := binary.BigEndian.Uint32(reply[0:4])\n\tif replyXID != xid {\n\t\treturn fmt.Errorf(\"xid mismatch\")\n\t}\n\tmsgType := binary.BigEndian.Uint32(reply[4:8])\n\tif msgType != 1 {\n\t\treturn fmt.Errorf(\"not a reply\")\n\t}\n\treturn nil\n}\n\nfunc (p *NFSPlugin) getExports(conn interface {\n\tRead([]byte) (int, error)\n\tWrite([]byte) (int, error)\n}) ([]string, error) {\n\t// Sun RPC call: program=MOUNT(100005), version=3, procedure=EXPORT(5)\n\txid := uint32(0x12345678)\n\trpcCall := p.buildRPCCall(xid, 100005, 3, 5, nil)\n\trpcFragment := p.wrapRPCFragment(rpcCall)\n\n\tif _, err := conn.Write(rpcFragment); err != nil {","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/nfs.go#L81-L117","documentation":"Guard in rpcNullCall: the reply fragment's XID field does not match the xid sent in the NULL call. The response belongs to a different RPC exchange (desynchronized stream or wrong service), so it cannot be trusted as the answer to this probe.","triggerScenarios":"Thrown at plugins/services/nfs.go:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure no other RPC traffic shares the connection","Confirm the target is an ONC RPC endpoint and not a look-alike protocol","Retry the probe on a fresh connection"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}