CVE-2026-85035
8.8 HIGHpublic exploit availablePublished 2026-11-03 · Updated 2026-11-03
AI risk analysis
- Summary
- A use-after-free vulnerability exists in the CAN subsystem where a user-space thread can register a message queue with a CAN RX filter, then release or terminate while the kernel retains a dangling pointer to the freed queue object. Subsequent CAN frames trigger dereference of this freed memory in supervisor mode, enabling arbitrary kernel memory corruption.
- Exploitability
- Exploitation requires an unprivileged user-space thread with access to a CAN device on a system built with CONFIG_USERSPACE=y and CONFIG_DYNAMIC_OBJECTS=y; the attacker must control the message queue lifecycle and groom freed memory before frame arrival.
- Blast radius
- Successful exploitation allows full compromise of kernel confidentiality, integrity, and availability via arbitrary memory writes in supervisor context, potentially enabling privilege escalation to root-level code execution.
- Detection
- No reliable host or network indicator is derivable from the published description.
- Prioritized remediation
- Upgrade to Zephyr RTOS v3.7.0 or later, where the fix enforces object lifetime tracking by requiring the message queue to remain pinned (via k_object_access_grant() and k_object_release() coordination) until filter deregistration.
Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.
NVD 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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Weaknesses
CWE-416
Public exploit & PoC references
All references
Source data: NVD (nvd.nist.gov), public domain. Exploit-DB.ai adds local AI analysis for defensive use only.
Related CVEs
- HIGHCVE-2026-86916
- CRITICALCVE-2026-69006
- HIGHCVE-2026-102201
- HIGHCVE-2026-103843
- HIGHCVE-2026-109619PoC
- HIGHCVE-2026-112261
- HIGHCVE-2026-112623
- HIGHCVE-2026-112626
Related by shared AI tags and CWE weakness class. Browse the full archive.