owasp-amass / amass

In-depth attack surface mapping and asset discovery
https://owasp.org/www-project-amass/
Other
11.95k stars 1.88k forks source link

issue panic #640

Open knowthetech opened 3 years ago

knowthetech commented 3 years ago

panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0xdc419e]

goroutine 5081 [running]: github.com/yuin/gopher-lua.(LState).PCall.func1(0x18e3488, 0xc0000e6f20, 0xc027271a28, 0x0, 0x0, 0x0) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:2012 +0x11e panic(0xf397e0, 0x20c0fe0) /usr/local/go/src/runtime/panic.go:965 +0x1b9 github.com/yuin/gopher-lua.callGFunction(0xc0000e6f20, 0x0, 0xc015fd8800) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:262 +0x1f7 github.com/yuin/gopher-lua.init.3.func26(0xc0000e6f20, 0xc07c1c0203, 0xc015fa8000, 0x0) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:817 +0x39d github.com/yuin/gopher-lua.mainLoopWithContext(0xc0000e6f20, 0xc015fa8000) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:60 +0x126 github.com/yuin/gopher-lua.(LState).callR(0xc0000e6f20, 0x2, 0x0, 0x0) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1203 +0x256 github.com/yuin/gopher-lua.(LState).Call(...) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1959 github.com/yuin/gopher-lua.(LState).PCall(0xc0000e6f20, 0x2, 0x0, 0x0, 0x19e24e0, 0xc025401380) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:2022 +0x114 github.com/yuin/gopher-lua.(LState).CallByParam(0xc0000e6f20, 0x19f6938, 0xc015fd9240, 0x0, 0x1, 0x0, 0xc01b7d9af0, 0x2, 0x2, 0xc000032000, ...) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:2040 +0xe9 github.com/OWASP/Amass/v3/datasrcs/scripting.(Script).dnsRequest(0xc00020bb80, 0x19f4bb8, 0xc012694390, 0xc004c12540) /root/go/pkg/mod/github.com/!o!w!a!s!p/!amass/v3@v3.11.10/datasrcs/scripting/script.go:301 +0x3a6 github.com/OWASP/Amass/v3/datasrcs/scripting.(Script).OnRequest(0xc00020bb80, 0x19f4bb8, 0xc012694390, 0xf53be0, 0xc004c12540) /root/go/pkg/mod/github.com/!o!w!a!s!p/!amass/v3@v3.11.10/datasrcs/scripting/script.go:267 +0x119 reflect.Value.call(0xf04360, 0xc004c0c408, 0x13, 0x107cca0, 0x4, 0xc00c6d3ce0, 0x2, 0x2, 0x2, 0xc0030bc960, ...) /usr/local/go/src/reflect/value.go:476 +0x8e7 reflect.Value.Call(0xf04360, 0xc004c0c408, 0x13, 0xc00c6d3ce0, 0x2, 0x2, 0xffffffffffffffff, 0xc015fd2d00, 0xeca5e0) /usr/local/go/src/reflect/value.go:337 +0xb9 github.com/caffix/service.(BaseService).processRequests.func1(0xeca6a0, 0xc00c6d3d10) /root/go/pkg/mod/github.com/caffix/service@v0.0.0-20210202222504-bfa33e78ab27/base.go:171 +0x176 github.com/caffix/queue.(queue).Process(0xc015fd2d80, 0xc01630aea0) /root/go/pkg/mod/github.com/caffix/queue@v0.0.0-20210301212750-6e488abe1004/queue.go:170 +0x52 github.com/caffix/service.(BaseService).processRequests(0xc00020bb80) /root/go/pkg/mod/github.com/caffix/service@v0.0.0-20210202222504-bfa33e78ab27/base.go:180 +0xb8 created by github.com/caffix/service.(*BaseService).Start /root/go/pkg/mod/github.com/caffix/service@v0.0.0-20210202222504-bfa33e78ab27/base.go:50 +0x12c

karllundgren commented 3 years ago

I am seeing a similar issue amass_panic_error

geeknik commented 3 years ago

Ran into an issue similar to OP...

Formatting enumeration findings for sharing
Sharing enumeration findings
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0xdf5b1e]

