CVE Catalog

CVE-2026-15891

HighCVSS 7.5
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.34%

27th percentile - higher than 27% of all known CVEs

Summary

In the MQTT-SN client (Zephyr, subsys/net/lib/mqtt_sn/mqtt_sn.c), process_ping() removes the gateway record after PINGREQ retries are exhausted, but the result of SYS_SLIST_PEEK_HEAD_CONTAINER is discarded, leaving gw as NULL. The code then dereferences NULL (gw->gw_id) and passes it to mqtt_sn_gw_destroy(), reaching k_mem_slab_free(&gateways, NULL) — triggering k_panic() with CONFIG_MEM_SLAB_POINTER_VALIDATE enabled, or corrupting the slab free list in the default configuration. The flaw is remotely triggerable by a malicious or compromised MQTT-SN gateway (or an on-path/adjacent attacker) that stops responding to PINGREQs.

Risk Assessment

An attacker can remotely cause a crash or kernel panic of the affected MQTT-SN client, resulting in a denial of service (availability loss). On targets where address 0 is writable, silent memory-allocator corruption may also occur, potentially leading to further system instability.

Recommendation

Update Zephyr to a version containing the fix that assigns the macro's return value to gw. Until patched, consider enabling CONFIG_MEM_SLAB_POINTER_VALIDATE to turn silent memory corruption into a controlled panic, and restrict MQTT-SN communication to trusted gateways.

Related vulnerabilities

Original NVD description (English source)

The MQTT-SN client keepalive handler process_ping() in subsys/net/lib/mqtt_sn/mqtt_sn.c removes the gateway record after PINGREQ retries are exhausted. It invoked SYS_SLIST_PEEK_HEAD_CONTAINER(&client->gateways, gw, next) but discarded the result. That macro is a pure expression that does not assign to gw, so gw retained its NULL initializer regardless of the list contents. The code then dereferences the NULL gw (gw->gw_id) and passes it to mqtt_sn_gw_destroy(), reaching k_mem_slab_free(&gateways, NULL). With CONFIG_MEM_SLAB_POINTER_VALIDATE enabled this triggers k_panic(); in the default configuration it performs a write through the NULL pointer ((char )mem = slab->free_list;) and corrupts the slab free list. The outcome is a crash/kernel panic or, on targets where address 0 is writable, silent memory-allocator corruption. The vulnerable branch runs whenever the connected MQTT-SN gateway fails to answer keepalive PINGREQs for the configured number of retries. This condition is controlled by the remote peer: a malicious or compromised gateway, or an on-path/adjacent attacker that advertises itself as a gateway and then stops responding (or blackholes the real gateway's PINGRESPs), forces the client into the defect. MQTT-SN runs over UDP and no authentication is required. The impact is a remotely triggerable denial of service (availability) of the affected MQTT-SN client; there is no attacker-controlled data written. The sibling remover process_advertise() uses SYS_SLIST_FOR_EACH_CONTAINER_SAFE and is not affected. The fix assigns the macro's return value to gw.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS