{"record":{"id":"7e0edafbca849c0a","repo":"projectdiscovery/nuclei","slug":"error-sending-to-s-v","errorCode":null,"errorMessage":"error sending to (%s): %v","messagePattern":"error sending to \\((.+?)\\): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/js/libs/kerberos/sendtokdc.go","lineNumber":156,"sourceCode":"\t\t}\n\t\treturn rb, nil\n\t}\n\tif len(errs) > 0 {\n\t\t// fallback to tcp\n\t\treturn nil, fmt.Errorf(\"error sending to a KDC: %s\", strings.Join(errs, \"; \"))\n\t}\n\treturn nil, nil\n}\n\n// sendUDP sends bytes to connection over UDP.\nfunc sendUDP(conn *net.UDPConn, b []byte) ([]byte, error) {\n\tvar r []byte\n\tdefer func() {\n\t\t_ = conn.Close()\n\t}()\n\t_, err := conn.Write(b)\n\tif err != nil {\n\t\treturn r, fmt.Errorf(\"error sending to (%s): %v\", conn.RemoteAddr().String(), err)\n\t}\n\tudpbuf := make([]byte, 4096)\n\tn, _, err := conn.ReadFrom(udpbuf)\n\tr = udpbuf[:n]\n\tif err != nil {\n\t\treturn r, fmt.Errorf(\"sending over UDP failed to %s: %v\", conn.RemoteAddr().String(), err)\n\t}\n\tif len(r) < 1 {\n\t\treturn r, fmt.Errorf(\"no response data from %s\", conn.RemoteAddr().String())\n\t}\n\treturn r, nil\n}\n\n// sendTCP sends bytes to connection over TCP.\nfunc sendTCP(conn *net.TCPConn, b []byte) ([]byte, error) {\n\tdefer func() {\n\t\t_ = conn.Close()\n\t}()","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/kerberos/sendtokdc.go#L138-L174","documentation":"The innermost UDP send in sendUDP failed at conn.Write: the datagram could not be handed to the socket for the remote KDC address embedded in the message. This is a write-side failure (for example network unreachable or an invalid socket), and it propagates up into the per-KDC error list aggregated by sendToKDCUdp.","triggerScenarios":"Routing to the KDC subnet missing (network unreachable); the connection already closed underneath the caller; local firewall rejecting the outgoing datagram.","commonSituations":"Containers or CI runners without routes to the AD segment; scanning hosts where the VPN dropped mid-run; transient interface changes during long scans.","solutions":["Verify IP-level reachability of the KDC host (ping / traceroute to the DC)","Check local firewall or iptables rules blocking outbound UDP","Retry the request; if it persists, switch expectations to the TCP path"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const resp = kerberos.SendToKDC(client, msg);\n} catch (e) {\n  // UDP write failed to the KDC: check routing/firewall for the DC address in the message\n}","preventionTips":["Verify IP reachability of domain controllers before the scan","Retry once for transient routing issues before concluding failure"],"tags":["kerberos","udp","network"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}