CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.
fix: bind artifact admission to canonical manifest layout
mergeda25e94b1ec5a4728 #80 · opened 2026-10-25 02:41 UTC · closed 2026-10-26 03:36 UTC · merged 2026-10-26 03:36 UTC
Imported from GitHub aien-dev/CUDApp#80, by drakestapleton
Base 3f9c154c7ef5152b3d6b21811920fbd8eeb0d044 · Head fd51895647c5f79c8f43fac95b2fca2097a86ad3
Merged on GitHub as 585f159e3a6fc305976791892631a94776369384; reachable from main 21d8de285f713adf09e0d6ba6db2b37139d0674e (observed 2026-11-18T16:38:30Z)
drakestapleton wrote on 2026-10-25 02:41 UTC
Scope
Validate the complete version-1 manifest layout before field lookup or identity admission. Require the exporter's ordered, unique records and final provenance-tool boundary; reject missing/duplicate/reordered records, hidden NUL/trailing bytes, and unterminated records. Canonical artifacts retain their existing IDs. Add a portable host regression target to HOST_TESTS.
This repairs a digest/interpretation binding defect for noncanonical inputs. It is not a claim of signature forgery, remote authentication bypass, observed exploitation, or complete artifact/driver security. No GPU code is executed by the new test. The existing first-party artifact boundary is patched; no frozen kernel work or .om migration scope is changed. Related context: #68 and #79.
Verification
Base: 3f9c154c7ef5152b3d6b21811920fbd8eeb0d044.
Test-first against original production parser: 13 checks, 8 failures (exit 1).
make test-native-artifact-manifest: 13 checks, 0 failed (exit 0).
GCC 14.2, x86_64, -O0, -O1, -O2, -Wall -Wextra -Werror, ASan + UBSan: 13/13 at each level. Leak detection disabled because LeakSanitizer cannot operate under this environment's ptrace; leaks NOT_RUN.
Independent review reproduced red/green, reran portable make and -O1 sanitizer checks: PASS for this bounded fix.
git diff --check: PASS.
Full make -j4 test and existing make -j4 test-native-artifact: attempted, BLOCKED by existing AArch64 ds/dsb assembly on this x86_64 executor in omega_blackwell_engine.c (393,558) and omega_blackwell_submit.c (279,372,532,613). Not a full-suite pass.
Reviewed local commit c10d81f7c9dbbbcb071d680db53f9666f38024af and remote code commit fd51895647c5f79c8f43fac95b2fca2097a86ad3 have identical full tree a7c4bf2c9849cacb24292f3505718449bd9c28aa. Connector publication uses different commit metadata. Reviewed patch SHA256: 74283f3b518ba96c590a41c318d402e82e5e42804e311cf63a9e8e444543c3bf.
Keep draft until required AArch64/full-suite verification and normal review gates are satisfied. No merge or deployment requested.
CI follow-up
The first CodeQL run identified a newly added test helper creating files with a potentially permissive mode. Fixed with explicit 0600 creation and a permissive-umask regression. The helper-only negative control fails 1/13 before the fix, and the fixed suite passes 13/13. Independently reviewed and rerun; no suppression or gate weakening. Exact-head checks for fd51895647c5f79c8f43fac95b2fca2097a86ad3 completed successfully: CodeQL, Analyze (c-cpp), and Analyze (python). Run: https://github.com/aien-dev/CUDApp/actions/runs/40155818716 . These checks do not replace the still-blocked AArch64 full-suite verification.
drakestapleton reviewed (COMMENTED) on 2026-10-25 02:42 UTC
Bounded source inspection, exact head 16cefed932dac7d18adfa0a5ecee876b563634d5 (2026-10-25). Not a merge approval. I inspected the new manifest_layout_ok and compared its ordered field keys against the actual v1 exporter in src/omega_native_artifact.c. The parser now examines the entire byte span before find_line or artifact-id admission: it requires the exporter-ordered records, a terminating newline and provenance_tool last, rejecting hidden NUL, CR, surplus records and missing/duplicated/reordered fields. This directly addresses the previously possible divergence between the hashed identity portion and later policy field lookup. The added fixture exercises that boundary; the PR's recorded x86/sanitizer red/green results are author/earlier local-review claims, not tests rerun by this desk.
Outstanding qualification: This changes the artifact trust/admission surface, so retain the existing implementation owner and the applicable operator path. GitHub currently has no submitted independent final-head approval, no established CUDApp signed-worker lane or exact-head signed Spark/AArch64 bundle. The existing full/native targets are reported blocked on AArch64 assembly on x86. Obtain a pinned AArch64 host/full-suite run with the required positive/refusal controls and an independently reviewed exact-head integration, then qualified gate evidence; do not claim GPU device load or deployment from this portable parser repair. Keep this PR draft. Do not bypass protections or reinterpret the historical #67/#70 merged heads as qualification for #80.
github-advanced-security[bot] reviewed (COMMENTED) on 2026-10-25 02:43 UTC
github-advanced-security[bot] commented on tests/native_artifact_manifest_test.c line 14 on 2026-10-25 02:43 UTC
CodeQL / File created without restricting permissions
A file may be created here with mode 0666, which would make it world-writable.
drakestapleton reviewed (COMMENTED) on 2026-10-25 03:45 UTC
Changed-head reinspection, exact fd51895647c5f79c8f43fac95b2fca2097a86ad3 (2026-10-25), not approval. The one-commit delta from previously inspected 16cefed... affects only tests/native_artifact_manifest_test.c: replaces fopen("wb") with open(..., O_CLOEXEC, 0600) + fdopen, and adds a permissive-umask negative control for private fixture file permissions. This directly addresses the prior CodeQL world-writable-file finding; current exact-head C/C++ and Python analyses and aggregate CodeQL report SUCCESS. The source admission parser's canonical-order logic is unchanged from the earlier bounded review.
Still outstanding: no executed AArch64/native full-suite qualification, established CUDApp signed-worker pipeline, exact-head signed judge PASS, applicable trust-surface operator disposition or independent final-head approval. Static analysis and this delta inspection do not supply those. Preserve the draft and existing owner; refresh any qualification after the head change and do not borrow earlier #67/#70 passes.
Apply it
git checkout -b patch-a25e94b1ec5a47283f9c154c7ef5152b3d6b21811920fbd8eeb0d044
curl -fsSL https://interplane.io/drakestapleton/CUDApp/patches/a25e94b1ec5a4728.patch | git am