CVE-2026-104378 in Zephyrinfo

Summary

by MITRE • 11/29/2026

The Synopsys DesignWare I3C controller driver (drivers/i3c/i3c_dw.c) builds one command descriptor per target when issuing a direct CCC in dw_i3c_do_ccc(). It stored payload->targets.num_targets in xfer->ncmds and filled xfer->cmds[i] for every target without checking the count against the size of the cmds[] array (DW_I3C_MAX_CMD_BUF_SIZE, 16 entries). A direct CCC with more than 16 targets wrote command descriptors past the end of struct dw_i3c_xfer, which is embedded in the driver's per-instance struct dw_i3c_data.

i3c_do_ccc() is a system call. On builds with CONFIG_USERSPACE, a user-mode thread that has been granted access to the I3C controller device can supply the payload. In released versions the z_vrfy_i3c_do_ccc() handler only checked that the caller's target array was accessible user memory and placed no upper bound on num_targets; the driver therefore performed the out-of-bounds writes in supervisor mode. The only requirement for each target is an address the controller already knows (the same address may be repeated), and the writes happen before any bus transaction.

The overflowing descriptors contain values the caller largely controls (data length, defining byte, CCC id, a user buffer pointer and transfer lengths). They overwrite the rest of the driver data, including the device-index table, the deftgts_work work item and device pointer when both controller and target roles are enabled, and any memory that follows. This lets an unprivileged thread corrupt kernel memory, which can lead to privilege escalation or denial of service. In-kernel callers in the tree only issue single-target direct CCCs, so builds without CONFIG_USERSPACE are only exposed to their own application code.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/29/2026

The vulnerability identified within the Synopsys DesignWare I3C controller driver represents a critical out-of-bounds write condition rooted in insufficient input validation during command descriptor construction. Specifically, the function dw_i3c_do_ccc is responsible for building one command descriptor per target when issuing a direct Component Command Code transaction. The implementation stores the number of targets provided by the caller into xfer->ncmds and proceeds to fill the xfer->cmds array for every specified target without verifying that this count remains within the bounds of the allocated buffer, which is defined by DW_I3C_MAX_CMD_BUF_SIZE as having a capacity of only sixteen entries. Consequently, when a direct CCC request involves more than sixteen targets, the driver writes command descriptors past the end of the struct dw_i3c_xfer structure. This structure is embedded within the driver's per-instance data object, meaning that excessive write operations corrupt adjacent memory regions belonging to the same kernel module instance rather than isolated user-space buffers.

This flaw becomes particularly severe in system configurations where CONFIG_USERSPACE is enabled, as it transforms a local buffer overflow into a privilege escalation vector accessible from unprivileged contexts. The i3c_do_ccc interface functions as a system call that allows user-mode threads to interact with the I3C controller hardware if they have been granted appropriate access permissions. In released versions of the software, the z_vrfy_i3c_do_ccc validation handler performs only basic accessibility checks on the caller's target array but fails to impose an upper bound on the num_targets field. This oversight allows a malicious user-mode thread to supply a payload with a high number of targets, triggering out-of-bounds writes that execute in supervisor mode before any actual bus transaction occurs. The requirement for each target is merely a known address, which can be repeated arbitrarily by the attacker, facilitating straightforward exploitation without needing complex hardware state manipulation.

The data written into these overflowing descriptors includes values largely controlled by the caller, such as data length fields, defining bytes, Component Command Code identifiers, user buffer pointers, and transfer lengths. These maliciously crafted entries overwrite critical internal driver structures located immediately after the xfer structure in memory. This corruption affects vital components including the device-index table, which manages hardware resources; the deftgts_work work item used for deferred target handling; and device pointers when both controller and target roles are enabled on the same system. By corrupting these kernel data structures, an unprivileged thread can manipulate control flow or critical state variables within the driver's execution context. This capability directly enables arbitrary code execution through function pointer overwrites or denial of service via memory corruption that crashes the kernel subsystem handling I3C communications.

From a classification perspective, this vulnerability aligns with CWE-787 out-of-bounds write and CWE-20 improper input validation within the Common Weakness Enumeration framework. In terms of attack tactics, it maps to ATT&CK technique T1059 command and scripting interpreter abuse if leveraged for further execution, or more accurately T1068 exploitation for privilege escalation through memory corruption techniques like buffer overflows. The impact is severe because it bypasses standard user-space isolation boundaries due to the lack of bounds checking in the kernel-mode handler that processes system calls from untrusted contexts.

Mitigation strategies must focus on enforcing strict input validation at the earliest possible point in the call chain. Developers should implement a check within z_vrfy_i3c_do_ccc or dw_i3c_do_ccc to ensure that num_targets does not exceed DW_I3C_MAX_CMD_BUF_SIZE before any memory allocation or iteration occurs. Additionally, defensive programming practices such as using bounded array access functions and adding static analysis checks for loop bounds can prevent similar issues in future iterations of the driver code. For systems where CONFIG_USERSPACE is enabled, it is crucial to treat all user-supplied counts with extreme skepticism and validate them against known hardware limitations before proceeding with any operations that involve kernel memory manipulation or hardware register writes.

Responsible

Zephyr

Reservation

10/02/2026

Disclosure

11/29/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!