Skip to main content
← Back to list
01Issue
BugShippedExtensionsPublicTeam
AssigneesNone

Relationships

↔ sibling #4776

#4774 @swamp/cfgmgmt firewall: removing the rule that lets the run's own host in cuts the run off, with no deadline

Opened by randybias · 11/15/2026· Shipped 11/15/2026

Versions: @swamp/cfgmgmt 2026.11.01.1, swamp 20261113.232530.0, target Ubuntu 24.04 (backend iptables, since ufw was inactive).

What happens: the firewall model removes a rule when ensure is absent, whatever that rule does. In our test the host had three rules on port 22 and 80: an allow for the control host's address on 22, an allow on 80, and a deny on 22 for everyone else. We applied ensure: absent for the allow that lets the control host in, while the deny stood. The rule went, the deny now covered the control host, and the run's own SSH connection was cut. The run then hung with no deadline: the wrapper timeout at 180 s fired, and the orphaned swamp process was still hung at 6 min 49 s when we killed it. The control host stayed locked out from the apply until the end of our poll, 6 min 46 s and 58 failed polls later. Nothing restored access (there is no revert); we repaired it over the serial console.

What we expected: the model notices that the rule it is about to remove is the one that admits the connection it is running over (the address and port of its own SSH session) and refuses, with an error that names the rule, before it changes anything. An explicit input could let a caller who really means it go ahead.

Shortest reproduction:

  1. On a throwaway host with an iptables backend, apply three rules: allow port 22 from the control host's /32, allow port 80, and deny port 22 (no source).
  2. Check the control host still reaches the host on 22.
  3. Apply the first rule again with ensure: absent.
  4. The run does not return in a useful time, and a new SSH connection from the control host is refused.

Why it matters: it is one ordinary-looking input (a clean-up of a rule that looks redundant) that locks the operator out of a machine they can only reach over SSH, and the failure shows up as a hang, not an error.

Other package: @adam/cfgmgmt is the same code under its former name (the README of @swamp/cfgmgmt says the models are unchanged), with the same one-rule-per-resource design, so we expect the same behaviour; we did not run it.

Upstream repository: https://github.com/swamp-club/swamp-extensions

Environment

  • Extension: @swamp/cfgmgmt@2026.11.01.1
  • swamp: 20261114.210101.0-sha.537e03d1
  • OS: linux (x86_64)
  • Deno: 2.9.8
  • Shell: /bin/bash
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPEDLINKED+ 5 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

11/15/2026, 10:09:29 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 linked sibling of #477611/15/2026, 7:37:49 PM
Editable. Press Enter to edit.

system commented 11/15/2026, 3:29:06 PM

Classified automatically when this issue was filed.

  • Source: Extensions

If you feel this classification is incorrect, add a ripple to tell us so.

stack72 commented 11/15/2026, 10:09:34 PM

Thanks @randybias for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.