On new process, check for the clone3 syscall.

PiperOrigin-RevId: 499918752
Change-Id: I7279e76593976c224a15be901834bf6225aebe85
This commit is contained in:
Sandboxed API Team 2023-01-05 10:01:32 -08:00 committed by Copybara-Service
parent 90ee0a7464
commit 756176f206

View File

@ -1001,6 +1001,9 @@ void Monitor::EventPtraceNewProcess(pid_t pid, int event_msg) {
if (index != syscalls_in_progress_.end()) {
auto syscall_nr = index->second.nr();
bool creating_new_process = syscall_nr == __NR_clone;
#ifdef __NR_clone3
creating_new_process = creating_new_process || syscall_nr == __NR_clone3;
#endif
#ifdef __NR_fork
creating_new_process = creating_new_process || syscall_nr == __NR_fork;
#endif