Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0713F20E027 for ; Thu, 27 Mar 2025 16:43:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743093817; cv=none; b=EULOT1xZtjbHeyyRlJVuuzuub/KWQ8k5N7QVj8bFtZqUgTv/qQ43NzAqq33T7L3T22O8b7bcnkG24mAiKozbw0Q9zQf+g5EN4FiNxwrLBMziQVXj5Zp0IlPbxzdHuW/kYwmfEGKPsr1rCJ99i6oSHEwN07FjcrQCv0eEir7Gfo8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743093817; c=relaxed/simple; bh=ACeYqjL+tLrWpO4C7zlxf4wRR+ZXw76/Ypxe7U3JczY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Yugd4uZtN9hOXpa6hasbFASJPpp8CSfPr1Gnez/Ezwr1Fmg81mqFxkGpCvkjjzrdXsWg8Bt/q9BBFjkD+g7V4l44hFj4RdY6xJJ7EDlWVaEDUB9zeb//Ky8HJTkw8N6LlRBOhY3rOgQkmRmg39Ta8ZaRGbReEgmEeew1xvXDhW0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dyJJxxdG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="dyJJxxdG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26FF8C4CEEF; Thu, 27 Mar 2025 16:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743093816; bh=ACeYqjL+tLrWpO4C7zlxf4wRR+ZXw76/Ypxe7U3JczY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=dyJJxxdGYWGwcYhoTuWDumZ7XkPze6sIs7v84TdUY5HOj8ShZOh/KMQQklWXsYMAY xJgmN0Lpw5vXaEcWC0ywQie9hExfGZn+gbxyWy3ij1H6Uj5bDn1hqJbNSpI8wot25t xkA/w36KGnuSASBL/SaKiToaVuPjy94ZpV3fi8KQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49749: i2c: designware: use casting of u64 in clock multiplication to avoid overflow Date: Thu, 27 Mar 2025 17:43:07 +0100 Message-ID: <2025032759-CVE-2022-49749-ed85@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2653; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ACeYqjL+tLrWpO4C7zlxf4wRR+ZXw76/Ypxe7U3JczY=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlPG4TrF5eenPj7r+ndgq8iV4N996UyrS8N+8gzO8ri0 ab1E8XudsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEqoIZFmxICH4qU9tWdMHn R+rxU+f2+D2rS2NYcPPVGyGti6yaR9/aX9RpS5iySPKwEQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: i2c: designware: use casting of u64 in clock multiplication to avoid overflow In functions i2c_dw_scl_lcnt() and i2c_dw_scl_hcnt() may have overflow by depending on the values of the given parameters including the ic_clk. For example in our use case where ic_clk is larger than one million, multiplication of ic_clk * 4700 will result in 32 bit overflow. Add cast of u64 to the calculation to avoid multiplication overflow, and use the corresponding define for divide. The Linux kernel CVE team has assigned CVE-2022-49749 to this issue. Affected and fixed versions =========================== Issue introduced in 3.2 with commit 2373f6b9744d5373b886f3ce1a985193cca0a356 and fixed in 5.10.166 with commit ed173f77fd28a3e4fffc13b3f28687b9eba61157 Issue introduced in 3.2 with commit 2373f6b9744d5373b886f3ce1a985193cca0a356 and fixed in 5.15.91 with commit 2f29d780bd691d20e89e5b35d5e6568607115e94 Issue introduced in 3.2 with commit 2373f6b9744d5373b886f3ce1a985193cca0a356 and fixed in 6.1.9 with commit 9f36aae9e80e79b7a6d62227eaa96935166be9fe Issue introduced in 3.2 with commit 2373f6b9744d5373b886f3ce1a985193cca0a356 and fixed in 6.2 with commit c8c37bc514514999e62a17e95160ed9ebf75ca8d 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-2022-49749 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/i2c/busses/i2c-designware-common.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/ed173f77fd28a3e4fffc13b3f28687b9eba61157 https://git.kernel.org/stable/c/2f29d780bd691d20e89e5b35d5e6568607115e94 https://git.kernel.org/stable/c/9f36aae9e80e79b7a6d62227eaa96935166be9fe https://git.kernel.org/stable/c/c8c37bc514514999e62a17e95160ed9ebf75ca8d