Skip to content

supervisor: Landlock hard_requirement aborts with "incompatible directory-only access-rights: ReadDir" for real directories on RHEL 9.6 (kernel 5.14) ABI #2218

Description

@flg77

Description

On a Kubernetes (OpenShift) deployment backed by RHCOS = RHEL 9.6, kernel 5.14.0, openshell sandbox create with a policy whose landlock.compatibility: hard_requirement fails at sandbox preparation:

Failed to prepare sandbox: incompatible directory-only access-rights: BitFlags<AccessFs>(0b1000, ReadDir)

This happens even when the policy's filesystem_policy lists only real directories (no device files, no symlinks). ReadDir (0b1000 = LANDLOCK_ACCESS_FS_READ_DIR) is a standard directory-only access right that has existed since Landlock ABI v1 (kernel 5.13), yet the supervisor rejects it as incompatible on this kernel's (RHEL-backported) Landlock ABI instead of applying it — or gracefully restricting to the supported subset.

Setting landlock.compatibility: best_effort brings the workspace up cleanly. This confirms the issue is specific to the hard_requirement ABI/access-right compatibility check.

Environment

  • OpenShell: 0.0.76
  • Platform: OpenShift 4.21, RHCOS 9.6, kernel 5.14.0-570.112.1.el9_6.x86_64

(full draft in the saved file)

Metadata

Metadata

Assignees

Labels

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions