From c547eb546279a1c84232f884bfbeef37b1cdb979 Mon Sep 17 00:00:00 2001 From: aarzilli Date: Mon, 17 Jul 2023 10:24:43 +0200 Subject: [PATCH] proc,ebpf: mark as unreadable args with unsupported types with ebpf Only a few types can be read with ebpf, mark everything else as unreadable so that there are no downstream crashes. Fixes #3443 --- pkg/proc/target.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/proc/target.go b/pkg/proc/target.go index 91d18584ac..a79769536f 100644 --- a/pkg/proc/target.go +++ b/pkg/proc/target.go @@ -451,6 +451,11 @@ func (t *Target) GetBufferedTracepoints() []*UProbeTraceResult { v.Addr = ip.Addr v.Kind = ip.Kind + if v.RealType == nil { + v.Unreadable = errors.New("type not supported by ebpf") + return v + } + cachedMem := CreateLoadedCachedMemory(ip.Data) compMem, _ := CreateCompositeMemory(cachedMem, t.BinInfo().Arch, op.DwarfRegisters{}, ip.Pieces, ip.RealType.Common().ByteSize) v.mem = compMem