diff options
| author | Cong Wang <cwang@multikernel.io> | 2026-09-24 15:30:16 -0700 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2026-10-06 01:54:49 -0700 |
| commit | 54971c8061943d1cd10290ec754b3597452eb15a (patch) | |
| tree | 750f27106c1e6bbd596d9e78f1e382446cdc507e /tools/lib/python | |
| parent | b9e6d5f996ae0a88ef4b343f8170e80a2337b483 (diff) | |
| download | linux-next-54971c8061943d1cd10290ec754b3597452eb15a.tar.gz linux-next-54971c8061943d1cd10290ec754b3597452eb15a.zip | |
seccomp: allow addfd to transfer O_PATH descriptors
SECCOMP_IOCTL_NOTIF_ADDFD uses fget() to acquire the supervisor's
source descriptor. fget() rejects FMODE_PATH files, so injecting an
O_PATH descriptor fails with EBADF before the receiving task can
install it.
Use fget_raw() to acquire the source file. This takes the same
reference while allowing FMODE_PATH. The existing receive_fd() and
receive_fd_replace() paths retain their security_file_receive()
checks and preserve the file's O_PATH semantics.
Assisted-by: Codex:gpt-6
Signed-off-by: Cong Wang <cwang@multikernel.io>
Link: https://patch.msgid.link/20260924223018.564548-2-xiyou.wangcong@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