goroutine 340 [running]:
github.com/yuin/gopher-lua.(*LState).PCall.func1(0x19b1680, 0xc0002aaf20, 0xc01b4ffa30, 0x0, 0x0, 0x0)
        /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20210529063254-f4c35e4016d9/state.go:2020 +0x11e
panic(0xfc78c0, 0x21fbb20)
        /usr/local/go/src/runtime/panic.go:965 +0x1b9
github.com/yuin/gopher-lua.callGFunction(0xc0002aaf20, 0x0, 0xc002367a40)
        /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20210529063254-f4c35e4016d9/vm.go:262 +0x1f7
github.com/yuin/gopher-lua.init.3.func26(0xc0002aaf20, 0xc07c080603, 0xc00241c000, 0x0)
        /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20210529063254-f4c35e4016d9/vm.go:821 +0x39d
github.com/yuin/gopher-lua.mainLoopWithContext(0xc0002aaf20, 0xc00241c000)
        /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20210529063254-f4c35e4016d9/vm.go:60 +0x126
github.com/yuin/gopher-lua.(*LState).callR(0xc0002aaf20, 0x2, 0x0, 0x0)
        /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20210529063254-f4c35e4016d9/state.go:1211 +0x256
github.com/yuin/gopher-lua.(*LState).Call(...)
        /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20210529063254-f4c35e4016d9/state.go:1967
github.com/yuin/gopher-lua.(*LState).PCall(0xc0002aaf20, 0x2, 0x0, 0x0, 0x1abb860, 0xc0046143c0)
        /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20210529063254-f4c35e4016d9/state.go:2030 +0x114
github.com/yuin/gopher-lua.(*LState).CallByParam(0xc0002aaf20, 0x1ad0d38, 0xc00237ecc0, 0x0, 0x1, 0x0, 0xc003c62ae8, 0x2, 0x2, 0x40c13f, ...)
        /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20210529063254-f4c35e4016d9/state.go:2048 +0xe9
github.com/OWASP/Amass/v3/datasrcs/scripting.(*Script).dnsRequest(0xc000231b80, 0x1acebf8, 0xc012ed92c0, 0xc003d6a720)
        /root/go/pkg/mod/github.com/!o!w!a!s!p/!amass/v3@v3.13.2/datasrcs/scripting/script.go:318 +0x31d
github.com/OWASP/Amass/v3/datasrcs/scripting.(*Script).OnRequest(0xc000231b80, 0x1acebf8, 0xc012ed92c0, 0xfe3700, 0xc003d6a720)
        /root/go/pkg/mod/github.com/!o!w!a!s!p/!amass/v3@v3.13.2/datasrcs/scripting/script.go:268 +0x24d
reflect.Value.call(0xf90d20, 0xc003a76798, 0x13, 0x111f5d2, 0x4, 0xc012ed9e60, 0x2, 0x2, 0x2, 0xc002304900, ...)
        /usr/local/go/src/reflect/value.go:476 +0x8e7
reflect.Value.Call(0xf90d20, 0xc003a76798, 0x13, 0xc012ed9e60, 0x2, 0x2, 0xffffffffffffffff, 0xf54000, 0xc003a36c80)
        /usr/local/go/src/reflect/value.go:337 +0xb9
github.com/caffix/service.(*BaseService).processRequests.func1(0xf54420, 0xc012ed9ec0)
        /root/go/pkg/mod/github.com/caffix/service@v0.0.0-20210522041423-4707edf94ff2/base.go:164 +0x169
github.com/caffix/queue.(*queue).Process(0xc008938d80, 0xc003a086c0)
        /root/go/pkg/mod/github.com/caffix/queue@v0.0.0-20210420232735-50705a598e3e/queue.go:170 +0x52
github.com/caffix/service.(*BaseService).processRequests(0xc000231b80)
        /root/go/pkg/mod/github.com/caffix/service@v0.0.0-20210522041423-4707edf94ff2/base.go:173 +0x86
created by github.com/caffix/service.(*BaseService).Start
        /root/go/pkg/mod/github.com/caffix/service@v0.0.0-20210522041423-4707edf94ff2/base.go:50 +0x12c

our command line: amass enum -rf $resolvers -passive -share -config $config -d $domain

fabaff commented 3 years ago

