CVE-2026-89725: media: cec: stm32: prevent out-of-bounds write on RX overflow

Published Sep 11, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

media: cec: stm32: prevent out-of-bounds write on RX overflow

stm32rxdone() appends each received CEC byte to rxmsg.msg[] using rxmsg.len as the write index, incrementing it on every RXBR (receive-byte-ready) interrupt without checking it against the buffer size:

cec->rxmsg.msg[cec->rxmsg.len++] = val & 0xFF;

rxmsg.msg[] is a fixed CECMAXMSGSIZE (16) byte array in struct cecmsg, and rxmsg.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 rxmsg.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. tegracec), dropping the excess bytes of an overlong frame.

Found by static analysis tool CodeQL.

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 11, 2026
CVE Published
via MITRE·07:46 PM
Data Sourced
via MITRE·07:46 PM
Description

Frequently Asked Questions

1

Which systems are exposed to this issue?

Systems using the STM32 CEC driver are exposed after the driver has probed and CEC reception is enabled. Exploitation requires a CEC peer capable of sending an unterminated stream of received bytes.

2

Does exploiting this require local access or elevated privileges?

No. The vulnerable receive path is reachable from the IRQ thread during normal operation, and the description states that no local privilege is required.

3

What makes the overflow possible?

A remote CEC device controls whether a message is ended through EOM. If it continues sending bytes without ending the message, the driver increments the receive-message length beyond the fixed 16-byte message buffer and writes attacker-controlled byte values out of bounds.

4

Can the CEC core's length validation prevent the memory corruption?

No. The CEC core checks message length only after the driver has already stored the received byte, so that validation occurs too late to prevent the out-of-bounds write.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203