← Blog

· 18 min read #rust#mqtt#iot#unikernel#open source#security

urMQTT after v0.4.1: two editions, a real release key, and what someone from outside needs to try it

What happened on 5 and 6 November, and v0.4.2, the first release signed with a real key: the split into an open edition (everything that runs on virtio) and the commercial urMQTT Enterprise, with the promise that goes with it; a real release signing key that replaces the test key; the weak random-number path made an explicit choice; the network's MTU honoured; a first-hour guide and a list of known issues; Miri in CI from over an hour to minutes; and the mistakes we made on the way.

The previous text, urMQTT on a real ARM64 VPS, ended with its second update: v0.4.1, published on 5 November, with a fix for a TCP bug that was in every earlier release and a faster handshake on ARM64. This text covers the two days after that, 5 and 6 November. Of the previous "What comes next", X25519 in assembly had already shipped in v0.4.1, the decision on the random number generator's default was made, and the real signing key was generated. The old list (the public demo broker D1, fuzzing of the PCI and virtio parsers, the key dialog on the builder page), MQTT 5.0 and QoS 2 were not done.

Most of these two days were not about the kernel. They were about two questions: what is open and what is not, and what someone needs who finds the repository and wants to try it without asking us.

The note up front stays the same: the project is pre-alpha, the numbers measure code, tests and specific experiments, not maturity in production. Everything below went into v0.4.2, cut in the night to 7 November (the last section says what it contains and how we checked it).

How it looked over time

