The vulnerability is an Arbitrary Code Execution in the JIT engine's C-FFI interface. The analysis of the patch commit dea11c594f39db503e84a51f1e3c2a93f8baa8eb reveals that the core of the vulnerability was the lack of sandboxing for JIT-compiled code. The proof-of-concept files (poc1.py, poc2.py, poc3.py) included in the patch confirm that the exploit involves crafting a malicious JSON payload with JIT instructions and using the C-FFI functions to compile and execute it.
The primary vulnerable functions identified are:
rssn_jit_execute: Located in src/ffi_apis/jit_ffi/handle.rs, this function was modified to enforce a sandbox context during execution. The original function directly executed a raw function pointer, which is the sink of the vulnerability.
rssn_jit_compile_json: Located in src/ffi_apis/jit_ffi/json.rs, this function is the entry point for the malicious instructions. The patch introduces a new function, rssn_jit_configure_sandbox_json, to configure sandbox settings like allowed memory regions and call targets, which were previously absent, allowing the compilation of unsafe instructions.
The root cause is improper control of code generation (CWE-94) and improper input validation (CWE-20) in the C-FFI layer, allowing an attacker to execute arbitrary code at the privilege level of the process using the library.