Skip to content

panic: nil pointer dereference in ScanTLS on v0.2.2 when scanning some TLS targets #38

Description

@PINguin1412

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions