1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-09-01 05:02:03 +03:00
Files
glibc/sysdeps/unix/sysv/linux
Adhemerval Zanella c90cfce849 posix: Fix pidfd_spawn/pidfd_spawnp leak if execve fails (BZ 31695)
If the pidfd_spawn/pidfd_spawnp helper process succeeds, but evecve
fails for some reason (either with an invalid/non-existent, memory
allocation, etc.) the resulting pidfd is never closed, nor returned
to caller (so it can call close).

Since the process creation failed, it should be up to posix_spawn to
also, close the file descriptor in this case (similar to what it
does to reap the process).

This patch also changes the waitpid with waitid (P_PIDFD) for pidfd
case, to avoid a possible pid re-use.

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2024-06-25 12:11:48 -03:00
..
2024-06-18 10:45:36 +02:00
2024-06-17 16:31:49 +00:00
2024-06-17 16:31:49 +00:00
2024-06-18 10:45:36 +02:00
2024-06-17 16:31:49 +00:00
2024-06-17 16:31:49 +00:00
2024-06-17 16:31:49 +00:00
2024-06-17 16:31:49 +00:00
2024-06-17 16:31:49 +00:00
2024-06-17 16:31:49 +00:00
2024-06-17 16:31:49 +00:00
2024-06-17 16:31:49 +00:00
2024-06-17 16:31:49 +00:00
2024-06-04 12:09:15 -05:00
2024-06-17 16:31:49 +00:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2023-07-17 10:08:10 -04:00
2024-06-12 15:25:54 -03:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2024-06-04 12:09:15 -05:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2024-06-04 12:09:15 -05:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2024-01-08 17:09:36 -03:00
2023-09-05 13:08:59 -03:00
2024-01-08 17:09:36 -03:00