vms-f57: correct three hand-recited SYSUAF claims + activate the writer negative control - #519
Merged
Merged
Conversation
…er negctl VERACITY-OVERTURN (blocks vms-14f). PR #158's $GETUAI/SYSUAF parser fix was real, but three claims shipped alongside it were hand-recited, not measured, and are measurably false. Each correction below is DERIVED by running the relevant parse/format over the shipped SYSUAF.DAT, not re-typed. 1. src/libvms/rtl/sysuaf.c (strtok comment): was "five of the six rows OVMX ships have an empty field". MEASURED 6 of 6: every shipped row carries an empty FLAGS field, so the strtok split dropped PRIVILEGES on ALL SIX rows and $GETUAI(UAI$_PRIV) returned mask 0 for every account (SYSTEM's "ALL" and GUEST's "TMPMBX" alike), not "nearly the whole" file. 2. src/libvms/rtl/sysuaf.c + test_syssvc_setuai.c (both-bases comment): implied SYSTEM's 1|4 is the unique row that reads the same octal and decimal. MEASURED: TWO rows do -- SYSTEM (1|4) and OPERATOR (1|6) -- because both UIC components are single octal digits; the four [200,20x] rows discriminate. Corrected in both spots and in the radix negctl's `why` (Rule 10 consistency). 3. test_syssvc_setuai.c (write-back comment): claimed a %u write of USER1's 128|130 "reads back as octal 88|88". MEASURED 10|88: '8' is not an octal digit, so strtoul("128",8) stops at "12" (=10); strtoul("130",8)=88. Unexecuted negative control: the WRITER's octal UIC formatting (sysuaf_format_record's %o) had no dedicated control -- sysuaf-uic-radix-decimal mutates the READER radix, and the manifest itself noted "a WRITE alone is not reached". Scenario 4's two write-back assertions were the exact subject of the false claim #3 yet nothing injected a writer defect to prove they have teeth. Added sysuaf-uic-writeback-decimal: flips both %o->%u in the writer so a rewritten record whose UIC digits differ between bases is written decimal. Scenario 4 rewrites USER1 (200|202 -> struct 128|130) and reads the row text back, so %u reddens exactly the two "still reads 200/202" assertions (measured host-side: %o of 128/130 = "200"/"202", %u = "128"/"130"). No other qemu suite writes via sysuaf_format_record and reads a UIC field back, so nothing else reddens. Anchored both assertions, added the manifest entry + inject, raised the derived floor 97->98. manifest selftest + coverage: the new defect injects with teeth, require_fail texts exist literally, 98>=floor 98. (The 3 remaining selftest/ coverage FAILs -- test_kmod_vmsfs_mountvis/sysgroup, test_syssvc_initialize unanchored -- pre-exist identically on origin/main; unrelated to this item.) No security fix or test was weakened; source changes are comment-only + a new injected-defect control. INV-6. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VERACITY-OVERTURN for vms-f57 (blocks vms-14f; label security/veracity-overturn). PR #158's
$GETUAI/SYSUAF parser fix was real, but three claims shipped in the comments/self-report were hand-recited, not derived — and are measurably false. Every correction here was re-derived by measurement over the shippedSYSUAF.DAT; none copied.The shipped SYSUAF.DAT (6 rows), for reference
Field order:
USERNAME|PWHASH|UIC_GROUP|UIC_MEMBER|DEFDIR|FLAGS|PRIVILEGES. Every row has an empty FLAGS field (the||).Claim 1 — "five of the six rows have an empty field" → 6 of 6 (
src/libvms/rtl/sysuaf.c)Ran the pre-fix
strtok_rsplit and the post-fixstrchrsplit over the shipped file:All six rows carry an empty FLAGS field, so the strtok split dropped PRIVILEGES on every row →
$GETUAI(UAI$_PRIV)returned mask 0 for every account (SYSTEM's "ALL" and GUEST's "TMPMBX" alike). Corrected to 6 of 6.Claim 2 — "SYSTEM's 1|4 is the only both-bases row" → two rows (
sysuaf.c,test_syssvc_setuai.c, radix negctlwhy)For each row, compared decimal vs octal parse of the UIC fields:
A row reads identically iff both UIC components are a single octal digit (0-7). Two shipped rows qualify — SYSTEM (1|4) and OPERATOR (1|6) — not one.
Claim 3 — "128|130 reads back as octal 88|88" → 10|88 (
test_syssvc_setuai.c)128 reads back as octal 10 (not 88); 130 reads back as 88. Corrected.
Unexecuted negative control → new
sysuaf-uic-writeback-decimalThe WRITER's octal UIC formatting (
sysuaf_format_record's%o) had no dedicated control:sysuaf-uic-radix-decimalmutates the reader radix, and the manifest itself noted "a WRITE alone is not reached." Scenario 4's two write-back assertions are the exact subject of false claim 3, yet nothing injected a writer defect to prove they have teeth.Added
sysuaf-uic-writeback-decimal: flips both%o→%uin the writer. Scenario 4 rewrites USER1 (200|202→ struct128|130) and reads the row text back — measured host-side:So
%ureddens exactly the two "rewritten UIC {GROUP,MEMBER} field still reads 2xx" assertions. Static audit: no other qemu suite writes viasysuaf_format_recordand reads a UIC field back (test_syssvc_authorize's session onlyEXITs), so nothing outsidetest_syssvc_setuaireddens. Anchored both assertions, added the manifest entry + idempotent inject, raised the derived floor 97→98.Manifest gates (run locally):
selftest:sysuaf-uic-writeback-decimal injects into the current tree✓, teeth ✓,every require_fail/knock_on_fail text exists literally✓,98 defect(s) >= floor 98✓coverage: new defect clean (no ungated/orphaned-anchor FAIL),98 >= floor 98✓%uvariant compiles clean under-Wall -Wextra -Wformat(args already(unsigned)).Pre-existing (NOT this item):
selftest/coveragestill FAIL on 3 unanchored suites —test_kmod_vmsfs_mountvis,test_kmod_vmsfs_sysgroup,test_syssvc_initialize— identical on pristine origin/main (floor 97). Flagged, unrelated to vms-f57.No security fix or test was weakened; source changes are comment-only plus a new injected-defect control. INV-6.
🤖 Generated with Claude Code