iovisor / ubpf

Userspace eBPF VM
Apache License 2.0
814 stars 132 forks source link

Wrong offset check of relocated function? #510

Open xfoukas opened 3 months ago

xfoukas commented 3 months ago

I have been going through the ubpf_loader code and I was wondering if the offset check below should be >= instead?

https://github.com/iovisor/ubpf/blob/2c2a68a2d9d3d9c4db159a03391a2841e8baa964/vm/ubpf_loader.c#L367

Couldn't there be cases where the offset could be 0?