ubpf icon indicating copy to clipboard operation
ubpf copied to clipboard

Incorrect exit implementation in JIT compiler

Open pcy190 opened this issue 10 months ago • 0 comments

When we run PoC program in the JIT compiler, we get the return value as 224 after execution. While the correct return value should be 0. The code generation implementation of EBPF_OP_EXIT in JIT compiler does not correctly handle the initial r0 value.

mov %r2, 0xFFFFFFFF
exit

We observed the following inconsistency:

// result after program execution
interpreter: 0
JIT: 224

pcy190 avatar Apr 25 '24 11:04 pcy190