panic: nil pointer dereference in ScanTLS on v0.2.2 when scanning some TLS targets
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start in scanner.go at ScanTLS around line 89 and reproduce the crash against TLS targets with the affected certificate chains. Inspect how leaf is obtained before SignatureAlgorithm and PublicKeyAlgorithm are accessed. Done means those targets no longer panic and the scanner still reports TLS information normally.
Written by the indexing model from the issue text.
Description
Hi,
I encountered a crash while using RealiTLScanner v0.2.2.
The scanner successfully connects to the target and prints TLS information, but then crashes with a nil pointer dereference inside ScanTLS.
Output:
time=2026-05-26T14:33:09.505Z level=INFO msg="Connected to target" feasible=true ip=79.137.196.197 origin=79.137.196.197 tls="TLS 1.3" alpn=h2 curve=X25519 cert-length="2719(certs count: 3)" cert-signature=ECDSA-SHA256 cert-publickey=ECDSA cert-domain=github.com cert-issuer="Sectigo Limited" geo=N/A
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x67f844]
goroutine 10 [running]:
main.ScanTLS(...)
/home/yu/go/src/github.com/xtls/RealiTLScanner/scanner.go:89
Environment:
OS: Linux
RealiTLScanner: v0.2.2
It looks like leaf may become nil before accessing fields like:
leaf.SignatureAlgorithm.String()
leaf.PublicKeyAlgorithm.String()
Maybe a nil check is needed before using leaf.
The issue seems reproducible on some TLS targets with specific certificate chains.
Thanks.
- Dominant language
- Go
- Stars
- 4.4k
- Forks
- 313
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from XTLS/RealiTLScanner
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
XTLS/RealiTLScanner#45 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
XTLS/RealiTLScanner#42 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
XTLS/RealiTLScanner#34 · 1 comment · 4 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
XTLS/RealiTLScanner#30 · 1 comment · 2 reactions ·
-
怎么或者说应该排除套了CDN的网站吗? Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
XTLS/RealiTLScanner#25 · 1 comment ·
All issues in XTLS/RealiTLScanner
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·