[BUG] SIGSEGV GetDomainFromFakeDNS panic: runtime error: invalid memory address or nil pointer dereference
Author: 4-FLOSS-Free-Libre-Open-Source-SoftwareCreated Jun 21, 2023Updated Aug 3, 2026
Labelsneed more
What version of V2Ray are you using?
5.7.0
What's your scenario of using V2Ray?
tproxy=>v2ray systemd
What problems have you encountered?
crash on start
What's your expectation?
Please attach your configuration here
Server configuration:
// Please attach your server configuration here.
Client configuration:
// Please attach your client configuration here.
Please attach error logs here
Server error log:
// Please attach your server error log here.
Client error log:
// Please attach your client error log here.
Please attach access log here
// Please attach your server access log here.
Other configurations (such as Nginx) and logs here
If V2Ray cannot start up, please attach output from --test command
If V2Ray service is abnormal, please attach journal log here
sudo systemctl restart v2ray && sudo journalctl -f -t v2ray
-- Journal begins at Wed 2023-06-21 --
v2ray[151723]: V2Ray 5.7.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19.8 linux/amd64)
v2ray[151723]: A unified platform for anti-censorship.
v2ray[151723]: Configuration OK.
v2ray[151747]: V2Ray 5.7.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19.8 linux/amd64)
v2ray[151747]: A unified platform for anti-censorship.
v2ray[151747]: panic: runtime error: invalid memory address or nil pointer dereference
v2ray[151747]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6d5dc0]
v2ray[151747]: goroutine 36 [running]:
v2ray[151747]: net.networkNumberAndMask(0x203000?)
v2ray[151747]: net/ip.go:498
v2ray[151747]: net.(*IPNet).Contains(0xc001e3e340?, {0xc001e3e3a0, 0x10, 0xc001fbc4f8?})
v2ray[151747]: net/ip.go:522 +0x27
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dns/fakedns.(*Holder).GetDomainFromFakeDNS(0xc001e3a5d0, {0x1363088, 0xc001e3e340})
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dns/fakedns/fake.go:139 +0x66
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dns/fakedns.(*HolderMulti).GetDomainFromFakeDNS(...)
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dns/fakedns/fake.go:182
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dns.(*FakeDNSEngine).GetDomainFromFakeDNS(0xc001e4a2d0?, {0x1363088, 0xc001e3e340})
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dns/fakedns.go:61 +0x69
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dispatcher.newFakeDNSSniffer.func1({0x1361680, 0xc001e4a2d0}, {0xc001e1fa90?, 0x5?, 0x5?})
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dispatcher/fakednssniffer.go:34 +0xa5
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dispatcher.(*Sniffer).SniffMetadata(0xc000012780, {0x1361680, 0xc001e4a2d0})
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dispatcher/sniffer.go:94 +0x1e6
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dispatcher.sniffer({0x1361680, 0xc001e4a2d0}, 0x0?, 0x0, 0x0?)
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dispatcher/default.go:247 +0x133
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dispatcher.(*DefaultDispatcher).Dispatch.func1()
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dispatcher/default.go:223 +0x134
v2ray[151747]: created by github.com/v2fly/v2ray-core/v5/app/dispatcher.(*DefaultDispatcher).Dispatch
v2ray[151747]: github.com/v2fly/v2ray-core/v5/app/dispatcher/default.go:218 +0x34a
v2ray[151796]: V2Ray 5.7.0 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.19.8 linux/amd64)
v2ray[151796]: A unified platform for anti-censorship.
v2ray[151796]: Configuration OK.
Source: v2fly/v2ray-core