Comments (8)
Still the same for me.
@RamanaReddy0M Can you also try to reproduce this, please? Thanks!
from naabu.
I'm also couldn't reproduce the issue - dev branch
from naabu.
I couldn't repro the issue - used the dev branch for testing.
from naabu.
I couldn't repro the issue - used the dev branch for testing.
... idk why, but I reproduce that in dev branch as well.
here is the path when panic occurred:
- log "syn scan is not possible, falling back to connect scan" (scan.go, line: 173)
- change scan type to "c", then acquire handler again
- call NewListenHandler() at scan_common.go, line: 51
- NewListenHandler does not init TcpConn4 chan
- sendWithConn(ip, listenHandler.TcpConn4, &tcp) called at scan_unix.go, line: 245
- conn.WriteTo(buf.Bytes(), &net.IPAddr{IP: net.ParseIP(destIP)}) called at scan_unix.go, line: 455
- panic at !c.ok() at go/src/net/iprawsocket.go, line: 171
idk why it panic, since c.ok() checks nil pointer... but it happens.
my device is Apple M1 Pro, macOS 14.5, go version go1.21.8 darwin/arm64.
from naabu.
@iuliu8899 Can you provide the specific error message that appears when you attempt to use the dev
branch?
from naabu.
GOROOT=/usr/local/go #gosetup
GOPATH=/Users/qq/go #gosetup
GONOPROXY= #gosetup
/usr/local/go/bin/go test -c -o /Users/qq/Library/Caches/JetBrains/GoLand2024.1/tmp/GoLand/___TestAliveScanIpConcurrently_in_test.test -gcflags all=-N -l test #gosetup
/usr/local/go/bin/go tool test2json -t /Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/macarm/dlv --listen=127.0.0.1:56190 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /Users/qq/Library/Caches/JetBrains/GoLand2024.1/tmp/GoLand/___TestAliveScanIpConcurrently_in_test.test -- -test.v -test.paniconexit0 -test.run ^\QTestAliveScanIpConcurrently\E$
API server listening at: 127.0.0.1:56190
=== RUN TestAliveScanIpConcurrently
[INF] Running host discovery scan
[INF] syn scan is not possible, falling back to connect scan
[INF] Running host discovery scan
[INF] syn scan is not possible, falling back to connect scan
[INF] syn scan is not possible, falling back to connect scan
[INF] Running host discovery scan
[INF] Running host discovery scan
[INF] Found alive host 192.168.110.112 (192.168.110.112)
192.168.110.112
[INF] Found alive host 192.168.110.42 (192.168.110.42)
192.168.110.42
[INF] Found alive host 192.168.110.43 (192.168.110.43)
192.168.110.43
[INF] Found alive host 192.168.110.32 (192.168.110.32)
192.168.110.32
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x104c45a90]
goroutine 31 [running]:
net.(*IPConn).WriteTo(0x0, {0x14000026c90, 0x18, 0x18}, {0x106557680, 0x14000309710})
/usr/local/go/src/net/iprawsock.go:171 +0x40
github.com/projectdiscovery/naabu/v2/pkg/scan.sendWithConn({0x140010293a0, 0xe}, {0x106562850, 0x0}, {0x14001119928, 0x1, 0x1})
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:455 +0x1d0
github.com/projectdiscovery/naabu/v2/pkg/scan.sendAsyncTCP4(0x140005f86e0, {0x140010293a0, 0xe}, 0x14000b13038, 0x0)
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:245 +0xfe0
github.com/projectdiscovery/naabu/v2/pkg/scan.SendAsyncPkg(0x140005f86e0, {0x140010293a0, 0xe}, 0x14000b13038, 0x0)
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:164 +0x1bc
github.com/projectdiscovery/naabu/v2/pkg/scan.TransportWriteWorker()
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:152 +0xa8
created by github.com/projectdiscovery/naabu/v2/pkg/scan.init.3 in goroutine 1
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:119 +0x1504
Debugger finished with the exit code 0
from naabu.
@iuliu8899 I've pushed a brand called debug_nil_deref
. Can you please try with that branch and send us the output? Thanks!
from naabu.
GOROOT=/usr/local/go #gosetup
GOPATH=/Users/qq/go #gosetup
GONOPROXY= #gosetup
/usr/local/go/bin/go test -c -o /Users/qq/Library/Caches/JetBrains/GoLand2024.1/tmp/GoLand/___TestAliveScanIpConcurrently_in_test.test -gcflags all=-N -l test #gosetup
/usr/local/go/bin/go tool test2json -t /Applications/GoLand.app/Contents/plugins/go-plugin/lib/dlv/macarm/dlv --listen=127.0.0.1:64480 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec /Users/qq/Library/Caches/JetBrains/GoLand2024.1/tmp/GoLand/___TestAliveScanIpConcurrently_in_test.test -- -test.v -test.paniconexit0 -test.run ^\QTestAliveScanIpConcurrently\E$
API server listening at: 127.0.0.1:64480
[INF] Initialized TcpConn4: &{{0x14000c3a300}}
[INF] Initialized UdpConn4: &{{0x14000c3a380}}
[INF] Initialized TcpConn6: &{{0x14000c3a400}}
[INF] Initialized UdpConn6: &{{0x14000c3a480}}
=== RUN TestAliveScanIpConcurrently
[INF] Running host discovery scan
[INF] TcpConn4 before sendWithConn: &{{0x14000c3a300}}
[INF] TcpConn4 before sendWithConn: &{{0x14000c3a300}}
[INF] TcpConn4 before sendWithConn: &{{0x14000c3a300}}
[INF] TcpConn4 before sendWithConn: &{{0x14000c3a300}}
[INF] TcpConn4 before sendWithConn: &{{0x14000c3a300}}
[INF] TcpConn4 before sendWithConn: &{{0x14000c3a300}}
[INF] TcpConn4 before sendWithConn: &{{0x14000c3a300}}
[INF] TcpConn4 before sendWithConn: &{{0x14000c3a300}}
[INF] syn scan is not possible, falling back to connect scan
[INF] syn scan is not possible, falling back to connect scan
[INF] Running host discovery scan
[INF] TcpConn4 before sendWithConn: <nil>
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1027c1490]
goroutine 15 [running]:
net.(*IPConn).WriteTo(0x0, {0x14000c92060, 0x18, 0x18}, {0x1040d3680, 0x14000d1a450})
/usr/local/go/src/net/iprawsock.go:171 +0x40
github.com/projectdiscovery/naabu/v2/pkg/scan.sendWithConn({0x14000a9f190, 0xe}, {0x1040de850, 0x0}, {0x14000d7f900, 0x1, 0x1})
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:465 +0x1d0
github.com/projectdiscovery/naabu/v2/pkg/scan.sendAsyncTCP4(0x140006a4b40, {0x14000a9f190, 0xe}, 0x14000c391a0, 0x0)
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:252 +0x1070
github.com/projectdiscovery/naabu/v2/pkg/scan.SendAsyncPkg(0x140006a4b40, {0x14000a9f190, 0xe}, 0x14000c391a0, 0x0)
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:170 +0x1bc
github.com/projectdiscovery/naabu/v2/pkg/scan.TransportWriteWorker()
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:158 +0xa8
created by github.com/projectdiscovery/naabu/v2/pkg/scan.init.3 in goroutine 1
/Users/qq/opensource/naabu/v2/pkg/scan/scan_unix.go:125 +0x1744
Debugger finished with the exit code 0
from naabu.
Related Issues (20)
- Port spray support HOT 2
- v2.3.0 gives internal nil pointer on "phase.RLock()" but 2.2.1 does work. HOT 10
- No valid ipv4 or ipv6 targets were found when running as root in Ubuntu on certain hosts HOT 6
- error while loading shared libraries HOT 2
- version does't provide valid work with -c and rate HOT 2
- Gets ports with non-root access but dosent work with root access. HOT 2
- -rate is breaking the script without result HOT 2
- Potentially switch to github.com/gopacket/gopacket instead of github.com/google/gopacket ? HOT 1
- can't run naabu on mac with sudo HOT 3
- Statistical inaccuracy HOT 7
- is there any nmap output? HOT 1
- An error occurred during runtime
- naabu does not work with sudo su HOT 1
- Logical improvement on the number of retries
- Naabu outputs unrelated IP when it runs simultaneously with Nuclei HOT 1
- Service Version Discovery "-sV" Has No Effect
- why there's no EthernetWriteWorker init? program is hung
- Context.Cancel RunEnumeration spends a lot of time
- centos使用不了 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naabu.