projectdiscovery / subfinder

Fast passive subdomain enumeration tool.
https://projectdiscovery.io
MIT License
10.12k stars 1.27k forks source link

Panic: runtine error with large list of domains #490

Closed overlinden closed 2 years ago

overlinden commented 2 years ago

Subfinder version:

2.3.8

Current Behavior:

I started subfinder with this command subfinder -dL ../data/domains.txt -nW -o all_subdomains.lst -silent The domains list is quiet large and contains 3295 domains. After a couple of hours the application crashes and an error is shown:

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

goroutine 246201 [running]:
regexp.(*Regexp).allMatches(0x0, 0xc0012a0f00, 0x47, 0x0, 0x0, 0x0, 0x48, 0xc00197bea8)
        regexp/regexp.go:758 +0x127
regexp.(*Regexp).FindAllString(0x0, 0xc0012a0f00, 0x47, 0xffffffffffffffff, 0xc0012a0f00, 0x47, 0x0)
        regexp/regexp.go:1099 +0xb7
github.com/projectdiscovery/subfinder/pkg/subscraping/sources/threatminer.(*Source).Run.func1(0xc000a35680, 0xa39820, 0xc001ea63c0, 0xc0002ff630, 0xe, 0xc001562b40, 0xdca6b0)
        github.com/projectdiscovery/subfinder/pkg/subscraping/sources/threatminer/threatminer.go:39 +0x1e6
created by github.com/projectdiscovery/subfinder/pkg/subscraping/sources/threatminer.(*Source).Run
        github.com/projectdiscovery/subfinder/pkg/subscraping/sources/threatminer/threatminer.go:18 +0xa3

Expected Behavior:

The application should not crash

Steps To Reproduce:

Example: steps to reproduce the behavior:

  1. Run subfinder with a large list of domains
ehsandeep commented 2 years ago

@overlinden Can you try with latest version of the project, i.e v2.4.9

ehsandeep commented 2 years ago

This issue was resolved in a previous version of Subfinder; make sure you update to the latest version to avoid it.