VssWardenQPP safety gatekeeper

QNX Global Hackathon · Automotive & Mobility

Same POSIX writes.
Two different vehicles.

Upstream QPP lets any process write any value to an actuator's .control node, and the last write wins. VssWarden patches the QNX 8.0 resource manager so COVESA VSS bounds, priority leases and crash recovery are enforced at /dev/signal — and every rejection leaves a ?warden receipt.

Boot framecomputed server-side by the C11 engine · ./build/vss-warden-cli --preset preset-2-adas-vs-ivi-hijack --seed 20261105

Arbitration bench

Two channels · one operation sequence · upstream QPP vs patched QPP

  • upstream QPP
  • VssWarden
  • raw diverges
  • warden rejects

C11 engineReady

Request
#0001
Seed
20261105
CH1Raw QPP (Unguarded)upstream · last write wins
1105501P2ΔOPENfd 1OPENfd 2WRITE100 msWRITE150 msWRITE200 ms?WARDEN210 ms
Cursor
#04 WRITE
Value
110
Hex
0x6e
Status
EOK
Holder
—
CH2VssWarden (Guarded)patched · bounds · lease · io_close_ocb
1105502EBUSYOPENfd 1OPENfd 2WRITE100 msWRITE150 msWRITE200 ms?WARDEN210 ms
Cursor
#04 WRITE
Value
0
Hex
0x00
Status
EBUSY
Holder
ADAS_AEB · P60
Step scrubberΔ diverged · P2← → scrub · click any column on either screen05 / 06
  • P1Bounds & upstream fixesP1_VSS_BOUNDS_AND_UPSTREAM_FIXmin · max · allowed · arraysize · FLOAT 22.5 · VECTOR_UINT32 > 6553500bounds rejectsheld 6/6
  • P2Priority arbitrationP2_PRIORITY_ARBITRATION_PREEMPTIONhigher QNX priority preempts .control · lower gets EBUSY01priority blocksheld 6/6
  • P3Dead-owner lease recoveryP3_DEAD_OWNER_LEASE_RECOVERYio_close_ocb crash or CLOCK_MONOTONIC expiry → standby or VSS default00lease recoveriesheld 6/6
  • Independent oracleAll pass18 step checks · 0 failures

Step dossier

#04 of 06

WRITEwrite(fd 1, 110)

t = 200 ms

  • CH11100x6eEOKno arbitration · no holder tracking
  • CH200x00EBUSYholder ADAS_AEB · P60 · pid 1040 · last EBUSY PRIORITY_PREEMPTED

P2Priority preemption held

Raw QPP committed 110 — last write wins. VssWarden answered EBUSY (PRIORITY_PREEMPTED) and kept 0 for ADAS_AEB · P60 · pid 1040.

qpp/iowrite.c:78-90 · blind last-write-wins on .control

Memory view

Δ bytes differ

int8 · two's complement

Vehicle/ADAS/CruiseControl/SpeedSet

CH1+006E= 110
CH2+0000= 0

8-bit word · MSB first · MSB weighs negative

CH101101110
CH200000000
CH1
64 + 32 + 8 + 4 + 2 = 110
CH2
all bits clear = 0

?warden receipt

step #04

cat "/dev/signal/Vehicle/ADAS/CruiseControl/SpeedSet?warden,text"

Guarded step receipt

{
  "stepIndex": 4,
  "status": "EBUSY",
  "committedControlValue": 0,
  "committedHex": "0x00",
  "activeHolder": {
    "fd": 2,
    "role": "ADAS_AEB",
    "pid": 1040,
    "priority": 60,
    "leaseExpiresMs": 1200
  },
  "lastRejection": {
    "errnoCode": "EBUSY",
    "ruleId": "PRIORITY_PREEMPTED",
    "reason": "Actuator locked by higher or equal priority active holder"
  }
}

Replay console

Host replay · C11 CLIdeterministic · clang -std=c11
$./build/vss-warden-cli --preset preset-2-adas-vs-ivi-hijack --seed 20261105

Re-runs the same preset and seed through build/vss-warden-cli on macOS or Linux.

QNX 8.0 target · /dev/signal
  1. 01# client priority 10; use its own QNX shell (on -p10 sh)
  2. 02exec 3>'/dev/signal/Vehicle/ADAS/CruiseControl/SpeedSet?control,text,priority=10,lease=1000,as=IVI_EcoMode'
  3. 03# client priority 60; use its own QNX shell (on -p60 sh)
  4. 04exec 4>'/dev/signal/Vehicle/ADAS/CruiseControl/.SpeedSet.control?priority=60,lease=1000,as=ADAS_AEB,text'
  5. 05printf '%s\n' '90' >&3
  6. 06printf '%s\n' '0' >&4
  7. 07printf '%s\n' '110' >&3
  8. 08cat "/dev/signal/Vehicle/ADAS/CruiseControl/SpeedSet?warden,text"

Upstream evidence

Where upstream QPP lets it through

Each scenario on the bench maps to these source locations in qnx/qnx-posix-publish-subscribe. The patch touches fourteen QPP files and applies with zero fuzz.

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