A couple of weeks ago, I wrote about how the poor design of Internet of Things devices poses a serious threat to the Internet. By an interesting coincidence, security guru Bruce Schneier wrote about the same issue on the same day, albeit rather more authoritatively. Other articles on the topic continue to appear, as people begin to wake up to the seriousness of this issue.

On Monday, I attended the opening day of Oscon in London, and listening to Canonical's Mark Shuttleworth talk about "Brilliant pebbles," it seemed to me that he was outlining part of a possible solution to IoT's problems. Here's a description of his keynote:

Small is beautiful. Mark Shuttleworth explains why your next million is more likely to come from an afternoon tinkering on your laptop and a tiny PC than beating your neighbour to Web scale on the cloud. From smart switches to smart drones, from the home to the office to the farm to the space station—whether blockchains or neural nets—the next wave is all about delivering your best bits to brilliant pebbles.

Ubuntu is already massively successful in the cloud. According to one of Shuttleworth's presentation slides, 70 percent of images on Amazon Web Services, 80 percent of Azure's GNU/Linux, 70 percent of Docker images, and 65 percent of large OpenStack systems are all running Ubuntu. He called it "the default platform for scale-out."

Its announcement of the latest Ubuntu 16.10 (Yakkety Yak) also emphasised cloud computing. Shuttleworth said: "The world’s fastest hypervisor, LXD, and the world’s best cloud operating system, Ubuntu, together with the latest OpenStack and Kubernetes make for the world’s fastest and best private cloud infrastructure." But his OSCON keynote was largely about the Internet of Things, and Ubuntu's new snap packaging:

A snap is a fancy zip file containing an application together with its dependencies, and a description of how it should safely be run on your system, especially the different ways it should talk to other software. Most importantly snaps are designed to be secure, sandboxed, containerised applications isolated from the underlying system and from other applications. Snaps allow the safe installation of apps from any vendor on mission critical devices and desktops.

As Shuttleworth pointed out on Monday, snap packaging addresses some of the major problems with Internet of Things devices today. The use of signed snaps makes it much harder for software to be hacked, and sandboxing limits the damage even if devices are somehow compromised.

Oh, snap...

But that's only part of the solution. The technical side of things has always been the easy part: the difficult bit is getting manufacturers to adopt Ubuntu snaps or equivalent. The obvious way to do that is through legislation. Governments would only allow Internet of Things devices to be sold if they could show that they used one of these sandboxed approaches, and that they updated their firmware when bugs were discovered.

Manufacturers might also be required to place the keys used for signing snaps in escrow in order to deal with situations where they go out of business. In that case, third parties could be authorised by the authorities to issue updates to critical vulnerabilities and prevent abandoned IoT devices turning into a massive botnet—and de-fanging those that have already been subverted.

These aren't unreasonable requirements—they are the digital equivalent of requiring that a device passes basic electrical safety tests before it can be sold to the public. If enough of the larger markets introduced this approach, even no-name manufacturers in China, say, would comply, because otherwise no international company would be prepared to pick up their devices for wider distribution.

Another reason why it would not be unreasonable to insist that IoT devices pass this kind of digital safety test is that with Ubuntu snap packaging, the technology is not only available now, it is free. That means that there is no price barrier for even the smallest manufacturer to adopt it. Shuttleworth says Ubuntu is already being widely used for the Internet of Things (see his slide reproduced above), so moving to snaps would be a natural transition for many.

One other knock-on effect of governments requiring some form of signed and sandboxed packaging with guaranteed updates is likely to be an even wider use of Ubuntu in the IoT world, for the reasons mentioned before. The year of the GNU/Linux desktop may never arrive, but if Ubuntu ends up dominating both cloud computing and the Internet of Things, who cares?