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 B583D1D554 for ; Tue, 19 Nov 2024 01:33:52 +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=1731980032; cv=none; b=iz3n4htzGdJG+ZGMaOvOlAO7LK4JBjFFhlFfyz03DeBqF5Du85mjMJ7N4XEdrM9LqUHnySnJwWIIbLDIapXi810EPq0ON6ArNrkXSWr15jnw5RbIwdEPLaGXnAlOKXcJqqEYxXsY5i6LCtIkHEh50gpNs411mF37qMKyuift6oI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731980032; c=relaxed/simple; bh=51b4oCftKj2/XbQWP0MomvRQV9u/RVNNQCZxpFuwQ90=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=efuScr6vUQ/nNXxvuEKqXe1SxRcUyvfJ6MsFVqHc2wmFPuQFWQwFRU1P35r72FB+OIhSVzIyAfAF9JWqFL7VytuL0xV4Bwl8mVWP7+GGGuG4Ygrx79yNWvcWG21XLj2JQGSW5nrqXur4kGnjaHJGYFIcA3aLdN4Q7fUKOTV/2Ro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JRfmwA93; 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="JRfmwA93" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B932C4CECC; Tue, 19 Nov 2024 01:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731980032; bh=51b4oCftKj2/XbQWP0MomvRQV9u/RVNNQCZxpFuwQ90=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JRfmwA93zgtuEpjHwG1eCfJ45XC3GaReE7U0pGNqABxqJg7TzudLOdeU5XboQvwmr T2nrbrlMPWVxqWjviYP0IMtmPz+yWmsH/Fd3m4t3QNjJWPHxwShvJe4a3AOpYmxedd LfG5lEUgav5D1tZRY83F8dZlVKDH1yWelb0p31mo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50287: media: v4l2-tpg: prevent the risk of a division by zero Date: Tue, 19 Nov 2024 02:32:42 +0100 Message-ID: <2024111949-CVE-2024-50287-bf9b@gregkh> X-Mailer: git-send-email 2.47.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=3003; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=51b4oCftKj2/XbQWP0MomvRQV9u/RVNNQCZxpFuwQ90=; b=owGbwMvMwCRo6H6F97bub03G02pJDOnWrw7e4mX3KdgZPz0kx2bjoa8738d5fqhhFFgeec7/4 WvN71f/dsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEfE4zLJi3IWI7f0rQb98D OZYHF2VrnP93Mo5hNst6Vj5nwZSCny4ZvuleHJ4z7b1rAQ== 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: media: v4l2-tpg: prevent the risk of a division by zero As reported by Coverity, the logic at tpg_precalculate_line() blindly rescales the buffer even when scaled_witdh is equal to zero. If this ever happens, this will cause a division by zero. Instead, add a WARN_ON_ONCE() to trigger such cases and return without doing any precalculation. The Linux kernel CVE team has assigned CVE-2024-50287 to this issue. Affected and fixed versions =========================== Issue introduced in 3.18 with commit 63881df94d3e and fixed in 4.19.324 with commit e3c36d0bde30 Issue introduced in 3.18 with commit 63881df94d3e and fixed in 5.4.286 with commit 0bfc6e38ee22 Issue introduced in 3.18 with commit 63881df94d3e and fixed in 5.10.230 with commit 054931ca3cfc Issue introduced in 3.18 with commit 63881df94d3e and fixed in 5.15.172 with commit a749c15dccc5 Issue introduced in 3.18 with commit 63881df94d3e and fixed in 6.1.117 with commit c63c30c9d9f2 Issue introduced in 3.18 with commit 63881df94d3e and fixed in 6.6.61 with commit 2d0f01aa602f Issue introduced in 3.18 with commit 63881df94d3e and fixed in 6.11.8 with commit 0cdb42ba0b28 Issue introduced in 3.18 with commit 63881df94d3e and fixed in 6.12 with commit e6a3ea83fbe1 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-2024-50287 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/common/v4l2-tpg/v4l2-tpg-core.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/e3c36d0bde309f690ed1f9cd5f7e63b3a513f94a https://git.kernel.org/stable/c/0bfc6e38ee2250f0503d96f1a1de441c31d88715 https://git.kernel.org/stable/c/054931ca3cfcb8e8fa036e887d6f379942b02565 https://git.kernel.org/stable/c/a749c15dccc58d9cbad9cd23bd8ab4b5fa96cf47 https://git.kernel.org/stable/c/c63c30c9d9f2c8de34b16cd2b8400240533b914e https://git.kernel.org/stable/c/2d0f01aa602fd15a805771bdf3f4d9a9b4df7f47 https://git.kernel.org/stable/c/0cdb42ba0b28f548c1a4e86bb8489dba0d78fc21 https://git.kernel.org/stable/c/e6a3ea83fbe15d4818d01804e904cbb0e64e543b