Security on devices with Zephyr RTOS: everything that matters

  • Zephyr combines real-time, modularity and extensive security features such as MPU and verified boot.
  • Complete network stack: BLE/BT5, Thread, 6LoWPAN, CoAP, MQTT, Wi-Fi and Ethernet for multiple IoT scenarios.
  • Audits revealed flaws in IPv4, MQTT, and USB; mitigations and prioritized fixes exist.
  • Integrations with Clea (Astarte/Edgehog) and Parasoft tools accelerate management, quality, and certification.

Security on devices with Zephyr RTOS

In the Internet of Things landscape , the trend toward edge computing is changing the game: devices are processing data locally, reducing reliance on the cloud, and must operate reliably, predictably, and with limited resources. In this context, Zephyr RTOS has become a very strong contender thanks to its modular design, real-time focus, and truly broad connectivity support.

Beyond the marketing, what's interesting is how Zephyr addresses real-world problems: deterministic scheduling, fine-tuning memory usage, a modern network stack, a consistent controller model, built-in security mechanisms (including MPU and secure boot), and an active community that promotes standards and best practices. If you're looking for an IoT platform that won't let you down in production, it's worth taking a closer look.

Why Zephyr fits into the edge IoT

Secure IoT RTOS

One of the key requirements of edge computing is real-time execution with predictable latency. Zephyr incorporates preemptive scheduling based on priorities and time allocation among threads of equal priority, making it a perfect fit for industrial automation, automotive, or medical devices, where every millisecond counts.

This deterministic approach is enhanced by integrating with device management platforms such as Clea Edgehog , which allow you to observe behavior in the field, set time windows for critical tasks, and orchestrate updates without losing control over application deadlines.

Footprint and resource management: modularity well understood

Zephyr's architecture is highly configurable , so you only compile what you need. The project promotes a SASOS (single address space) and generates a monolithic image tailored to the application: all system resources are defined at compile time, reducing code size and improving performance.

Thanks to this modularity, the same device tree and Kconfig allow you to trim down drivers, services, and network stacks to work with everything from minimal sensors to powerful gateways . In smart city deployments, for example, you can maintain compact images for low-power nodes while simultaneously enabling advanced features on hub nodes.

When data orchestration comes into play, combining it with Clea Astarte helps move telemetry and commands efficiently between edge and cloud, without wasting memory or CPU cycles on the device.

Comprehensive connectivity: from BLE to MQTT, including Thread and CoAP

Zephyr comes standard with a modern network stack supporting Bluetooth (BLE and 5.0) , Thread, 6LoWPAN, CoAP, MQTT, IPv4/IPv6, Wi-Fi, Ethernet, CANbus, and USB/USB-C, plus platform-specific options like Zigbee or LoRa. This diversity lets you choose the right standard without changing your RTOS.

In practice, you can set up anything from simple sensor networks to complex industrial systems, combining MQTT for telemetry, CoAP in constrained environments, or BLE for local pairing. Interoperability facilitates integration with existing infrastructure and accelerates time-to-market.

  • IoT protocols: CoAP, LwM2M, MQTT, OpenThread, 6LoWPAN.
  • Transportation/Means: Bluetooth 5.0/BLE, Wi-Fi, Ethernet, CANbus, USB/USB-C.

Hardware and driver abstraction layer

Zephyr's HAL abstracts silicon details so that the same application code can run on different architectures such as ARM Cortex-M , Intel x86, RISC-V ( for example, security hardware like the Tillitis TKey ), or ARC. The driver model and Board Support Packages help incorporate new peripherals without rewriting the application.

The community provides ongoing support for boards, sensors, and drivers , which translates into less friction when porting your project to a new microcontroller or adding capabilities, keeping maintenance under control.

Basic security: MPU, isolation, and verified boot

In IoT, simply functioning isn't enough; it must be secure . Zephyr includes support for MPUs (Memory Protection Units), thread isolation, and secure boot mechanisms—like those provided by OpenTitan —to ensure that only authenticated firmware runs.

The project operates with a “security by design” mindset: fuzzing tests , static analysis, pentesting, code review, backdoor analysis and threat modeling are all part of the development process, complemented by a vulnerability response team and responsible disclosure practices.

In terms of protocols, TLS/DTLS is considered to protect communication, and cryptographic libraries for encryption and key management are included , which is crucial when telemetry crosses untrusted networks or the device is deployed in exposed environments.

Audits and known vulnerabilities: what you need to know

Transparency in security is essential. An NCC Group audit listed 25 vulnerabilities in Zephyr and 1 in MCUboot, broken down as follows: 6 in the network stack, 4 in the kernel, 2 in the shell, 5 in system call drivers, 5 in USB, and 3 in the firmware update mechanism.

Two issues were classified as critical (impacting IPv4 and the MQTT parser), two as high, nine as moderate, nine as low, and four as "to be taken into account." At the time of disclosure, fixes had been prepared for the 15 most critical issues, with others remaining to be addressed to prevent denial-of-service conditions or improve kernel defenses.

Among the most significant findings were a remotely exploitable vulnerability in IPv4 that caused memory corruption when processing manipulated ICMP packets, and a bug in the MQTT parser due to a lack of length validation that could lead to remote code execution. Less severe DoS vulnerabilities were also identified in IPv6 and in the CoAP implementation.

