KernelScan.io

HIGH Introduced in 4.13

cec RxMsg OOB

CVE-2026-89725

CVSS 8.8 / 10.0 NVD

CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

KernelScan AI8.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: media: cec: stm32: prevent out-of-bounds write on RX overflow stm32_rx_done() appends each received CEC byte to rx_msg.msg[] using rx_msg.len as the write index, incrementing it on every RXBR (receive-byte-ready) interrupt without checking it against the buffer size: cec->rx_msg.msg[cec->rx_msg.len++] = val & 0xFF; rx_msg.msg[] is a fixed CEC_MAX_MSG_SIZE (16) byte array in struct cec_msg, and rx_msg.len is only reset on RXACKE/RXOVR or after a completed message (RXEND). The number of bytes received before RXEND is decided by the remote CEC device (it sets EOM), not by the driver. A peer that keeps sending bytes without ending the message drives RXBR repeatedly, pushing rx_msg.len past 16 and writing peer-controlled bytes out of bounds into the surrounding memory. This is reachable in normal operation once the driver has probed and receiving is enabled, from the IRQ thread, without any local privilege. The length check in the CEC core runs on the consumer side, after the byte has been stored, so it does not prevent the overflow. Bound the index in the driver before the store, as the other platform CEC drivers already do (e.g. tegra_cec), dropping the excess bytes of an overlong frame. Found by static analysis tool CodeQL.

02

Engine v0.6.0

Risk summary

A malicious CEC device connected via HDMI can overflow a fixed-size receive buffer in the STM32 CEC driver by sending an overlong message, writing attacker-controlled bytes past the buffer into adjacent kernel memory. This can lead to kernel code execution or a crash. Any device using the STM32 CEC driver with an accessible HDMI port is at risk.

Affecteddrivers/media/cec/platform/stm32/stm32-cec.c (media cec stm32)

Vulnerability analysis

The STM32 CEC driver stores each byte received from the CEC bus into a fixed-size 16-byte message buffer without checking whether the buffer is already full. A malicious CEC peer connected via HDMI can keep sending bytes without ending the message, causing the write index to exceed the buffer size and writing attacker-controlled data past the end of the buffer into adjacent kernel memory. The fix adds a bounds check before each store so that excess bytes from an overlong frame are silently dropped, matching the behavior already implemented in other platform CEC drivers. The vulnerability is reachable from the CEC bus without any local privilege once the driver has probed and receiving is enabled; an attacker only needs to be a CEC-capable device connected to the HDMI port.

03

BranchIntroducedFixed inPatch commit
6.14.136.1.18837ac45f7d6e3
6.64.136.6.1571b4fdefd788d
6.124.136.12.109c3edd7fb8e36
6.184.136.18.500c260d3f97e5
7.24.137.2.4a85ce3b17561
mainline4.137.3-rc1fb9dda38d4b9
5.154.135.15.2213df1a4026662
5.104.135.10.270f2499b720ea9
cip/6.124.136.12.111-cip32c3edd7fb8e36