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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-29)
- **CWE:** CWE-416
- **Published:** 2026-11-03T13:36:08.995Z
- **Modified:** 2026-11-03T19:18:11.853Z

## Who should check

- Anyone running zephyrproject zephyr \>= 1.14.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0

## 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.

## Affected and fixed versions

- zephyrproject zephyr: \>= 1.14.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0 (cvelist)

## Mitigation

- Upgrade zephyr to 4.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-85035. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-85035.md
Affected: zephyrproject zephyr >= 1.14.0, < 4.3.2; >= 4.4.0, < 4.5.0
Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0

Steps:
1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-85035 being exploited?

There is no confirmed exploitation: CVE-2026-85035 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-29).

### How serious is CVE-2026-85035?

High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-85035?

zephyrproject zephyr \>= 1.14.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0.

### Is there a fix for CVE-2026-85035?

Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0. Upgrade zephyr to 4.5.0 or later.

### How do I check if I'm affected by CVE-2026-85035?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-6pxv-r7ww-3g2q>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/0114bee266211c72a49f3b6a914d3eaf821dd460>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-85035>

HTML: <https://flawdb.com/CVE-2026-85035> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-85035>