The numbers are computed with the method of the earlier texts (all .rs files outside vendor/ and fuzz/, #[test] functions, ## ADR- headings in docs/DECISIONS.md, git rev-list --count), by one script for all three rows; on the commit of the previous text's table it gives the same figures as then. As before, the project is built with Claude Code (commits carry Co-Authored-By: Claude), and on 6 November four branches ran in parallel (the release key, the entropy option, the community documents, the MTU), so the order of commits is not strictly the order of work.

Moment Commit Time Lines of Rust Tests ADRs Commits
previous text efddf6e 4 Nov, 03:18 117,084 978 134 244
v0.4.1 (its last update) 71990ac 5 Nov, 00:59 125,361 1,047 140 278
today, main f4156ed 6 Nov, 23:23 127,354 1,071 143 310
v0.4.2 55d33ca 7 Nov, 00:12 127,354 1,071 143 315

Since v0.4.1: 37 commits to v0.4.2 (the last five are the release preparation), +1,993 lines of Rust, +24 tests, +3 ADRs (ADR-262 to ADR-264). Little new kernel code: most of the work is documents, scripts, the website and the release tooling, which are not in the line count.

Two editions: the line is "virtio"

On 5 November the owner decided that urMQTT has two editions, and docs/EDITIONS.md writes down where the line runs and why.

  • urMQTT, the open edition, is this repository under Apache-2.0 OR MIT. It contains everything that runs on virtio devices: the protocol, the TCP/IP stack, TLS 1.3 with mutual authentication, the storage and its encryption, the kernel for aarch64 and x86_64, the tools, the builder page, the release process, and every virtio driver, present and future.
  • urMQTT Enterprise, the commercial edition, lives in a private repository. It is the same kernel plus drivers for devices that are not virtio (Google Cloud's gVNIC and NVMe disks, AWS's ENA and NVMe, Azure's VMBus devices and MANA, VMware's VMXNET3 and PVSCSI, physical network cards and disk controllers), and support with a service-level agreement. Google Cloud is its first target.

The line is drawn at the device interface, not at a hypervisor. A KVM guest on a cloud that gives it an ENA network card and an NVMe disk cannot run the open edition; a bhyve guest with virtio-net and virtio-blk can (expected, not tested). Whether a device is virtio can be read from its PCI vendor ID (1AF4), and the boot log names every PCI function it sees. The document's reason: every virtio device follows one public specification and can be tested in CI with QEMU's models; the cloud-native devices are one provider's interface each, often without an emulator, and bare metal needs a different driver for nearly every machine. That work is what the commercial edition pays for.

The promise (section 4), made by the owner for the lifetime of the project: what is open stays open; the line never moves backwards (it may move so that more is open, never the other way); no crippling (no limits on connections, cores, memory or throughput, no withheld security fixes, no delayed releases); one security process for both editions, with a fix to shared code released here no later than in the commercial edition; and a published audit summary for every commercial release.

On 6 November one rule was added, funded priority, open code: a commercial customer may pay for the priority of a feature that belongs to the open edition, such as QoS 2 or MQTT 5. The work is scheduled for that customer first, and the code lands in the open repository under its licence like any other. What is funded is the order, never the exclusivity.

Not settled yet, and section 9 says so: pricing, the terms of support, the order of targets after Google Cloud, and how out-of-tree drivers plug in. Today a commercial driver would need a patched kernel crate, because the driver tables and the configuration tags are closed lists in this repository; the planned fix, "kernel as a library" (roadmap NOW-18), is not done. The private repository exists and holds a skeleton; no Enterprise release has shipped, and nothing has run on Google Cloud.

Two more things came with the split. Every commit of a pull request must now carry a Signed-off-by: line (the Developer Certificate of Origin, checked in CI; CONTRIBUTING.md says how). And on this site, the Products page shows the two editions side by side, and the urMQTT Enterprise page describes the commercial one in 15 languages, 14 of them AI translations nobody has checked. Its status line reads, in full: "In development. No Enterprise release has shipped yet. We are looking for design-partner customers for the first target, Google Cloud. The terms of support and of a service-level agreement are not defined yet. Pricing on request."

For context, because the line is now about drivers: the virtio driver framework (ADR-257) and four drivers for a console, a memory balloon, input devices and vsock (ADR-258) were already in v0.4.0, each behind its own configuration key that defaults to "off". EDITIONS.md lists nine virtio device types with a driver. None of those four has run on a real VPS: three ran in QEMU on a Mac, and vsock only against a fake device in the tests. The one driver of that family seen working on a real server is the virtio-gpu console (ADR-256), as the update of the previous text described.

"Alpha" now has a definition

The roadmap is still a proposal: nothing in it is scheduled until the owner picks it. One part was decided on 6 November, "Community readiness", and with it a definition: the status word changes from "pre-alpha" to "alpha" when three things have landed on main: a real release signing key (NOW-2), the entropy option, meaning the weak seeding made visible and its default decided (NOW-4), and the MTU the network announces honoured (NOW-19). The owner makes the change.

All three landed on main on 6 November and are in v0.4.2. The label has not been changed: the README badge, SECURITY.md and KNOWN-ISSUES.md still say pre-alpha; the change is the owner's, after this release.

A real release signing key

Every release so far, v0.1.0 to v0.4.1, was signed with a minisign key we had called a test key from the start. Its secret half sat without a passphrase in a CI secret and on a development machine, so the documents now say what follows: the former test key 9229E05252D01F8E is considered compromised from the day the release key exists.

The new release key, 721316B961DCB94B (minisign.pub), was generated by the owner on 6 November. How the switch works (RELEASE.md section 9, the checklist in docs/release-key-rotation.md):

  • A key ring (keys/release-keys.json) holds both keys, each for a range of tags: the release key for v0.4.2 and later, the test key for v0.1.0 to v0.4.1 only. The builder page, the release mirror and urmqtt-config check-release verify a release with the key its signature names and refuse an unknown key or a key outside its range. The old releases are marked "signed with the project's former test key".
  • The old releases are pinned. A range alone would let anyone with the test secret sign a different SHA256SUMS and label it v0.4.1. So the ring also holds the SHA-256 of the published SHA256SUMS of each of the six test-key releases (fetched from GitHub and checked on 6 November), and for those tags nothing else is accepted. What this does not cover is written next to it: a file added to an old release later is under no signature, and the pins are as trustworthy as the repository (changing them is a visible commit).
  • Release assets without throwaway certificates. Until v0.4.1 every release carried a development build (urmqtt-dev-*) with keys anyone could read. From v0.4.2 on the workflow publishes only the release kernel, the ISO with an empty configuration, its raw disk image, the template, the SBOM, SHA256SUMS and its signature; it checks that no asset contains a PEM private key and verifies the signature before it publishes.
  • A production PKI. scripts/pki.sh with docs/PKI.md: an offline certificate authority with a passphrase, server, device and service certificates, signing a device's own request, rotation, revocation and the control key. It is tested on the host; an end-to-end run on a VM is still open (NOW-3).

One thing about the new key in plain words. It is also without a passphrase, because the release workflow signs unattended, and its secret is in the same kind of CI secret as the old one. The difference is how it came about and how it is kept: the owner generated it on his own machine, the checklist forbids that the secret ever reaches an agent session or a repository, and asks for two copies encrypted at rest, one offline. Signing in CI is a trade-off we chose, not a hardware security module.

The weak random-number path is an explicit choice

The previous text found that the netcup ARM server has neither a virtio random number device nor the CPU's RNDR instruction, so its generator rests on CPU timing jitter and the firmware's values, the weakest seeding the kernel accepts (ADR-038). Should a production image refuse to boot there? The owner's answer (ADR-263): the default stays "allowed", because a refusing default would stop images on such clouds with a message nobody expects, and the choice is made visible wherever someone makes or uses it:

  • the builder page has a "Random numbers" choice (allow the CPU-jitter fallback, or require a hardware generator), with a warning while the first is chosen;
  • urmqtt-config pack, verify and show print a WARNING line while the fallback is allowed;
  • the boot warning names the key that refuses such hosts (entropy.fallback = "none"), and so does the refusal;
  • a new retained topic, $SYS/broker/entropy/source, says what seeded the generator: virtio-rng, rndr, both, or jitter+firmware.

Nothing about the generator, the estimator or the credited bits changed. A smoke scenario checks the topic with and without a virtio-rng device, and the refusal.

The network's MTU is honoured

While preparing scripts for Google Cloud on 5 November we found that every packet urMQTT sends was sized for a 1500-byte MTU, and that Google Cloud's networks use 1460 by default (ADR-264). There a full-sized TCP segment is dropped without an error: the handshake and small messages pass, and a certificate flight or a 4 KiB publish stalls until a timeout.

The fix: the DHCP client reads option 26 (the interface MTU; 576 to 9000 is used, anything else is ignored with a warning), a new optional key network.mtu sets it by hand, and TCP announces and uses an MSS of the MTU minus 40. Open connections follow a lower MTU at a DHCP renewal, and frames above 1500 bytes are never sent. The key needs configuration format 7; a configuration without it keeps its old format, and a v0.4.x template refuses one that sets it instead of booting a kernel that would ignore it. The boot log and $SYS/broker/net/mtu show the value.

A smoke group checks it under QEMU: with a static 1460, a 4 KiB message crosses mutual TLS with no frame from the guest above 1474 bytes and an announced MSS of 1420; a DHCP server announcing 1460, 9000 and 300 gets the expected answers. What this does not show, as the ADR says: that the broker survives a network that really drops larger frames (QEMU's network accepts them), and Google Cloud itself. Path MTU discovery is not done.

For someone who wants to try it

The other part of "Community readiness" is for a person who finds the repository and has no one to ask:

  • docs/FIRST-HOUR.md: from nothing to a first MQTT message over mutual TLS in about an hour (a test PKI, an image, QEMU on a laptop or a KVM VPS, mosquitto_pub and mosquitto_sub, the five most likely failures with the log line each prints). It ends with what was actually run for it: the v0.4.1 template on a Mac, aarch64 under HVF and x86_64 under TCG, including an install and a retained message that survived a killed QEMU. Not run: the builder page itself, the Linux commands, KVM on Linux, any VPS.
  • docs/KNOWN-ISSUES.md: 32 known problems and limits, each with what it means, a workaround and where it is tracked (MQTT 3.1.1 only, QoS 0 and 1 only, no WebSocket, no IPv6, no Firecracker, two real machines only, and so on). A CI script fails when a row cites a finding, roadmap item or ADR that no longer exists, or a finding since marked fixed.
  • Issue forms for a bug, a boot failure and a question, with vulnerabilities pointed to the private advisory; a pull-request template with the DCO sign-off and the edition rule for drivers that are not virtio.
  • The README brought in line with the roadmap: a "Start here" line, the badges and banners, and rows for milestones that were missing.

Miri in CI: from over an hour to minutes

Miri runs the unit tests of eight host crates under an interpreter that detects undefined behaviour; it is the only check of the memory model of the parsers and buffers that runs on every change. It was also the slowest part of CI: each crate's tests ran one after another, and on the v0.4.1 commit the jobs for tls and cfg took 69 and 68 minutes. ADR-262 measured first: in tls, two tests were 1,634 of 2,042 seconds; in cfg, seven PBKDF2 tests took 1,075 of 1,424 seconds, although the script was meant to skip them (below).

What changed (docs/VERIFICATION.md): one process per test, four at a time, with the same tests (the counts were compared per crate); the two slow tests run a smaller size under Miri only, and full size in cargo test; a job whose inputs hash to the key of an earlier green run reports "cached" (what the key cannot see is written down, among it new proptest seeds); and a negative control: every Miri job also runs a deliberate use-after-free and fails unless Miri reports it, so a green job also shows that Miri could see a bug.

On the GitHub runner, the first run without a cache (5 November) took 6 minutes for tls and 5 for cfg; a cached job takes about 20 seconds; on 6 November, when the MTU change touched the configuration crate, cfg ran in full in 8 minutes.

Mistakes we found ourselves

  • A skip list that never skipped. Since 3 November the Miri script had seven skip patterns of the form passwd::<name> for tests called passwd::tests::<name>. They matched nothing, so the PBKDF2 tests the comment said Miri skips ran under Miri, for about three quarters of the cfg job's time. A skip that matches nothing is not an error, so nobody noticed until each test was timed. Now 34 of the crate's 47 tests run under Miri instead of 41.
  • Firecracker, claimed for 22 minutes. The first version of EDITIONS.md listed Firecracker among the hypervisors the open edition runs on. Firecracker gives virtio devices over MMIO and starts the guest without UEFI or BIOS; our virtio transport is PCI and our kernel is started by firmware. The correction says so, and that support would be open-edition work.
  • The audit inventory, twice. CI checks that the generated list of unsafe sites matches the code. On 5 November the Miri negative control (unsafe on purpose) was committed without regenerating it; on 6 November the merge of the release key failed the same check, and the host tests too, because the key-ring tests still assumed a placeholder key. Both were fixed by the next commit, and CI was green on the release commit.
  • Documents written in parallel describe the morning, not the evening. KNOWN-ISSUES.md and the roadmap's NOW-2 entry were written while the release key, the entropy option and the MTU fix were still on their branches. Until the release preparation they still said that the key rotation "waits for the owner", that the MTU fix is open, and that $SYS does not show the entropy source; the preparation of v0.4.2 corrected them, a few hours before the tag.
  • The trust-anchor tables that were never built and the TCP FIN loop are in the v0.4.1 update of the previous text and in ADR-259 and ADR-261; we do not repeat them.
  • CI's "Smoke misc" job failed twice on commits that changed only documents and the website, once on a TLS handshake that timed out under emulation, once on an admission check. The run after the second passed; neither failure is explained.

What is still not done, and not proven

v0.4.2 is released (GitHub, pre-release, tagged on commit 55d33ca after CI passed all 24 jobs on that commit). It is the first release signed with the release key 721316B961DCB94B (trusted comment urMQTT v0.4.2 release 55d33ca…) and the first whose assets carry no development build: urmqtt-v0.4.2.elf, .iso and .img with the empty configuration (the .iso is byte for byte the template), the template ISO, the SBOM, SHA256SUMS and its signature. What we checked after the workflow finished: the minisign signature with the key fetched at the tag, every SHA-256, the build attestations of the kernel and of the SBOM (222 components), that the published v0.4.2 template takes a format-7 configuration (network.mtu) and the v0.4.1 template refuses it with "use a newer release", and that the release mirror lists v0.4.2 as verified with the release key and format 7 while v0.1.0 to v0.4.1 stay listed with the former test key. The builder page on this site offers it. The limits of the previous releases stay: a pre-alpha, one real server per architecture, the new drivers unrun on real machines, AI translations.

  • Nothing has run on Google Cloud. The MTU fix is tested under QEMU only, on a network that does not drop larger frames.
  • The four new virtio drivers have not run on a real machine; vsock only against a fake device.
  • The alpha label is not applied. Its three conditions are in v0.4.2; the change is the owner's.
  • The x86_64 suites are not in CI. CI's host tests run on arm64, so the x86_64 unit tests run nowhere, and the x86_64 and universal-ISO smoke suites run only by hand. Nothing of v0.4.0, v0.4.1 or v0.4.2 ran on an x86_64 KVM guest.
  • The production PKI is tested on the host only.
  • The translations of the site's new pages and of the builder page's new texts are AI translations nobody has checked; so are the translations of this text.
  • From the previous text, unchanged: the DIT flag is set nowhere (A255-W2); the Neoverse N1 figures are one server and one run each; no independent audit, no bare metal, no IOMMU.

What comes next

  1. The status word, if the owner decides v0.4.2 meets the definition.
  2. A first boot on Google Cloud on an instance type with virtio-net and a virtio-scsi disk: the open edition's job, and the first real test of the MTU change.
  3. "Kernel as a library" (NOW-18): drivers outside this repository registering without a patched kernel, with the open kernel's behaviour and its reproducible build unchanged.
  4. Still open: D1, fuzzing of the PCI and virtio parsers, the key dialog on the builder page, and the x86_64 suites in CI.

The code is at github.com/zeljan-alduk/urMQTT; CHANGELOG.md lists everything since v0.4.1 under 0.4.2, and SECURITY.md has the table of signing keys. Pre-alpha, as before. If you try it, the issue forms are there for what you find; security reports go privately, as SECURITY.md says.

Comments

Comment rules

Comment rules

Comments are here to share experience and questions about the topics of the blog. These rules keep the discussion useful for everyone.

  1. Be civil No insults, threats, harassment, hate speech or discrimination on any grounds. Criticise the argument, not the person.
  2. Stay on topic A comment should relate to the post or to the discussion under it.
  3. No ads or spam No advertising, chain messages or links without context. Links and images are welcome when they add to the discussion.
  4. Others' privacy Do not post other people's personal data: full names of private individuals, addresses, phone numbers, emails, photos without consent.
  5. Copyright Post only content you are allowed to share. When quoting, name the source.
  6. One identity Use one nickname and do not pose as someone else.
  7. Email confirmation A comment is published only after you confirm the link sent by email. The address is not shown and not used for anything else; unconfirmed comments are deleted after 48 hours.
  8. Moderation Comments that break the rules are hidden or deleted without notice, and a discussion may be locked. Moderators' decisions are final.
  9. Responsibility The author is responsible for the content of a comment. Comments do not reflect the views of ALDO TECH.
  10. Reporting Report inappropriate content to info@aldo.tech.