On Sat, Dec 05, 2026 at 10:28:23PM +0200, Jarkko Sakkinen wrote: > On Sat, Dec 05, 2026 at 08:53:26PM +0200, Jarkko Sakkinen wrote: > > On Sat, Dec 05, 2026 at 06:56:49PM +0200, Jarkko Sakkinen wrote: > > > On Sat, Dec 05, 2026 at 05:26:05AM +0200, Jarkko Sakkinen wrote: > > > > v10: > > > > - Reduced to *SINGLE* new syscall. > > > > - Rename nsexec_open() to runfd() and update the related interface > > > > names. > > > > - Replace userns_set_idmap() with the NS_SET_IDMAP ioctl on the user > > > > namespace descriptor. > > > > - Drop the in-tree nsexec selftests and package the standalone ucells > > > > runner in the Buildroot runfd image. > > > > - Include the runfd kernel-doc in the userspace API manual and register > > > > the ioctl range in a separate patch. > > > > > > LSM pollution is the next potential target of redundancy now that > > > syscall pollution has been fully addressed. > > > > > > At least these are low-hanging fruit: > > > > > > 1. security_runfd_free() is redundant against namespace_free(). > > > 2. security_runfd_share() should be replaced a shared hook with > > > Landlock, which already contains an equal hook. > > > > > > I'll address this and then I don't know i.e., need to see first > > > how LSM surface appears after these updates. > > > > > > My goal is to squeeze this patch set around 2000 LOC but not > > > sure if that is possible :-) A realistic bet would be something > > > like 2300 LOC of added complexity but let's see how this goes. > > > > After: > > > > 85 files changed, 2446 insertions(+), 267 deletions(-) > > > > That's ~100 insertions of complexity reduction. > > > > I'll look the remaining LSM surface and try to see if they can be > > tackled; or do they stick. Less is definitely more here. > > This is the refined set of hooks and I think all have a place in the > life-cycle: > > - runfd_alloc(): authorize creating a run. > - runfd_clone(): authorize spawning into a specific run. > - namespace_use(): > - RUNFD_SHARE_NSFD: check whether the caller may add the namespace to > the run. > - clone3(CLONE_INTO_RUN): check whether the caller may enter each > destination namespace it isn’t already in. > > Only by a pure guess, I'd expect security vulnerabilities appearing if > namesace_use() is not invoked both at the time of namespace addition and > entrance.
A new OCI monitor is not required as runfd() can be supplemented into any pre-existing container build flow when the syscall is available. In order to address the thread scenario that agents impose in the actual sense of the word we need to count in SystemD and all the possible crazy ways namespaces and other shenanigans are used at wild so that anything can be patchable. This is a consequence of steep decrease in the price of the cybercrime activities for relatively obscure targets that might have only a few users but the assets might still be mission critical (for a company or for society). SystemD focused, or policy-focused designs, will inevitably leave this territory vulnerable. E.g., Landstrip is sort of niche but it is still widely used in Pi and OpenCode communities, and I've heard that it is even standardized tool in some university departments. The user base is not comparable to SystemD but it might still be part of protecting value assets for companies and educational insititutes. Br, Jarkko
