ioi / isolate

Sandbox for securely executing untrusted programs
Other
1.04k stars 154 forks source link

Memory corruption bug in cg_init #147

Closed andr3eee1 closed 3 months ago

andr3eee1 commented 4 months ago

I tried to run isolate on an rpi 4 and a rather strange bug happens, it seems to be a memory corruption bug in cg_init, the file pointer is set with a crazy value. I attach all the necessary information below image I use cg2 branch and the picture is taken after I manually added debugging symbols in the makefile The output from uname -a is: _Linux raspi 6.5.0-1010-raspi #13-Ubuntu SMP PREEMPTDYNAMIC Thu Jan 18 09:08:04 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

gollux commented 4 months ago

Ah, memory allocation in that function was messed up. Could you please check the current master?

AlexVasiluta commented 4 months ago

Might this also have been the root cause of #142? 😅

EDIT: Can confirm #142 does not happen anymore even though xstrdup was removed.