Skip to content

Commit

Permalink
proc,ebpf: mark as unreadable args with unsupported types with ebpf (#…
Browse files Browse the repository at this point in the history
…3444)

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

Fixes #3443
  • Loading branch information
aarzilli authored Jul 25, 2023
1 parent a53f1bf commit 34104fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/proc/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34104fb

Please sign in to comment.