Re: [Bug 215813] syscall(SYS_vfork) causes execve() to return 0. (was: vfork(2) behavior not consistent with fork(2))
From: Alejandro Colomar
Date: Wed Apr 06 2022 - 17:03:02 EST
Hi Florian,
On 4/6/22 21:26, Florian Weimer wrote:
It's not clear if this is valid. The syscall function in glibc does not
protect the on-stack return address against overwriting, so it can't be
used to call SYS_vfork on x86.
Can you reproduce this with a true inline syscall, or the glibc vfork
function (which protects the return address)?
If you tell me how I can call a syscall without the libc wrapper or
syscall(2), sure, I can try :)
If syscall(2) can't be used for certain syscalls, maybe we should
document that.
Thanks,
Alex