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.
| Scenario | What happens | Result | Checks | Open |
|---|---|---|---|---|
ok | The system as designed. | PASS | - | report · Perfetto |
deadlock | gps asks nav for a hint while nav is waiting on gps. | FAIL | unexpected-edge, wait-cycle | report · Perfetto |
backdoor | display reads gps directly, bypassing nav. | FAIL | unexpected-edge | report · Perfetto |
camera-hang | The camera stops answering; display has no protection and freezes. | FAIL | isolation | report · Perfetto |
camera-hang-fixed | Same stuck camera, display reads it from its own thread. | PASS | - | report · Perfetto |
camera-dies | The camera process is killed; display treats the error as fatal. | FAIL | isolation | report · Perfetto |
camera-dies-fixed | Same kill, display degrades to "camera stale". | PASS | - | report · Perfetto |
slow-reply | nav takes 200 ms per route against a 50 ms budget. | FAIL | reply-budget | report · Perfetto |
ok-late | Trace started on a running system. | PASS | - | report · Perfetto |
deadlock-late | The deadlock happened before the trace; pidin shows who waits on whom. | FAIL | wait-cycle | report · Perfetto |
camera-hang-late | The camera stopped answering before the trace started. | FAIL | isolation | report · Perfetto |
prio-inversion | logger is fixed priority 10, display waits on it at 30 while media runs at 20. | FAIL | priority-inversion, reply-budget | report · Perfetto |
prio-inversion-fixed | Same load, logger channel without _NTO_CHF_FIXED_PRIORITY inherits 30. | PASS | - | report · Perfetto |
resmgr-ok | gps is a resource manager at /dev/cockpit/gps; nav uses open() and read(). | PASS | - | report · Perfetto |
resmgr-backdoor | Same resource manager, display opens /dev/cockpit/gps itself. | FAIL | unexpected-edge | report · 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):
| Build | Kernel | Blueprint |
|---|---|---|
| as designed | allows everything it does | PASS |
backdoor: display calls name_open("cockpit-gps") | Operation not permitted | kernel-denied: the refused connection is in the trace |
backdoor through the resource manager: open("/dev/cockpit/gps") | Operation not permitted | kernel-denied, the same |
| deadlock: gps asks nav for a hint | refuses gps's connection to nav, so there is no loop | kernel-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.