Blueprint

One contract, two enforcers: Blueprint checks a QNX 8.0 system against its message architecture in CI, and turns the same file into a security policy the kernel enforces.

Write the design down

A short YAML contract: who may send messages to whom, how long a server may keep a client waiting, which process must survive when another fails.

Before release: the trace

Blueprint rebuilds every message from a QNX kernel trace and fails the build when the system breaks the contract, with the trace events to prove it.

After release: the kernel

The same file becomes the channel rules of a QNX security policy. In secure mode a backdoor gets Operation not permitted.

Watch the 1:49 video of all of it.

Try it

git clone https://github.com/DmitriyTopka/qnx-blueprint.git
cd qnx-blueprint
python3 -m venv .venv && . .venv/bin/activate
python3 -m pip install .
blueprint demo

No QNX target, SDP or API key needed. Or read the step-by-step codelab, and its companion that boots QNX 8.0 in fully secure mode from a policy you can check: Lock a QNX 8.0 system to its design.

Every recorded scenario

Traces recorded on QNX 8.0 x86_64 in QEMU from the demo cockpit. Each report is the HTML Blueprint writes; open the Perfetto file at ui.perfetto.dev to see every message as an arrow between threads. The expected result of each was written down before the checks ran.

ScenarioWhat happensResultChecksOpen
okThe system as designed.PASS-report · Perfetto
deadlockgps asks nav for a hint while nav is waiting on gps.FAILunexpected-edge, wait-cyclereport · Perfetto
backdoordisplay reads gps directly, bypassing nav.FAILunexpected-edgereport · Perfetto
camera-hangThe camera stops answering; display has no protection and freezes.FAILisolationreport · Perfetto
camera-hang-fixedSame stuck camera, display reads it from its own thread.PASS-report · Perfetto
camera-diesThe camera process is killed; display treats the error as fatal.FAILisolationreport · Perfetto
camera-dies-fixedSame kill, display degrades to "camera stale".PASS-report · Perfetto
slow-replynav takes 200 ms per route against a 50 ms budget.FAILreply-budgetreport · Perfetto
ok-lateTrace started on a running system.PASS-report · Perfetto
deadlock-lateThe deadlock happened before the trace; pidin shows who waits on whom.FAILwait-cyclereport · Perfetto
camera-hang-lateThe camera stopped answering before the trace started.FAILisolationreport · Perfetto
prio-inversionlogger is fixed priority 10, display waits on it at 30 while media runs at 20.FAILpriority-inversion, reply-budgetreport · Perfetto
prio-inversion-fixedSame load, logger channel without _NTO_CHF_FIXED_PRIORITY inherits 30.PASS-report · Perfetto
resmgr-okgps is a resource manager at /dev/cockpit/gps; nav uses open() and read().PASS-report · Perfetto
resmgr-backdoorSame resource manager, display opens /dev/cockpit/gps itself.FAILunexpected-edgereport · Perfetto

The kernel enforcing the same contract

QNX 8.0 booted in fully secure mode, with a security policy that matches the contract (aarch64, recorded; x86_64 by hand, same answers):

BuildKernelBlueprint
as designedallows everything it doesPASS
backdoor: display calls name_open("cockpit-gps")Operation not permittedkernel-denied: the refused connection is in the trace
backdoor through the resource manager: open("/dev/cockpit/gps")Operation not permittedkernel-denied, the same
deadlock: gps asks nav for a hintrefuses gps's connection to nav, so there is no loopkernel-denied for gps -> nav, and stuck-reply

Serial logs of both secure boots, and checksums showing that the policy the kernel loaded (/proc/boot/secpol.bin) is the one compiled from this repository: evidence.

On a system we didn't write

A QNX image with only QNX's own services running: blueprint init --all maps eight message paths between the shell, procnto, devb-eide, io-sock, pipe and io-usb-otg, and the check passes (report).

Is the parser right?

Every trace in the repository was also printed with QNX's own traceprinter and compared event by event: 1,071,509 events in 25 traces, on x86_64 and aarch64, with and without wide mode and in secure mode. None missing, extra or different. The table.

Source, README and FAQ on GitHub.