landlock: jailed exec of bash refused on GitHub ubuntu-26.04 runner with Python 3.12 (3.13 passes)

Open
#424 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
bash, linux, python

Research direction

Start with _landlock_argv and the two named integration tests: integration/test_landlock_tmp_hint.py::test_landlock_refused_tmp_write_gets_the_hint_and_tmpdir_works and integration/test_sandbox_fail_closed.py::test_without_bwrap_landlock_jails_the_session. Reproduce on the reported Ubuntu 26.04 runner with Python 3.12 and inspect the read/write roots and PATH symlinks used for the Landlock jail. Done when the cause is understood and both tests pass without skipping on the affected setup.

Written by the indexing model from the issue text.

Description

known-issue

Seen in CI for #423 (integration layer now runs in CI), job 3.12, twice, runner image ubuntu26/20261122.9 and ubuntu26/20261129.15; the 3.13 job on the same image passes.

integration/test_landlock_tmp_hint.py::test_landlock_refused_tmp_write_gets_the_hint_and_tmpdir_works and integration/test_sandbox_fail_closed.py::test_without_bwrap_landlock_jails_the_session: with no bwrap on PATH (Landlock jail, AD-35), every bash command returns

tether.landlock: exec bash: Permission denied
[exit 127]

Both tests pass locally on Python 3.12.3 and 3.14 (kernel with Landlock, bwrap blocked). Unknown so far: which ro/rw roots _landlock_argv builds on that runner (PATH = a tmp dir with symlinks to bash/echo/cat; /tmp is not in the read roots), and why the Python version changes it.

Impact if real: on such a host without bwrap, a tether session cannot run any bash command (it fails loudly, exit 127, not silently).

Interim: the two tests skip with this message when the jailed exec is refused, so CI stays green while this is investigated.

🤖 Generated with Claude Code

Dominant language
Python
Stars
3
Forks
1
Avg merge
1h 10m
Merged PRs (30d)
175

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from igormcsouza/tether

All issues in igormcsouza/tether

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.