Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Capability-free sandbox fails to start on kernels < 5.19 (RHEL 9.x / 5.14): seccomp WAIT_KILLABLE_RECV EINVAL

已关闭
#3,417 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
kubernetes, linux, rust

调研方向

从 issue 中描述的 capability-probe seccomp 通知设置和 supervisor 的启动确认处理开始;将它们与提议的 fallback 分支进行比较。确定旧 kernel 上的行为是否可接受,然后验证无 capability 的 sandbox 能在 kernel 5.14 上达到 Ready,同时在更新的 kernel 上保留 WAIT_KILLABLE_RECV,并记录降级语义。

由索引模型根据 Issue 内容生成。

描述

state:accepted
User Story

As an operator running OpenShell on OpenShift / RHEL 9.x nodes, I want the RFC-0012 capability-free sandbox to start on my existing fleet, so that I can adopt the new isolation model without waiting for a kernel bump.

Problem Statement

At startup the sandbox installs its seccomp notification listener with SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV, introduced in Linux 5.19. On older kernels the seccomp() call fails:

seccomp(SET_MODE_FILTER, NEW_LISTENER|WAIT_KILLABLE_RECV, …) = -1 EINVAL

The listener thread then dies (notification launcher disappeared) and the supervisor fails confirmation (sandbox confirmation evidence is incomplete or mismatched). This appears intentional — the code maps this EINVAL to "seccomp WAIT_KILLABLE_RECV is required (Linux 5.19 or newer)" — so this is as much a "should we relax it?" as a bug report.

Impact / Why This Matters

RHEL 9.x ships kernel 5.14 for its lifecycle, and OpenShift/RHCOS nodes run the RHEL kernel. So the capability-free sandbox has no working path on current OpenShift until RHEL 10 nodes. There is no in-cluster workaround (it is a kernel-feature gap, not a config/SCC issue). This blocks OpenShift adoption of RFC-0012 in the near term.

Reproduction Steps
  1. On a node with kernel < 5.19 (e.g. RHEL 9.8, 5.14.0-687.35.1.el9_8), create a capability-free sandbox (or run openshell-sandbox capability-probe in a zero-cap, no_new_privs pod).
  2. The probe fails at the seccomp notification step; strace shows the NEW_LISTENER|WAIT_KILLABLE_RECV call returning EINVAL.
Environment
  • OpenShift / RHCOS, RHEL 9.8, kernel 5.14.0-687.35.1.el9_8
  • RFC-0012 capability-free model (#2942), Kubernetes compute driver
Ruled out (measured on the same 5.14 node, zero capabilities)
  • Not CAP_SYS_ADMIN / SCC: a plain pod at zero caps installs a NEW_LISTENER fine under both RuntimeDefault and Unconfined.
  • Not the seccomp profile, user namespaces, SELinux, or struct-size mismatch (GET_NOTIF_SIZES = 80/24/64 on both kernels). The only differentiator is the WAIT_KILLABLE_RECV flag (5.19).
Proposed Design

Make WAIT_KILLABLE_RECV optional: attempt it, and on EINVAL fall back to a plain NEW_LISTENER; and stop gating launch-confirmation on the cancellation evidence (which is exactly this flag). Implications:

  • We lose the killable-receive semantics (the workload-side notify wait becomes interruptible rather than kill-only).
  • Zero-cap containment is unchanged — the listener still mediates every syscall; the supervisor keeps rejecting stale notifications via NOTIF_ID_VALID.
  • Validated: with this change a capability-free sandbox reaches Ready on OpenShift / kernel 5.14, end to end (workload + supervisor).

A branch implementing this (two small commits, off current main) is available: akram:fix/seccomp-wait-killable-fallback-mainhttps://github.com/NVIDIA/OpenShell/compare/main...akram:OpenShell:fix/seccomp-wait-killable-fallback-main . Happy to open it as a PR if the direction is acceptable.

Alternatives Considered
  • Require nodes on kernel ≥ 5.19 (RHEL 10 / newer RHCOS) — leaves current OpenShift users blocked.
  • Runtime-installed listener via linux.seccomp.listenerPath — heavier, and not needed for this specific gap.
Acceptance Criteria
  • The capability-free sandbox starts and reaches Ready on a kernel-5.14 node.
  • On kernels ≥ 5.19 behavior is unchanged (WAIT_KILLABLE_RECV still used).
  • The degraded semantics on < 5.19 are documented.
Open question for maintainers

Is the 5.19 floor a hard requirement (a load-bearing property of the isolation model), or the convenient baseline? If a fallback is acceptable, I have the branch above and can open a PR.

主要语言
Rust
星标
8.7k
派生
1.3k
平均合并
2 天 8 小时
30 天内合并 PR
271

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。