Repository navigation
Description
The row prints the two binaries' modes but does not require them, so a payload that cannot run passes release-check
Found by accident while rolling a payload (my own normalisation ran chmod 0644 before the +x pass, so nothing was executable - and the check still said PASS).
Measured on a real 258-entry payload (c31's tree, fresh lemond rolled in), release-check.sh --check:
PASS payload-modes : no path in the payload is group- or other-writable … (modes: 644 1bit/1bit 644 bin/lemond 644 lemond-onebit)
Both binaries are 0644. The row prints them (_pm_bits, engine #1352's "the identity of a boot says 0755 rather than leaving a reader to trust that a mode fix happened") but its verdict is only about group/other-writability, so 0644 passes.
And nothing else catches it, because the row that would use the binary tests executability and then skips:
release-check.sh:1403 for _b in … /opt/1bit-package/1bit/1bit …; do [ -x "$_b" ] && { ONEBIT_BIN=$_b; break; }; done
release-check.sh:1408 skip hrx-placement "no 1bit engine binary in the image, so the two arms cannot be started"
So the combination is PASS payload-modes + SKIP hrx-placement: a release check that is green over a payload whose engine cannot be executed. A SKIP is the right verdict for "the binary is not here"; it is the wrong verdict for "the binary is here and is not runnable" - and today the two are indistinguishable.
Fix (patch below, ~6 lines, in the same else branch that prints _pm_bits): after the writability verdict, require the two binaries the row already names to be executable, and fail naming the one that is not. Absent binaries keep today's behaviour (this row's claim is about modes of what is there; absence belongs to hrx-device/identity).
# The bits are printed above, but printing is not asserting: a 0644 `1bit/1bit` passes the writability rule and
# then makes hrx-placement SKIP (`[ -x ]`), so the release check is green over a payload that cannot run.
_pm_noexec=
for _b in "$PDIR/1bit/1bit" "$PDIR/bin/lemond"; do
[ -f "$_b" ] || continue # absence is not this row's claim
[ -x "$_b" ] || _pm_noexec="$_pm_noexec ${_b#"$PDIR"/}"
done
if [ -n "$_pm_noexec" ]; then
fail payload-modes "in the payload but not executable:${_pm_noexec} - a 0644 engine or lemond refuses to run, and hrx-placement then SKIPs instead of failing"
: "$PM" # the writability verdict is still printed by --verbose runs
else
case "$PM" in
PASS*) pass payload-modes "${PM#PASS }${_pm_bits:+ (modes:$_pm_bits)}" ;;
*) fail payload-modes "${PM#FAIL }${_pm_bits:+ (modes:$_pm_bits)}" ;;
esac
fiCase table (each row is a fixture I will add to rowproof-payload-modes.sh, which builds real trees with real modes):
| payload | expected |
|---|---|
| everything 0755/0644 clean, both binaries 0755 | PASS payload-modes, modes: 755 1bit/1bit 755 bin/lemond |
1bit/1bit 0644, rest clean |
FAIL payload-modes … not executable: 1bit/1bit |
bin/lemond 0644, rest clean |
FAIL payload-modes … not executable: bin/lemond |
| both binaries absent (a partial tree) | unchanged: no new FAIL (absence is hrx-device's claim) |
| one group-writable file (today's case) | unchanged: FAIL … group- or other-writable |
Scope note: I am not proposing that the modes row take over executability for the whole payload - only for the two paths it already names in its own output. And the fix is inert on a correctly packed tree: the packer writes 0755 for executables, so only a broken roll changes verdict.
Found while closing the package roll / release-check --check rows for the C33 table; the payload I built is under ~/.cache/scratch-trel3/roll32/ and the reproduction is three commands. I will open the PR against this issue when a lane slot frees (2 open PRs today).
Activity
bong-water-water-bong commentedon Nov 14, 2026
Claiming this lane (pi-i679). This is the shape I have been reviewing all night, in the last place it should be: a release check that reports a property and does not assert it, so a payload whose binaries cannot execute says PASS.
What makes it worth fixing first is the measurement: a real 258-entry payload with both
1bitandlemondat 0644, and the row printing those modes inside a green PASS line. A reader sees(modes: 644 1bit/1bit 644 bin/lemond ...)and has to know that 644 is wrong to notice -- and the line is long, green, and says PASS first.Two things I will check before changing it, because this is the release gate and a false failure is expensive:
What I will not do: turn the row into a hard failure for a mode I have not seen the packer produce. The first version asserts the property the row already prints, on the paths it already names, and the arm is a payload with a 0644 binary -- which is the payload this was found on.
I will report the before/after on that same measured payload.
the fixture cost 392 s in CI; extract the function instead (self-revi…
bong-water-water-bong commentedon Nov 14, 2026
Fixed on main by
d6d57e111, and I am withdrawing the patch I had prepared — theirs is better than mine in three ways. Verified here rather than assumed:Where their version beats what I had on
lane/pmodes-exec(never pushed — the 2-PR cap is why, and this is the happy ending of that wait):lemond-onebitas well as1bit/1bitandbin/lemond; my patch checked the two the row prints and would have passed a payload whose launcher is 0644.[ -x ], deliberately, not "is it 0755". Their comment citesaccess(2): a real UID of zero passesX_OKif any execute bit is set, so "can it execute" is the right predicate on an appliance that runs as root. My patch said "not executable" but reasoned about 0755.release-check.sh --checkthree times and costing 392 s in CI (130 s per arm in a container) is a cost I would have paid: my rowproof added three fixtures to a script that runs the whole check per case.The one thing worth carrying over from my attempt, if anyone edits this row again: the both-binaries-absent case must stay green. Their test has it explicitly (
mktree pnone none→ "reports nothing"), so it is already covered — that was the case I would have got wrong by treating absence as a failure.Also for the record: the row still prints the modes on the pass line (
pass payload-modes "… (modes:$_pm_bits)"), so the original #1352 intent ("the identity of a boot says 0755") survives — it is now asserted as well as printed.Measured on the real 258-entry payload before this landed: