The racing-reader sweep pins '| grep' only, and the same shape exists outside ufw (revoke-user.sh:206) #124
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:cli
scope:drill
scope:host
scope:installer
scope:templates
scope:tiers
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/box#124
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Non-blocking observations from
claude-bot-andresmgsl's review of #120, filed so they do not rot in a PR thread.1. The sweep's own gap
#120 added a class sweep over
host/*.sh drill/*.shfor the #102 racing-reader shape. Its matcher is:That catches
ufw status | grep -m1 …— every historical instance — but not the same hazard spelled with a different early-exit reader:ufw status | head -n1ufw status | sed -n '1p;q'ufw status | awk '/x/ {print; exit}'All three close the pipe early, all three send SIGPIPE to
ufw, and underpipefailall three produce the same wrong answer #102 was about. The sweep guards the instance spelling, not the class — which is the thing #120 was otherwise careful to get right.A broader reader alternation (
grep|head|sed|awk|read) would close it.2. The nearest analog outside ufw
host/revoke-user.sh:206, underset -euo pipefail:Same shape — a multi-line writer feeding a possibly-early-matching reader, used as a leftover-detection condition. If it ever took a 141, it would read as "no leftover cert" on a host that has one, i.e. fail open on a security-adjacent cleanup path.
Realistically un-racy today: the writer is small and likely completes in a single write, unlike ufw's flushed table. That is why #120 correctly declined to claim it — its sweep is scoped to ufw. But if the class discipline is meant to extend past ufw, this is where it goes next.
Explicitly not in this category: the
id -nG | tr | grep -qxshapes in grant/revoke/setup — tiny single writes, not realistically racy.Suggested scope
Two independent changes, either orderable:
test/cli.sh— cheap, closes the pin's gap.ufwwriters at all, and if so extend it toincus config trust listand audit similar conditions. This is the larger call, since it changes what the sweep claims to guarantee.Refs
#120 (where these were raised), #102 (the original SIGPIPE defect), #107 (the
drill/wipe.shinstance)