-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hi Barrett
I tested this project and encountered SIGSEGV issues several times. It seems like some kind of buffer overflow is happening on miekg/dns
sudo ./blind -server-listen 0.0.0.0:53 -server-dest 127.0.0.1:22
2025/07/03 09:44:45 Starting DNS tunnel server:
2025/07/03 09:44:45 DNS listening on: 0.0.0.0:5353
2025/07/03 09:44:45 Forwarding to: 127.0.0.1:22
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x64caa1]
goroutine 1106 [running]:
blind/tunnel.(*DNSServer).handlePoll(0xc0000bc200?, 0xc000218780)
/users/lab/blind/tunnel/server.go:244 +0xa1
blind/tunnel.(*DNSServer).handleDNSRequest(0xc0000bc200, {0x73abf0, 0xc0003e4780}, 0xc00034a5a0)
/users/lab/blind/tunnel/server.go:335 +0xc9a
github.com/miekg/dns.HandlerFunc.ServeDNS(0xc0000ae120?, {0x73abf0?, 0xc0003e4780?}, 0x10?)
/users/lab/go/pkg/mod/github.com/miekg/dns@v1.1.62/server.go:37 +0x29
github.com/miekg/dns.(*ServeMux).ServeDNS(0xc00020c600?, {0x73abf0?, 0xc0003e4780?}, 0xc00034a5a0?)
/users/lab/go/pkg/mod/github.com/miekg/dns@v1.1.62/serve_mux.go:103 +0x6e
github.com/miekg/dns.(*Server).serveDNS(0xc0000e0360, {0xc00020c600, 0x30, 0x200}, 0xc0003e4780)
/users/lab/go/pkg/mod/github.com/miekg/dns@v1.1.62/server.go:680 +0x44d
github.com/miekg/dns.(*Server).serveUDPPacket(0xc0000e0360, 0xc000014250, {0xc00020c600, 0x30, 0x200}, {0x7387d0, 0xc000090050}, 0xc0001d01c0, {0x0, 0x0})
/users/lab/go/pkg/mod/github.com/miekg/dns@v1.1.62/server.go:621 +0x1a5
created by github.com/miekg/dns.(*Server).serveUDP in goroutine 1
/users/lab/go/pkg/mod/github.com/miekg/dns@v1.1.62/server.go:551 +0x41a