Skip to content

Retina pod crashes when nil ip is passed to enricher #1909

@LakshK98

Description

@LakshK98

The enricher code does not check if the ip pointer passed to it is null before dereferencing it which can cause the pod to crash with the following error.

ts=2025-10-06T18:54:25.884Z level=error caller=enricher/enricher.go:110 msg="IP version is not supported" IPVersion=IPv6
ts=2025-10-06T18:54:25.884Z level=error caller=enricher/enricher.go:110 msg="IP version is not supported" IPVersion=IPv6
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x38 pc=0x1ed7e3e]

goroutine 47 [running]:
github.com/microsoft/retina/pkg/enricher.(*Enricher).enrich(0xc0009053c0, 0x27ff9fa?)
        /go/src/github.com/microsoft/retina/pkg/enricher/enricher.go:109 +0x3e
github.com/microsoft/retina/pkg/enricher.(*Enricher).Run.func1()
        /go/src/github.com/microsoft/retina/pkg/enricher/enricher.go:89 +0x1dc
created by github.com/microsoft/retina/pkg/enricher.(*Enricher).Run in goroutine 1
        /go/src/github.com/microsoft/retina/pkg/enricher/enricher.go:69 +0x4f

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions