Re: [pseudo] [PATCH 0/3] closefrom/close_range: protect every pseudo fd, then drop one
Babanpreet Singh <[email protected]> Wed, 29 Jul 2026 05:08:07 +0000
| Newsgroups | org.yoctoproject.lists.yocto-patches |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2026-07-28 at 16:59 +0100, Richard Purdie wrote: > I think the missing piece is this: > > - if (op != OP_CHROOT && op != OP_CHDIR && op != OP_CLOSE && op != OP_CLOSEFROM && op != OP_DUP > + if (op != OP_CHROOT && op != OP_CHDIR && op != OP_CLOSE && op != OP_CLOSEFROM && op != OP_CLOSE_RANGE && op != OP_DUP Sorry for the breakage, and thanks for chasing it down. I can reproduce it both ways on master-next at 6d65d74, with a probe that opens an fd and calls close_range(fd, ~0U, 0): no PSEUDO_*_PATHS set OK PSEUDO_IGNORE_PATHS covering the fd's path SIGSEGV PSEUDO_INCLUDE_PATHS set, path not in it SIGSEGV same env, closefrom() instead OK all of the above, plus your line OK For OP_CLOSE_RANGE the path comes from fd_path(lowfd), the ignore check hits it, and pseudo_client_op() returns early with result still 0, which close_range.c then dereferences. Two things before I respin. Do you want the three fd-protect patches resent, or will you carry the master-next commits since you have already resolved the conflicts? And the ignore-path line: fold it into the close_range patch with a Suggested-by, or keep it as your own commit ahead of it? Either works for me. Thanks, Baban