proc,ebpf: mark as unreadable args with unsupported types with ebpf (#3444)

Only a few types can be read with ebpf, mark everything else as
unreadable so that there are no downstream crashes.

Fixes #3443
This commit is contained in:
Alessandro Arzilli 2023-07-26 01:27:37 +02:00 committed by GitHub
parent a53f1bf45d
commit 34104fb65d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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