freebsd-dev/sys/compat/cloudabi
Mateusz Guzik 813361c140 fork: plug a use after free of the returned process
fork1 required its callers to pass a pointer to struct proc * which would
be set to the new process (if any). procdesc and racct manipulation also
used said pointer.

However, the process could have exited prior to do_fork return and be
automatically reaped, thus making this a use-after-free.

Fix the problem by letting callers indicate whether they want the pid or
the struct proc, return the process in stopped state for the latter case.

Reviewed by:	kib
2016-02-04 04:25:30 +00:00
..
cloudabi_clock.c Add a futex implementation for CloudABI. 2015-07-27 10:07:29 +00:00
cloudabi_errno.c Add a sysentvec for CloudABI on x86-64. 2015-07-16 18:24:06 +00:00
cloudabi_fd.c Decompose linkat()/renameat() rights to source and target. 2015-08-27 15:16:41 +00:00
cloudabi_file.c Fall back to O_RDONLY -- not O_WRONLY. 2015-08-11 14:08:46 +00:00
cloudabi_futex.c Let the CloudABI futex code use umtx_keys. 2015-08-04 06:02:03 +00:00
cloudabi_mem.c Implement CloudABI memory management system calls. 2015-07-17 09:00:38 +00:00
cloudabi_proc.c fork: plug a use after free of the returned process 2016-02-04 04:25:30 +00:00
cloudabi_proto.h
cloudabi_random.c Implement the CloudABI random_get() system call. 2015-07-14 18:45:15 +00:00
cloudabi_sock.c Properly convert the error number to CloudABI's indexing. 2015-08-11 14:07:04 +00:00
cloudabi_syscalldefs.h Properly format pointer size independent CloudABI system calls. 2015-10-08 05:27:45 +00:00
cloudabi_thread.c Add a futex implementation for CloudABI. 2015-07-27 10:07:29 +00:00
cloudabi_util.h Add file_open(): the underlying system call of openat(). 2015-08-06 06:47:28 +00:00