CVE-2026-10648
Beschrijving NL
mcumgr_serial_process_frag() in subsys/mgmt/mcumgr/transport/src/serial_util.c roept net_buf_reset() aan op het resultaat van smp_packet_alloc() voordat het wordt gecontroleerd op NULL. smp_packet_alloc() gebruikt net_buf_alloc(K_NO_WAIT) tegen de gedeelde MCUmgr-pakketpool (CONFIG_MCUMGR_TRANSPORT_NETBUF_COUNT, standaard 4), die NULL retourneert wanneer de pool is uitgeput. Standaard is de __ASSERT_NO_MSG in net_buf_reset een no-op, dus net_buf_simple_reset schrijft via de NULL-aanwijzer (buf- >len = 0; buf- >data = buf- >__buf) en veroorzaakt een fout/crash. De fragmentgegevens bereiken deze code van aanvaller-gecontroleerde bytes op de MCUmgr seriële/UART/shell-console transporten (smp_uart.c, smp_raw_uart.c, smp_shell.c), en een nieuwe buffer wordt toegewezen aan het begin van in wezen elk nieuw pakket. Een aanvaller op de seriële/consoleverbinding kan het transport overspoelen om de bufferpool met 4 ingangen tot uitputting te drijven en de NULL dereferentie te induceren, waardoor het apparaat crasht (denial of service). Het defect werd geïntroduceerd na de oorspronkelijke MCUmgr rework en verzonden in Zephyr v4.4.0. De oplossing verplaatst de nulcontrole vóór net_buf_reset.
Origineel (Engels) tonen
mcumgr_serial_process_frag() in subsys/mgmt/mcumgr/transport/src/serial_util.c calls net_buf_reset() on the result of smp_packet_alloc() before checking it for NULL. smp_packet_alloc() uses net_buf_alloc(K_NO_WAIT) against the shared MCUmgr packet pool (CONFIG_MCUMGR_TRANSPORT_NETBUF_COUNT, default 4), which returns NULL when the pool is exhausted. In default builds the __ASSERT_NO_MSG in net_buf_reset is a no-op, so net_buf_simple_reset writes through the NULL pointer (buf->len = 0; buf->data = buf->__buf), causing a fault/crash.
The fragment data reaches this code from attacker-controlled bytes on the MCUmgr serial/UART/shell-console transports (smp_uart.c, smp_raw_uart.c, smp_shell.c), and a fresh buffer is allocated at the start of essentially every new packet. An attacker on the serial/console link can flood the transport to drive the 4-entry buffer pool to exhaustion and induce the NULL dereference, crashing the device (denial of service).
The defect was introduced after the original MCUmgr rework and shipped in Zephyr v4.4.0. The fix moves the NULL check ahead of net_buf_reset.