At the local level, several vulnerabilities allowed for DoS attacks or kernel-privileged execution due to insufficient argument validation in system calls (including a case of a negative syscall number that caused integer overflow). Weaknesses were also noted in the ASLR implementation and the use of stack canaries, reducing its effectiveness.

The USB subsystem was plagued with several problems: in USB mass storage, buffer overflows and kernel code execution were possible when connecting the device to a malicious host; in USB DFU, modified firmware could be uploaded to the flash memory without encryption, bypassing secure boot mode with signature verification . In MCUboot, a non-critical buffer overflow was detected when using SMP over UART.

Furthermore, a specific issue was documented in BLE: a malicious device could cause an overflow by sending a malformed advertisement packet, potentially impacting the victim's device with DoS or RCE. These lessons underscore the need to keep versions up to date, strengthen validations, and proactively implement mitigation measures.

Integration with Clea (SECO): fleet orchestration and management

SECO has released SDKs that connect Zephyr with its Clea suite: the Astarte Device SDK for data orchestration and the Edgehog Device Component for device management. This integration offers secure pairing, data synchronization, MQTT-based communication, interface definition generation, and edge analytics.

On the management side, Edgehog enables OS and hardware status reporting, OTA updates , health monitoring, and remote control, facilitating operations at scale. Compatibility with a wide range of platforms reduces time-to-market and allows even less resource-intensive devices to connect seamlessly.

SECO's strategy involves open collaboration and contributing to the Zephyr ecosystem. The company emphasizes that these components expand the range of supported applications and open the door to new use cases in edge AI/ML, data orchestration, and fleet management.

Quality, compliance and certification: the role of Parasoft

Project Zephyr is working to raise the bar for code security and quality. In this vein, Parasoft has joined the project's security committee to promote test automation and support security certification.

Their tools cover static analysis, unit testing, and structural coverage, with support for standards such as MISRA C:2012 and CERT. They also provide deliverables that support SIL 3 (SC3) certification according to IEC 61508 and analysis dashboards for continuous monitoring, supporting long-term support (LTR) releases.

Parasoft's experience in critical environments fits with the project's objective: a reliable codebase , with repeatable processes, clear metrics, and evidence of compliance that facilitates audits and deployments in regulated domains.

System architecture and layers

Zephyr is structured in layers to keep responsibilities separate. At the center is the real-time kernel , which provides scheduling, interrupts, and synchronization. Above it are system services (memory management, I/O, libraries), the network subsystem, and the driver layer for peripherals.

The security layers provide isolation and cryptography, while partial POSIX compliance facilitates the portability of certain components. Although the final binary is monolithic and application-specific, some describe the design as "micro-kernel" due to the functional separation of services and its modularity.

Use cases and supported hardware

Zephyr is designed for resource-constrained devices: sensors , wearables, home automation, and industrial environments. Its low power consumption and real-time response make it ideal for production sensors, factory gateways, or medical devices with stringent requirements.

Public examples of products based on Zephyr include Proglove, Ruuvi Tag , PHYTEC Distancer, Keeb.io BDN9, Hati-ACE, Oticon More, Adhoc Smart Waste, and GNARBOX 2.0 SSD, demonstrating its adoption in very diverse areas.

Compatibility covers ARM Cortex-M, Intel x86, RISC-V , ARC, and other architectures, and the development environment can be set up on Windows, Linux, or macOS. The Getting Started guide and official documentation provide step-by-step instructions on how to prepare toolchains, SDKs, and build/flash workflows.

Resources for developers and the community

The community maintains extensive documentation, tutorials, and an active forum with recipes ranging from the first "blinky" to sensor integration, energy saving, and advanced connectivity. This support reduces the learning curve for Kconfig, Device Tree, and the threading/ISR model.

A typical workflow includes installing the Zephyr SDK, cloning the repository, configuring the hardware with Device Tree and Kconfig, compiling, and flashing. This process is consistent across multiple platforms, simplifying tasks when managing multiple boards or architectures simultaneously.

RTOS context and market

Real-time operating systems (RTOSs) emerged in the 60s and 70s for urgent applications in defense and aerospace . In the 80s and 90s, commercial solutions like VxWorks and QNX became established, with standardization via real-time POSIX. The 2000s saw the rise of the IoT, driving the development of lightweight options like FreeRTOS and, later, Zephyr.

Today, many RTOSs incorporate AI/ML to anticipate failures and optimize scheduling based on system conditions. The RTOS market was estimated at $5,97 billion in 2024 and is projected to grow from $6,41 billion in 2025 to $12,21 billion in 2034, with a CAGR of 7,41% during 2025–2034.

Compared to other alternatives, Zephyr stands out for its modularity , focus on security, wide range of protocols, and cross-platform compatibility. Its challenges lie in the initial configuration curve, inherent limitations of the target hardware, and the availability of certain highly specific drivers.

Looking at the whole picture, Zephyr provides a robust foundation for building connected devices with predictable timings, optimized power consumption, and built-in defenses . Add data orchestration (Astarte) and fleet management (Edgehog), and you can deploy everything from pilots to massive operations with secure telemetry, reliable OTA updates, and end-to-end operational visibility.

importance of ota updates in iot-1
Related article:
The importance of OTA updates in IoT and how they influence security

Add as preferred source in Google