Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-85035— Use-after-free via dynamically allocated message queue retained by the CAN RX filter

Quick assessment

Affected
zephyrproject zephyr
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

系统调用会安装一个 CAN 接收过滤器,其回调函数(位于 中的 )会将调用方提供的 指针作为 传递。控制器驱动程序将该原始指针存储在其过滤器表中,并在每次接收到匹配的数据帧时,在接收路径中对其进行解引用。系统调用验证器 (位于 中)仅使用 对消息队列进行了验证;该验证仅检查对象在某一时刻的类型、初始化状态以及调用者权限,并未涉及对象的生命周期。 在启用 和 的构建配置下,一个已获得 CAN 设备访问权限的非特权用户态线程可以获取一个由其完全控制生命周期的消息队列:通过调用 和 完成分配与初始化。此类对象的生命周期仅

CVSS 8.8 · High

Possible ATT&CK Techniques 1 AI

T1190 · Exploit Public-Facing Application
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-85035

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Use-after-free via dynamically allocated message queue retained by the CAN RX filter
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
释放后使用
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
zephyrproject zephyr 1.14.0 ~ 4.3.2 -

II. Public POCs for CVE-2026-85035

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-85035

请登录查看更多情报信息。

Other References for CVE-2026-85035 (2)

Same Patch Batch · zephyrproject · 2026-11-03 · 4 CVEs total

CVE-2026-85034 6.7 MEDIUM Out-of-bounds write in the Bluetooth GATT client: oversized notification and indication va
CVE-2026-85032 4.8 MEDIUM Use-after-free in the MCTP over USB binding when the host disables the class while RX pars
CVE-2026-85033 4.6 MEDIUM Bluetooth Classic AVRCP Target: missing TX cleanup on disconnect permanently stalls vendor

IV. Related Vulnerabilities