From 935adac52679b0b2d38342fe4721f12ee0cf1de5 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 10 Nov 2026 16:04:12 -0800 Subject: [PATCH 1/2] quest: plan fixes for main's red ctgrind and build nightlies Co-Authored-By: Claude Opus 5.5 --- quest/m0/build-nightly.md | 13 +++++++++++++ quest/m0/ctgrind-nightly.md | 14 ++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 quest/m0/build-nightly.md create mode 100644 quest/m0/ctgrind-nightly.md diff --git a/quest/m0/build-nightly.md b/quest/m0/build-nightly.md new file mode 100644 index 00000000..8283bfb2 --- /dev/null +++ b/quest/m0/build-nightly.md @@ -0,0 +1,13 @@ +# [XS] The build nightly passes on main + +## Goal + +Every row of `build.yml`'s nightly passes on `main`. After [moq-dev/rind#513](https://github.com/moq-dev/rind/pull/513) fixed the armv7 zeroing and Dart cross-target failures, three causes remain ([run 42918059953](https://github.com/moq-dev/rind/actions/runs/42918059953)). + +## Plan + +Planned with the maintainer on 2026-11-10 after triaging main's nightlies: ✅ m0, since m0 owns a failing `main`; ✅ one quest per workflow (rejected: one quest for every nightly). + +- **Dart on the Intel Mac.** `dart (macos-15-intel)` fails `hook_test.dart`'s "builds from source for the host" with `TimeoutException after 0:00:30`: it runs a cargo build inside the default test timeout. Recommended: give that test an explicit, generous timeout; building first is the alternative. It was hidden behind the cross-target failure #513 fixed. +- **Android emulation.** Both `android` rows fail with `Package 'qemu-user-static' has no installation candidate`, since `ubuntu-latest` moved to 26.04. Install `qemu-user-binfmt` instead, at `.github/workflows/build.yml` and the same line in `python.yml`. +- **Heap-scratch leak test on qemu targets.** The `qemu` rows (powerpc64, powerpc64le, riscv64, s390x, loongarch64) fail `heap_scratch::detects_a_leak_in_key_generation` (`test did not panic as expected`, `rind/tests/heap_scratch.rs:67`); the optimizer likely removes the unused `drop(vec![1u8; 32])`. Recommended: `drop(black_box(vec![1u8; 32]))`, then confirm the cause on one qemu row. Caused by [moq-dev/rind#581](https://github.com/moq-dev/rind/pull/581). diff --git a/quest/m0/ctgrind-nightly.md b/quest/m0/ctgrind-nightly.md new file mode 100644 index 00000000..2d8d17c9 --- /dev/null +++ b/quest/m0/ctgrind-nightly.md @@ -0,0 +1,14 @@ +# [S] The ctgrind nightly passes on main + +## Goal + +Every row of `ctgrind.yml`'s nightly passes on `main`. Today all ten unit rows and the armv7 adapters row fail ([run 42916803474](https://github.com/moq-dev/rind/actions/runs/42916803474)), for three causes none of which is a constant-time violation in shipped code. While it is red, a real violation would go unnoticed. + +## Plan + +Planned with the maintainer on 2026-11-10 after triaging main's nightlies: ✅ m0, since m0 owns a failing `main`; ✅ one quest per workflow (rejected: one quest for every nightly). + +- **Caller's key marked secret.** `cipher::ChaCha20::new` (`rind/src/mid/chacha20.rs:20`) calls `secret_slice` on the caller's `key` and never marks it public again. The `guard_pages::ciphers` test passes `&[7; 32]`, a constant in read-only data, which the `digests` test's `hmac::Key::new(&HMAC_SHA256, &[7; 32])` then reads, so its tag counts as secret and the test's `==` is flagged at `guard_pages.rs:233`. Fix it in the library: mark rind's own copy (`Self { key: into_secret(*key) }`), as `aes_kw.rs` and `aes_cbc.rs` do. `mid/ed25519.rs:26` (`secret_slice(seed)`) has the same pattern; fix it too, and check for any other `secret_slice` on a caller-owned argument. The bug dates to [moq-dev/rind#6](https://github.com/moq-dev/rind/pull/6); [moq-dev/rind#568](https://github.com/moq-dev/rind/pull/568)'s tests exposed it. +- **Guard-page test under valgrind.** `guard_pages::planted_over_read_faults` fails on the ARM rows (`reading before the buffer did not fault`): valgrind does not fault the child's read of the guard page there. ✅ Leave the `guard_pages` module out of `__ctgrind` builds, since it is a bounds test, not a constant-time one, and plain `cargo test` still runs it (rejected: skip only on ARM; detect valgrind and accept its report). Caused by #568. +- **armv7 PEM suppressions.** `admin/ctgrind.supp` silences rind-rcgen's PEM framing (`rind-rcgen-pem-utf8-index`, `read_until`) only as `Memcheck:Cond`/`Value8`; 32-bit ARM reports `Value4`. Add the `Value4` forms. Caused by [moq-dev/rind#515](https://github.com/moq-dev/rind/pull/515); it surfaced once the adapters row stopped dying at its `-lpython3.11` link step. +- The `definitely lost` lines in the logs also appear in passing runs and never count toward `admin/ctgrind`'s exit code; ignore them. From 4e9a66bd74c0fc0c16c81b4a731062a2b53a3661 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 10 Nov 2026 16:05:49 -0800 Subject: [PATCH 2/2] quest: fix review nits in the nightly-fix quests Co-Authored-By: Claude Opus 5.5 --- quest/m0/build-nightly.md | 2 +- quest/m0/ctgrind-nightly.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/quest/m0/build-nightly.md b/quest/m0/build-nightly.md index 8283bfb2..32693722 100644 --- a/quest/m0/build-nightly.md +++ b/quest/m0/build-nightly.md @@ -9,5 +9,5 @@ Every row of `build.yml`'s nightly passes on `main`. After [moq-dev/rind#513](ht Planned with the maintainer on 2026-11-10 after triaging main's nightlies: ✅ m0, since m0 owns a failing `main`; ✅ one quest per workflow (rejected: one quest for every nightly). - **Dart on the Intel Mac.** `dart (macos-15-intel)` fails `hook_test.dart`'s "builds from source for the host" with `TimeoutException after 0:00:30`: it runs a cargo build inside the default test timeout. Recommended: give that test an explicit, generous timeout; building first is the alternative. It was hidden behind the cross-target failure #513 fixed. -- **Android emulation.** Both `android` rows fail with `Package 'qemu-user-static' has no installation candidate`, since `ubuntu-latest` moved to 26.04. Install `qemu-user-binfmt` instead, at `.github/workflows/build.yml` and the same line in `python.yml`. +- **Android emulation.** The `android` rows fail (the armv7 row first; fail-fast cancels the rest) with `Package 'qemu-user-static' has no installation candidate`, since `ubuntu-latest` moved to 26.04. Install `qemu-user-binfmt` instead, at `.github/workflows/build.yml` and the same line in `python.yml`. - **Heap-scratch leak test on qemu targets.** The `qemu` rows (powerpc64, powerpc64le, riscv64, s390x, loongarch64) fail `heap_scratch::detects_a_leak_in_key_generation` (`test did not panic as expected`, `rind/tests/heap_scratch.rs:67`); the optimizer likely removes the unused `drop(vec![1u8; 32])`. Recommended: `drop(black_box(vec![1u8; 32]))`, then confirm the cause on one qemu row. Caused by [moq-dev/rind#581](https://github.com/moq-dev/rind/pull/581). diff --git a/quest/m0/ctgrind-nightly.md b/quest/m0/ctgrind-nightly.md index 2d8d17c9..19520c28 100644 --- a/quest/m0/ctgrind-nightly.md +++ b/quest/m0/ctgrind-nightly.md @@ -8,7 +8,7 @@ Every row of `ctgrind.yml`'s nightly passes on `main`. Today all ten unit rows a Planned with the maintainer on 2026-11-10 after triaging main's nightlies: ✅ m0, since m0 owns a failing `main`; ✅ one quest per workflow (rejected: one quest for every nightly). -- **Caller's key marked secret.** `cipher::ChaCha20::new` (`rind/src/mid/chacha20.rs:20`) calls `secret_slice` on the caller's `key` and never marks it public again. The `guard_pages::ciphers` test passes `&[7; 32]`, a constant in read-only data, which the `digests` test's `hmac::Key::new(&HMAC_SHA256, &[7; 32])` then reads, so its tag counts as secret and the test's `==` is flagged at `guard_pages.rs:233`. Fix it in the library: mark rind's own copy (`Self { key: into_secret(*key) }`), as `aes_kw.rs` and `aes_cbc.rs` do. `mid/ed25519.rs:26` (`secret_slice(seed)`) has the same pattern; fix it too, and check for any other `secret_slice` on a caller-owned argument. The bug dates to [moq-dev/rind#6](https://github.com/moq-dev/rind/pull/6); [moq-dev/rind#568](https://github.com/moq-dev/rind/pull/568)'s tests exposed it. -- **Guard-page test under valgrind.** `guard_pages::planted_over_read_faults` fails on the ARM rows (`reading before the buffer did not fault`): valgrind does not fault the child's read of the guard page there. ✅ Leave the `guard_pages` module out of `__ctgrind` builds, since it is a bounds test, not a constant-time one, and plain `cargo test` still runs it (rejected: skip only on ARM; detect valgrind and accept its report). Caused by #568. +- **Caller's key marked secret.** `cipher::ChaCha20::new` (`rind/src/mid/chacha20.rs:20`) calls `secret_slice` on the caller's `key` and never marks it public again. The `guard_pages::ciphers` test passes `&[7; 32]`, a constant in read-only data, which the `digests` test's `hmac::Key::new(&HMAC_SHA256, &[7; 32])` then reads, so its tag counts as secret and the test's `==` is flagged at `rind/src/low/guard_pages.rs:234`. Fix it in the library: mark rind's own copy (`Self { key: into_secret(*key) }`), as `aes_kw.rs` and `aes_cbc.rs` do. `mid/ed25519.rs:26` (`secret_slice(seed)`) has the same pattern; fix it too, and check for any other `secret_slice` on a caller-owned argument. The bug dates to [moq-dev/rind#6](https://github.com/moq-dev/rind/pull/6); [moq-dev/rind#568](https://github.com/moq-dev/rind/pull/568)'s tests exposed it. +- **Guard-page test under valgrind.** `guard_pages::planted_over_read_faults` fails on the ARM rows (`reading before the buffer did not fault`): valgrind does not fault the child's read of the guard page there. ✅ Leave the `low::guard_pages` test module out of `__ctgrind` builds, since it is a bounds test, not a constant-time one, and plain `cargo test` still runs it (rejected: skip only on ARM; detect valgrind and accept its report). Caused by #568. - **armv7 PEM suppressions.** `admin/ctgrind.supp` silences rind-rcgen's PEM framing (`rind-rcgen-pem-utf8-index`, `read_until`) only as `Memcheck:Cond`/`Value8`; 32-bit ARM reports `Value4`. Add the `Value4` forms. Caused by [moq-dev/rind#515](https://github.com/moq-dev/rind/pull/515); it surfaced once the adapters row stopped dying at its `-lpython3.11` link step. - The `definitely lost` lines in the logs also appear in passing runs and never count toward `admin/ctgrind`'s exit code; ignore them.