celzero / firestack

Userspace wireguard and network monitor
https://rethinkdns.com/app
Mozilla Public License 2.0
100 stars 16 forks source link

nil ptr in alg.go:q #93

Closed ignoramous closed 2 months ago

ignoramous commented 2 months ago
12 September 2024, 00:44:17: F r.reply.do [11] runtime error: invalid memory address or nil pointer dereference
 (#1)
12 September 2024, 00:44:17: goroutine 558598 [running]:
github.com/celzero/firestack/intra/log.(*simpleLogger).Stack(0x40000fa1c0, 0x0, {0x400a03fec0?, 0x400a03fc80?}, {0x400b366000, 0x10000, 0x10000})
    /home/jitpack/build/intra/log/logger.go:396 +0x2c0
github.com/celzero/firestack/intra/log.C({0x400a03fc80, 0x51}, {0x400b366000, 0x10000, 0x10000})
    /home/jitpack/build/intra/log/log.go:137 +0xf8
github.com/celzero/firestack/intra/core.trace(0x40000fa1c0?, {0x400a03fc80, 0x51})
    /home/jitpack/build/intra/core/dontpanic.go:101 +0x198
github.com/celzero/firestack/intra/core.Recover(0xb, {0x73c2ba69e8, 0xa})
    /home/jitpack/build/intra/core/dontpanic.go:74 +0x13c
panic({0x73c3324680?, 0x73c3884530?})
    /home/jitpack/golang/go/src/runtime/panic.go:785 +0x124
github.com/celzero/firestack/intra/dnsx.(*dnsgateway).q(0x4000152480, {0x73c341bbc0?, 0x4008b1e790?}, {0x0, 0x0}, {0x400a6f31b0?, 0x0?, 0x1?}, {0x400a002db8, 0x8}, ...)
    /home/jitpack/build/intra/dnsx/alg.go:357 +0x908
github.com/celzero/firestack/intra/dnsx.(*resolver).forward(0x400017c270, {0x4009b00800, 0x1e, 0x800}, {0x0, 0x0, 0x0})
    /home/jitpack/build/intra/dnsx/transport.go:489 +0xcd4
github.com/celzero/firestack/intra/dnsx.(*resolver).dnsudp(0x0?, {0x4009b00800?, 0x0?, 0x0?}, {0x7453792570, 0x4009df42a0})
    /home/jitpack/build/intra/dnsx/transport.go:640 +0x38
github.com/celzero/firestack/intra/dnsx.(*resolver).reply.func2()
    /home/jitpack/build/intra/dnsx/transport.go:680 +0x74
github.com/celzero/firestack/intra/core.Gx.func1()
    /home/jitpack/build/intra/core/async.go:55 +0x5c
created by github.com/celzero/firestack/intra/core.Gx in goroutine 558656
    /home/jitpack/build/intra/core/async.go:52 +0x7c
addn logs: before nil ptr: ```sh 12 September 2024, 00:44:17: D dnsutil: svcb/https(encrypted-tbn0.gstatic.com): ip hints [] from 0 answers V doh: (p/px udp:Base/Base); len(res): 0, data: --, via: , err? D cache: put(encrypted-tbn0.gstatic.com:65): l(false/0); bumps=0; expiry=2024-09-11 19:24:17.687972458 +0000 UTC m=+158186.538026779; s=type: DNS-over-HTTPS, id: CachePreferred, latency: 23.131836, qname: , rdata: --, rcode: 0, rttl: 0, server: sky.rethinkdns.com, relay: , status: 1, blocklists: , msg: , loc: CDG V doh: (p/px udp:Base/Base); len(res): 2, data: 104.244.42.130, via: , err? VV ns: tun(257): WritePackets (to tun): written(1)/total(1) D dns64: net(udp:Base), no-op q(api.x.com.), q6(false), ans6(false), force64(false), ans0000(false) D dns64: net(udp:Base), no-op q(api.x.com.), q6(false), ans6(false), force64(false), ans0000(false) D dns64: net(udp:Base), no-op q(api.x.com.), q6(false), ans6(false), force64(false), ans0000(false) D wall: no blockA for api.x.com.; blocklist-stamp? (0) / rdnsr? (true) D rdns: blockAnswer: no block for target tpop-api.x.com, qname api.x.com. D wall: answer for api.x.com. not blocked answers not in blocklist 1:4AUCAAQAAAEQcCAA VV ns: tun(257): WritePackets (to tun): written(1)/total(1) D alg: api.x.com a6(a 0 / h 0 / s false) : a4(a 1 / h 0 / s true) V alg: resolv: api.x.com -> real ip4 4, ip6 4; stale [] V alg: resolv: api.x.com -> secondary ip4 4, ip6 0; stale [] D alg: subst; for api.x.com / prev targets [api.x.com tpop-api.x.com api.x.com tpop-api.x.com]; prev ips (alg? true / fix? false); v4: [104.244.42.130 104.244.42.194 104.244.42.66 104.244.42.2], v6: [64:ff9b:1:fffe::68f4:2a42 64:ff9b:1:fffe::68f4:2ac2 64:ff9b:1:fffe::68f4:2a02 64:ff9b:1:fffe::68f4:2a82]; sec4: [104.244.42.194 104.244.42.130 104.244.42.66 104.244.42.2], sec6: [] D alg: ok; domains [api.x.com tpop-api.x.com] real: [104.244.42.66 104.244.42.2 64:ff9b:1:fffe::68f4:2a42 64:ff9b:1:fffe::68f4:2ac2 64:ff9b:1:fffe::68f4:2a02 64:ff9b:1:fffe::68f4:2a82 104.244.42.130 104.244.42.194] / fix: [] => subst [100.79.71.108]; mod? true; sec [104.244.42.130 104.244.42.194 104.244.42.66 104.244.42.2] D wall: no blockA for api.x.com.; blocklist-stamp? (0) / rdnsr? (true) D rdns: blockAnswer: no block for target tpop-api.x.com, qname api.x.com. D wall: answer for api.x.com. not blocked answers not in blocklist 1:4AUCAAQAAAEQcCAA D dns64: net(udp:Base), no-op q(api.x.com.), q6(false), ans6(false), force64(false), ans0000(false) D wall: no blockA for api.x.com.; blocklist-stamp? (0) / rdnsr? (true) V dns: fwd: query api.x.com; new-ans? false, blocklists? false, blocked? false D rdns: blockAnswer: no block for target tpop-api.x.com, qname api.x.com. D wall: answer for api.x.com. not blocked answers not in blocklist 1:4AUCAAQAAAEQcCAA D dns64: net(udp:Base), no-op q(api.x.com.), q6(false), ans6(false), force64(false), ans0000(false) D alg: api.x.com a6(a 0 / h 0 / s false) : a4(a 1 / h 0 / s true) VV ns: tun(257): WritePackets (to tun): written(1)/total(1) V alg: resolv: api.x.com -> real ip4 4, ip6 4; stale [] V alg: resolv: api.x.com -> secondary ip4 4, ip6 0; stale [] D wall: no blockA for api.x.com.; blocklist-stamp? (0) / rdnsr? (true) D rdns: blockAnswer: no block for target tpop-api.x.com, qname api.x.com. D wall: answer for api.x.com. not blocked answers not in blocklist 1:4AUCAAQAAAEQcCAA D alg: subst; for api.x.com / prev targets [api.x.com tpop-api.x.com api.x.com tpop-api.x.com]; prev ips (alg? true / fix? false); v4: [104.244.42.66 104.244.42.2 104.244.42.130 104.244.42.194], v6: [64:ff9b:1:fffe::68f4:2a42 64:ff9b:1:fffe::68f4:2ac2 64:ff9b:1:fffe::68f4:2a02 64:ff9b:1:fffe::68f4:2a82]; sec4: [104.244.42.130 104.244.42.194 104.244.42.66 104.244.42.2], sec6: [] D wall: no blockA for api.x.com.; blocklist-stamp? (0) / rdnsr? (true) D rdns: blockAnswer: no block for target tpop-api.x.com, qname api.x.com. D alg: ok; domains [api.x.com tpop-api.x.com] real: [64:ff9b:1:fffe::68f4:2a42 64:ff9b:1:fffe::68f4:2ac2 64:ff9b:1:fffe::68f4:2a02 64:ff9b:1:fffe::68f4:2a82 104.244.42.130 104.244.42.66 104.244.42.2 104.244.42.194] / fix: [] => subst [100.79.71.108]; mod? true; sec [104.244.42.130 104.244.42.194 104.244.42.66 104.244.42.2] D wall: no blockA for api.x.com.; blocklist-stamp? (0) / rdnsr? (true) D rdns: blockAnswer: no block for target tpop-api.x.com, qname api.x.com. D wall: answer for api.x.com. not blocked answers not in blocklist 1:4AUCAAQAAAEQcCAA D wall: no blockA for api.x.com.; blocklist-stamp? (0) / rdnsr? (true) D rdns: blockAnswer: no block for target tpop-api.x.com, qname api.x.com. D wall: answer for api.x.com. not blocked answers not in blocklist 1:4AUCAAQAAAEQcCAA D wall: answer for api.x.com. not blocked answers not in blocklist 1:4AUCAAQAAAEQcCAA V dns: fwd: query api.x.com; new-ans? false, blocklists? false, blocked? false V retrier: read: [100.109.163.45:43788<-172.67.214.246:443] 633; err: VV ns: tun(257): WritePackets (to tun): written(1)/total(1) VV ns: tun(257): WritePackets (to tun): written(1)/total(1) V doh: closed response V doh: (p/px udp:Base/Base); len(res): 0, data: --, via: , err? D cache: put(pool.ntp.org:28): l(false/0); bumps=0; expiry=2024-09-11 19:24:17.689912766 +0000 UTC m=+158186.539966856; s=type: DNS-over-HTTPS, id: CachePreferred, latency: 19.653553, qname: , rdata: --, rcode: 0, rttl: 0, server: sky.rethinkdns.com, relay: , status: 1, blocklists: , msg: , loc: CDG D dns64: attempt underlay/local464 resolver ip64 w len(1) D cache: hit(k: pool.ntp.org:1 / stale? true / ans? true): bumps=10; expiry=2024-09-11 17:21:10.323264644 +0000 UTC m=+153362.707551491; s=type: DNS-over-HTTPS, id: CachePreferred, latency: 0.242502, qname: , rdata: 217.144.138.234,3.121.254.221,207.180.217.145,193.203.3.171, rcode: 0, rttl: 65, server: sky.rethinkdns.com, relay: , status: 1, blocklists: , msg: , loc: CDG D dns64: upstream(udp/Base): q(pool.ntp.org.) / a(true) / e() / e-not-nil(false) D dns64: translated response([pool.ntp.org. 15 IN AAAA 64:ff9b:1:fffe::d990:8aea pool.ntp.org. 15 IN AAAA 64:ff9b:1:fffe::379:fedd pool.ntp.org. 15 IN AAAA 64:ff9b:1:fffe::cfb4:d991 pool.ntp.org. 15 IN AAAA 64:ff9b:1:fffe::c1cb:3ab]) D alg: dns64; s/ans(0)/ans64(4) I cache: del: 0; ref: 0; tot: 11 / high? false V doh: closed response D dnsutil: svcb/https(x.com): ip hints [] from 0 answers D dnsutil: svcb/https(x.com): ip hints [] from 0 answers V doh: (p/px udp:Base/Base); len(res): 0, data: --, via: , err? D cache: put(x.com:65): l(false/0); bumps=0; expiry=2024-09-11 19:24:17.69031115 +0000 UTC m=+158186.540365240; s=type: DNS-over-HTTPS, id: CachePreferred, latency: 19.197659, qname: , rdata: --, rcode: 0, rttl: 0, server: sky.rethinkdns.com, relay: , status: 1, blocklists: , msg: , loc: CDG D dns64: net(udp:Base), no-op q(x.com.), q6(false), ans6(false), force64(false), ans0000(false) D alg: skip; query(n:x.com / a:0) hasq(true) hasans(false) rgood(true), ans0000(false) D wall: no blockA for x.com.; blocklist-stamp? (0) / rdnsr? (true) D wall: answer for x.com. not blocked req at least one answer V dns: fwd: query x.com; new-ans? false, blocklists? false, blocked? false VV ns: tun(257): WritePackets (to tun): written(1)/total(1) D alg: skip; sec transport NoTransport; nores? false, err? D dns64: net(udp:Base), no-op q(x.com.), q6(false), ans6(false), force64(false), ans0000(false) D alg: skip; query(n:x.com / a:0) hasq(true) hasans(false) rgood(true), ans0000(false) D wall: no blockA for x.com.; blocklist-stamp? (0) / rdnsr? (true) D dns64: net(udp:Base), no-op q(x.com.), q6(false), ans6(false), force64(false), ans0000(false) D wall: answer for x.com. not blocked req at least one answer D alg: skip; query(n:x.com / a:0) hasq(true) hasans(false) rgood(true), ans0000(false) V dns: fwd: query x.com; new-ans? false, blocklists? false, blocked? false D wall: no blockA for x.com.; blocklist-stamp? (0) / rdnsr? (true) D wall: answer for x.com. not blocked req at least one answer V dns: fwd: query x.com; new-ans? false, blocklists? false, blocked? false D alg: skip; sec transport NoTransport; nores? false, err? D dns64: net(udp:Base), no-op q(x.com.), q6(false), ans6(false), force64(false), ans0000(false) D alg: skip; query(n:x.com / a:0) hasq(true) hasans(false) rgood(true), ans0000(false) D wall: no blockA for x.com.; blocklist-stamp? (0) / rdnsr? (true) D wall: answer for x.com. not blocked req at least one answer V dns: fwd: query x.com; new-ans? false, blocklists? false, blocked? false D dns64: attempt underlay/local464 resolver ip64 w len(1) VV ns: tun(257): dispatch: done? false ```