Found that a pinned CONSTANT is not actually tamper-proof: ACL-PIN only blocks redefinition, not a >BODY-then-store on the word's existing data field. Moves the Zuse cert value into C-only VM struct fields (zuse_cert_lo/hi + zuse_cert_installed fuse bit) with a one-time vm_zuse_cert_install() and read-only ZUSE-CERT-LO@/HI@/INSTALLED? FORTH accessors, closing the tamper path structurally instead of by convention. Deletes the now-insecure ZUSE-CERT-LO/HI CONSTANT words from zuse.4th. vm_zuse_cert_install() has no caller yet -- the real mint flow (Milestone 6 CA, the MINT word) is still open; this is storage + accessors only, not a stand-in mint. Documented in FABRIC-3.md. Verified: hosted build clean, mkcapsule --lint clean (31/31), clean boot to ok> on amd64/aarch64/riscv64 with Stadium conservation intact and no panics. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U14ET9CWAtbQMbYqomKgXd
28 lines
1.1 KiB
Forth
28 lines
1.1 KiB
Forth
Block 4016
|
|
( zuse.4th - Bootstrap superuser for StarForth ACL )
|
|
( Named for Konrad Zuse, pioneer of programmable computers. )
|
|
( Sole superuser; mints credentials; owns emergency REPL. )
|
|
( Loaded by ACL.4th; must not load before ACL.4th. )
|
|
( FUTURE: Replace with thumbdrive Ed25519 PKI. )
|
|
( HUMAN-REVIEW: capsule hash = root of superuser trust. )
|
|
( Cert value lives in C-only VM fields (vm_zuse_cert_install),
|
|
( NOT a dictionary CONSTANT: ACL-PIN only blocks redefinition,
|
|
( not a >BODY-then-store, so a pinned CONSTANT is not actually
|
|
( tamper-proof. Read with ZUSE-CERT-LO@ / ZUSE-CERT-HI@ / )
|
|
( ZUSE-CERT-INSTALLED? -- all C primitives, all read-only. )
|
|
|
|
Block 4017
|
|
( ACL-ZUSE-BOOT ( -- ) )
|
|
( Authenticates zuse session (sets vm->zuse_session=1)
|
|
( via C primitive) and pins itself against redefinition.)
|
|
( ZUSE-AUTHENTICATE is C-only; no FORTH word grants )
|
|
( god-mode except through this boot sequence. )
|
|
: ACL-ZUSE-BOOT ( -- )
|
|
ZUSE-AUTHENTICATE
|
|
LOG-INFO" zuse: activated"
|
|
['] ACL-ZUSE-BOOT ACL-PIN ;
|
|
|
|
Block 4018
|
|
( Self-activation )
|
|
ACL-ZUSE-BOOT
|