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 D86E2582B9D for ; Fri, 11 Sep 2026 19:51:44 +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=1789156309; cv=none; b=i2zlEzraOYt27FskW4LWLMAV5a5eepX7NOM+mXILPmEminK1WQbErApOpZ+YLsjWoVij8vNPyJWuBplsmFlBgJ1oQStusycjegntefBom2/J21wXlDUM/ZP+RgASmX+VtbkLtgWpCdMXL4G+Q/dpKzgBz3TTUFZ9Z7h5HpSKFA4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156309; c=relaxed/simple; bh=IOV2u7OFvIHCCBg+93rdlYS7RN/luuuf2L3GrvsCFKU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SiMAa+NuDCHg8bgYdgi2kUxFWTaFVz+I09cC+WV/bIr1mIsAIfvMf0Ft/KByvBgR4W4TKQ7LnJ7+bTcjXffvtPyqvtitR5ReHBFUlzzwWs5KfrhXP2lVTDU/RfX2GjkNjSvMiOzR4yWEmyqnuQ6C3vkBSCvbIrXNsH9e0qMePbI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GURA5JJ6; 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="GURA5JJ6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E83551F00898; Fri, 11 Sep 2026 19:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789156304; bh=Q1++q7THk5XHKmKYl4VhRKnsYYw029FB1quQW8o3yoo=; h=From:To:Cc:Subject:Date:Reply-To; b=GURA5JJ6GYgB+b2G9WQWpSNULuGf7xoEETREZmqDAEl8/voGqRvkV1z897AS5F6EA nqT8wWxqars0lOLF51tlnH9A/fv0gLyLqMJFlcuBWo03fYelpTp4QOC1E+C1hmbsWl AA8yTtuFtB4myT6+GbgWjqaL7aqs495+fSAsxI+g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89471: power: supply: cros_usbpd-charger: bound the EC-reported port count Date: Fri, 11 Sep 2026 21:42:40 +0200 Message-ID: <2026091103-CVE-2026-89471-effd@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=3465; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=HqLzAGluVHb3vNW0tIygNe2r5/ALvEF0WD1x0hAM4c4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIv2LEj7Pyzmp9HOBzjKvSSsv/ZDonp6ok3irqXyn/ Op9xlfPd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEPjUxzE/6Kfzu2j3XfRNc DFSTBMUnh8mtrmRYsK5greqTEtsrBcc17sRx9LP6C+03BAA= 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: power: supply: cros_usbpd-charger: bound the EC-reported port count cros_usbpd_charger_probe() reads two port counts from the EC and uses one of them, num_charger_ports, as the loop bound when populating a fixed-size array: struct port_data *ports[EC_USB_PD_MAX_PORTS]; /* 8 entries */ ... for (i = 0; i < charger->num_charger_ports; i++) charger->ports[charger->num_registered_psy++] = port; Both num_usbpd_ports (from EC_CMD_USB_PD_PORTS) and num_charger_ports (from EC_CMD_CHARGE_PORT_COUNT) are u8 values reported by the EC. The only validation is a sanity check that compares the two EC-reported values against each other: if (num_charger_ports < num_usbpd_ports || num_charger_ports > num_usbpd_ports + 1) return -EPROTO; It never checks either count against EC_USB_PD_MAX_PORTS, the size of the ports[] array. A malfunctioning, malicious or compromised EC that reports num_usbpd_ports == num_charger_ports == N for any N > 8 (for example both 255) passes this check, and the loop then writes N pointers into the 8-entry ports[] array embedded in the devm_kzalloc()'d charger_data, overflowing it by up to 255 - 8 = 247 entries (~1976 bytes): a slab out-of-bounds write. Reject a port count larger than the ports[] array can hold. The Linux kernel CVE team has assigned CVE-2026-89471 to this issue. Affected and fixed versions =========================== Issue introduced in 4.19 with commit f68b883e8fad23ed0ac4756d91594809d78678ed and fixed in 6.12.109 with commit fd29d08ee487f3bf50f2575aaa74f78a74b09b21 Issue introduced in 4.19 with commit f68b883e8fad23ed0ac4756d91594809d78678ed and fixed in 6.18.50 with commit 78be8b7403ff7638162438b664a07d19da76059e Issue introduced in 4.19 with commit f68b883e8fad23ed0ac4756d91594809d78678ed and fixed in 7.2.4 with commit 3d1e01443b221081258ff34ea0cdd0431e4ff62e Issue introduced in 4.19 with commit f68b883e8fad23ed0ac4756d91594809d78678ed and fixed in 7.3-rc1 with commit 48355ce49359740f52e94d3623f6fc557ce341f0 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-89471 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/power/supply/cros_usbpd-charger.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/fd29d08ee487f3bf50f2575aaa74f78a74b09b21 https://git.kernel.org/stable/c/78be8b7403ff7638162438b664a07d19da76059e https://git.kernel.org/stable/c/3d1e01443b221081258ff34ea0cdd0431e4ff62e https://git.kernel.org/stable/c/48355ce49359740f52e94d3623f6fc557ce341f0