Skip to main content
← Vulnerabilities

Use-after-free via dynamically allocated message queue retained by the CAN RX filter

Zephyr builds with CONFIG_USERSPACE and CONFIG_DYNAMIC_OBJECTS enabled, where a user-mode thread has been granted access to a CAN device, are exposed. Fixed in Zephyr 4.3.2 and 4.5.0.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

8.8HighCNA
Exploited
No known exploitation
Fix
Fixed in 4.3.2, 4.5.0
Who is exposed
Specific setups only

Do first: Check whether your setup matches what the bug needs. Zephyr build with CONFIG_USERSPACE=y and CONFIG_DYNAMIC_OBJECTS=y Attacker thread must be a user-mode thread that has been granted access to a CAN device Affected versions >= 1.14.0 and < 4.3.2, or >= 4.4.0 and < 4.5.0

15Pcve.now Index 15 of 100 · methodology v3 · provisional
  • Exploitation0/40No signal
  • Exposure5/25Specific setups only
  • Reach?/20Reach: unknown (data gap). No tracked technology or package matched
  • Severity9.8/10CVSS 8.8, total technical impact per CISA
  • No patch0/5No signal

What would change the score

  • Would score about 65 if added to CISA KEV
  • Would score about 60 if CISA's SSVC rates exploitation active
  • Would score about 25 if CISA's SSVC rates it automatable

CVE-2026-85035 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 8.8 (high) and affects zephyr; fixed in 4.3.2 and 4.5.0.

Published
Last modified
Published
Not listed in CISA KEV
15/100 · provisional
Specific setups only
Fix
Fixed in 4.3.2, 4.5.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: total

Summary

Affected software is the Zephyr RTOS CAN subsystem, specifically its CAN receive filter registration for message queues, on builds with user-mode and dynamic kernel objects enabled. An unprivileged user-mode thread with access to a CAN device can corrupt kernel heap memory, which breaks the isolation between user and kernel code.

Read the original description

The can_add_rx_filter_msgq() system call installs a CAN RX filter whose callback (can_msgq_put() in drivers/can/can_common.c) is handed the caller's struct k_msgq * as user_data. The controller driver stores that raw pointer in its filter table and dereferences it from the RX path every time a matching frame arrives. The system call verifier z_vrfy_can_add_rx_filter_msgq() in drivers/can/can_handlers.c validated the queue only with K_SYSCALL_OBJ(), which is a point-in-time check of type, initialization and caller permission and says nothing about the object's lifetime. On a build with CONFIG_USERSPACE=y and CONFIG_DYNAMIC_OBJECTS=y, an unprivileged user-mode thread that has been granted access to a CAN device can obtain a message queue whose lifetime it fully controls: k_object_alloc(K_OBJ_MSGQ) followed by k_msgq_alloc_init(). The lifetime of such an object is driven solely by its permission bitmask, and a pointer retained by the kernel is not represented there. After registering the filter, the thread calls k_object_release() — or simply terminates — and unref_check() frees the struct k_msgq storage while the CAN driver still holds the pointer. The next matching CAN frame causes k_msgq_put() to run in supervisor context against freed memory that the attacker can have groomed with another kernel allocation: the frame payload is memcpy()d through the reused block's write_ptr, and the queue's wait_q (and poll_events under CONFIG_POLL) list nodes are manipulated. This yields kernel-heap corruption reachable from a user-mode thread, defeating the isolation CONFIG_USERSPACE is intended to provide; the same dangling pointer also arises benignly when an application thread exits without calling can_remove_rx_filter(). The fix validates the queue with K_SYSCALL_OBJ_STATIC(), which additionally rejects objects carrying K_OBJ_FLAG_ALLOC, so only statically defined queues (CAN_MSGQ_DEFINE()) may be registered from user mode. Supervisor-mode callers bypass the verifier and must themselves keep the queue valid until the filter is removed.

What to do

  • Check whether your setup matches what the bug needs.

    Zephyr build with CONFIG_USERSPACE=y and CONFIG_DYNAMIC_OBJECTS=y Attacker thread must be a user-mode thread that has been granted access to a CAN device Affected versions >= 1.14.0 and < 4.3.2, or >= 4.4.0 and < 4.5.0
  • Upgrade to a fixed version: 4.3.2, 4.5.0.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: total

  4. Record last updated

Affected versions

  • zephyr

    From 1.14.0 · fixed in 4.3.2; From 4.4.0 · fixed in 4.5.0

Evidence 2

  1. Advisory
  2. Patch

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

FAQ

Questions about CVE-2026-85035

Is CVE-2026-85035 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

A CAN RX filter keeps a dynamically allocated message queue after it has been freed. CAN frame delivery can then write into that freed kernel object, corrupting kernel heap memory and breaking the user-mode isolation that CONFIG_USERSPACE is meant to provide.Source: github.com

Which versions are affected by CVE-2026-85035?

zephyr: from 1.14.0 before 4.3.2; from 4.4.0 before 4.5.0.Source: cve.now feed data

Am I affected, and how do I check?

Zephyr versions 1.14.0 up to but not including 4.3.2, and 4.4.0 up to but not including 4.5.0. The setup also needs CONFIG_USERSPACE=y and CONFIG_DYNAMIC_OBJECTS=y, plus a user-mode thread granted access to a CAN device. Check the Zephyr version and these two Kconfig options in the build configuration.Source: github.com

How do I fix CVE-2026-85035?

Upgrade to Zephyr 4.3.2 if on the 4.3 line, or to 4.5.0 if on the 4.4 line. The sources provided list no workaround.Source: github.com