VssWardenQPP safety gatekeeper

Interactive <google-codelab> · Best Codelab / Tutorial

Teach QPP to say no.

Diagnose three upstream gaps, apply patches/qpp-vss-warden.patch with zero fuzz, arbitrate .control writes from a POSIX shell, recover from a crashed holder, then prove P1–P3 with fast-check. Host replay uses C11 WASI; QNX SDP 8.0 dual-arch builds and QNX 8.0 QEMU execution are target-verified.

Steps
05
Duration
~26 min
Toolchain
clang · patch · echo / cat · npm test

Step 1 of 5 · 5 min

Diagnose the 3 Upstream QNX 8.0 QPP Safety & Correctness Gaps

Fetch the official QNX POSIX Publish Subscribe (QPP) source at b5ca892f into a local checkout and identify the 3 SDV safety and data-corruption gaps. Upstream licensing remains separate from this project's Apache-2.0 license.

Run4 commands

  1. $bash scripts/fetch-qpp.sh .scratch/qpp-patched
  2. $sed -n '68,78p;432,448p' .scratch/qpp-patched/qpp/value.c
  3. $sed -n '50,64p' .scratch/qpp-patched/qpp/metadata.c
  4. $sed -n '75,92p' .scratch/qpp-patched/qpp/iowrite.c

Code & diagnostic output

/* Gap 1: qpp/value.c:73 & qpp/value.c:434-447 + qpp/metadata.c:54-59 */
// Upstream qpp/value.c:73 caps VECTOR_UINT32 at UINT16_MAX (65535) with 2-byte element size:
[VECTOR_UINT32] = {0, UINT16_MAX, sizeof(uint16_t), "uint32[]"},
// Upstream qpp/value.c:438 & 445 decode JSON float/double into json_d, but assign json_l (0):
case FLOAT:  ((float *)data_ptr)[idx]  = (float)json_l;  /* corrupts 22.5 -> 0.0 */
case DOUBLE: ((double *)data_ptr)[idx] = (double)json_l;

/* Gap 2: qpp/iowrite.c:78-90 & qpp/iowrite_text.c:112-124 */
// Blind last-write-wins on .control lets IVI (P10) overwrite ADAS AEB (P60).

/* Gap 3: qpp/ioclose.c & qpp/main.c:160 */
// No io_close_ocb holder crash rollback, no CLOCK_MONOTONIC lease TTL, and no ?warden receipt.

Verified references

  • qpp/README.md:187-199min, max, allowed, arraysize marked Used By QPP? NO
  • qpp/value.c:73VECTOR_UINT32 capped at UINT16_MAX with sizeof(uint16_t)
  • qpp/value.c:434-447FLOAT/DOUBLE default assigns json_l instead of json_d
  • qpp/metadata.c:54-59string-only metadata decoding fails with EINVAL on numeric/array attributes
  • qpp/iowrite.c:78-90 & qpp/iowrite_text.c:112-124blind last-write-wins on .control