I assume that the failing test is related to this.

  panic(0x9240e0, 0xdcc930)
     runtime/panic.go:965 +0x1b9
  github.com/OWASP/Amass/v3/net/http.TestPullCertificateNames(0xc0000ce180)
        github.com/OWASP/Amass/v3/net/http/http_test.go:23 +0x9f
  testing.tRunner(0xc0000ce180, 0x9dff88)
     testing/testing.go:1193 +0xef
  created by testing.(*T).Run
    testing/testing.go:1238 +0x2b3
  FAIL   github.com/OWASP/Amass/v3/net/http      0.008s
  FAIL
alfonsocaponi commented 3 years ago

v3.11.11 on Ubuntu 18.04.6 LTS

panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0xdc63de]

goroutine 4361 [running]: github.com/yuin/gopher-lua.(LState).PCall.func1(0x18e7498, 0xc00f1a14a0, 0xc0145bba30, 0x0, 0x0, 0x0) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:2012 +0x11e panic(0xf3cce0, 0x1fdf7c0) /snap/go/7221/src/runtime/panic.go:965 +0x1b9 github.com/yuin/gopher-lua.callGFunction(0xc00f1a14a0, 0x0, 0xc01050d640) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:262 +0x1f7 github.com/yuin/gopher-lua.init.3.func26(0xc00f1a14a0, 0xc07c1c0403, 0xc014552000, 0x0) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:817 +0x39d github.com/yuin/gopher-lua.mainLoopWithContext(0xc00f1a14a0, 0xc014552000) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/vm.go:60 +0x126 github.com/yuin/gopher-lua.(LState).callR(0xc00f1a14a0, 0x2, 0x0, 0x0) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1203 +0x256 github.com/yuin/gopher-lua.(LState).Call(...) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:1959 github.com/yuin/gopher-lua.(LState).PCall(0xc00f1a14a0, 0x2, 0x0, 0x0, 0x19e6660, 0xc019b752c0) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:2022 +0x114 github.com/yuin/gopher-lua.(LState).CallByParam(0xc00f1a14a0, 0x19faab8, 0xc01050de40, 0x0, 0x1, 0x0, 0xc0005b0ae8, 0x2, 0x2, 0x40caff, ...) /root/go/pkg/mod/github.com/yuin/gopher-lua@v0.0.0-20200816102855-ee81675732da/state.go:2040 +0xe9 github.com/OWASP/Amass/v3/datasrcs/scripting.(Script).dnsRequest(0xc010392280, 0x19f8d38, 0xc00e003980, 0xc011e285a0) /root/parts/amass/build/datasrcs/scripting/script.go:320 +0x31d github.com/OWASP/Amass/v3/datasrcs/scripting.(Script).OnRequest(0xc010392280, 0x19f8d38, 0xc00e003980, 0xf57360, 0xc011e285a0) /root/parts/amass/build/datasrcs/scripting/script.go:270 +0x24d reflect.Value.call(0xf07680, 0xc000121980, 0x13, 0x1080bbe, 0x4, 0xc00e003b60, 0x2, 0x2, 0x2, 0xc00a3a3b00, ...) /snap/go/7221/src/reflect/value.go:476 +0x8e7 reflect.Value.Call(0xf07680, 0xc000121980, 0x13, 0xc00e003b60, 0x2, 0x2, 0xffffffffffffffff, 0xecd800, 0xc011de04c0) /snap/go/7221/src/reflect/value.go:337 +0xb9 github.com/caffix/service.(BaseService).processRequests.func1(0xecd920, 0xc00e003b90) /root/go/pkg/mod/github.com/caffix/service@v0.0.0-20210321183606-3819810293b0/base.go:164 +0x169 github.com/caffix/queue.(queue).Process(0xc00e2fd0e0, 0xc011d94030) /root/go/pkg/mod/github.com/caffix/queue@v0.0.0-20210301212750-6e488abe1004/queue.go:170 +0x52 github.com/caffix/service.(BaseService).processRequests(0xc010392280) /root/go/pkg/mod/github.com/caffix/service@v0.0.0-20210321183606-3819810293b0/base.go:173 +0x86 created by github.com/caffix/service.(*BaseService).Start /root/go/pkg/mod/github.com/caffix/service@v0.0.0-20210321183606-3819810293b0/base.go:50 +0x12c