From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96FC744E045 for ; Fri, 11 Sep 2026 20:04:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789157074; cv=none; b=K5HlyRgzjt8/27RTtsBLEEuv3KQCwINfpEouplF/BX94OUKfTeJy6zNY0T4LG9P7z8i0sgl4h8bul05zjAm/r3jKhBTiCG/iUTmXR1PL8NNhuTUHtVUBPYxgxmy7q/hBj9ksIXl8/Z4AZNiFu0OTgTnHd87EtvV2SEyv/qcEL1s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789157074; c=relaxed/simple; bh=SKlfcJuoE2t4EIg31QmXrBbRxDsAvCTNaMYTFBs4OZg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pnVmFYJprNAh6J3wPI2sboqtU2+whQ9km4Qo6GIddIFZeTUFbzD00ubCHl3yvks45P5BcyoIVLGjXBFkr5vUSrO6Lp7U5JXo81Yiltmj0adagFcyktWfD7espcBQezssH3zY9hc+QlYTAMFOYj8xUjGsVBnEdGaE59ndvT4hZz8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DOGAJFX2; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DOGAJFX2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D93E1F000FF; Fri, 11 Sep 2026 20:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789157066; bh=SJLnv6nbM8/ur58lxiLQBh3s4d3rImiXpa++f2J1yVA=; h=From:To:Cc:Subject:Date:Reply-To; b=DOGAJFX2lUSJpAa52dQC3CNwRkTneH7kqNaFsAg0dvL60qRbZh6r///r2d7PyrGzJ caHo1Fb34PyNV/M/Ebld15ba+To41AhP9eNQ66UscCt7W9/wjfSKGer3F0iPSWsvil cDBPwt8tKoRr7yIXghvib6+J4CZU38PwH+iIti3s= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89725: media: cec: stm32: prevent out-of-bounds write on RX overflow Date: Fri, 11 Sep 2026 21:46:54 +0200 Message-ID: <2026091101-CVE-2026-89725-8665@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3457; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=HA20TvGFMqBHuNsgfupvFmmwzsd7ks80HgGwPhIc7G8=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIjsf8YjyPts5W515RWmB2/TfZ0OruMWsdDSfiZ+9e fZt4/fGjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIrWSGufKqV/8yfvqt+mzy u3cnii89KXy7KJFhrtBps/aUh/eYZ9zbYyHtfN1299e8BgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== 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. The Linux kernel CVE team has assigned CVE-2026-89725 to this issue. Affected and fixed versions =========================== Issue introduced in 4.13 with commit d69ae57453c80a2193bcdb3fd762efbec447eecf and fixed in 6.12.109 with commit c3edd7fb8e3692423a702705509947fc9c30b3d1 Issue introduced in 4.13 with commit d69ae57453c80a2193bcdb3fd762efbec447eecf and fixed in 6.18.50 with commit 0c260d3f97e52978a8c769bb095ac0901333a3ac Issue introduced in 4.13 with commit d69ae57453c80a2193bcdb3fd762efbec447eecf and fixed in 7.2.4 with commit a85ce3b175615c2e13bc01e8a1b6b6b6910fde57 Issue introduced in 4.13 with commit d69ae57453c80a2193bcdb3fd762efbec447eecf and fixed in 7.3-rc1 with commit fb9dda38d4b9e90db07ed9a0ee2d35bf85494035 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-89725 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/media/cec/platform/stm32/stm32-cec.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/c3edd7fb8e3692423a702705509947fc9c30b3d1 https://git.kernel.org/stable/c/0c260d3f97e52978a8c769bb095ac0901333a3ac https://git.kernel.org/stable/c/a85ce3b175615c2e13bc01e8a1b6b6b6910fde57 https://git.kernel.org/stable/c/fb9dda38d4b9e90db07ed9a0ee2d35bf85494035