diff options
author | Maciej Żenczykowski <maze@google.com> | 2022-01-21 11:19:55 -0800 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2022-04-29 13:42:50 -0700 |
commit | 436980d31c99bdee3c794e26e662e885eba928d6 (patch) | |
tree | 95dfe3ef3c0613b9e6974a160f71512938cb9435 /libc/malloc_debug/malloc_debug.cpp | |
parent | 06b249fc75b4f554b52198b94737a5aabe30ddb0 (diff) |
allowlist new Linux close_range() system call, use it in posix_spawn()
Linux kernel's close_range() system call (currently) allows:
close() unshare() fcntl(F_SETFD, FD_CLOEXEC)
to be performed on ranges of fds.
All 3 of these are already allowed by seccomp bpf:
as such this doesn't allow you to do anything you can't already do.
We can't add close_range() properly to bionic because we'd need to
fiddle about with ltp and it's too late to add new T API anyway,
so let's just make the direct syscall() call.
We'll add proper support in U.
See also:
https://man7.org/linux/man-pages/man2/close_range.2.html
Test: TreeHugger
Bug: 229913920
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I85586d544fc23bed6aee59f00bdb79ee7a8150d1
Merged-In: I85586d544fc23bed6aee59f00bdb79ee7a8150d1
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
0 files changed, 0 insertions, 0 deletions