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 2044D14A60A for ; Sat, 9 Nov 2024 10:18:11 +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=1731147492; cv=none; b=noGtbkLiyewrceWaaeIuGVETWLbNP+R+JXDPtS/K74Mgotaple0kJcUR87GUJSmgEJt1riSNjeUNrzD0DJWbfDr7HKRx2PAgmOs8MW7dP9DeqbNHkWfUlXAnjj2ve7T8rT9BoMKPrsRDfbpR4ONYqhbfI38mwVs4l1h3xLdfYL4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731147492; c=relaxed/simple; bh=rnlRE9R9i35PBZ/Vnx+DgM0lXDU91FXkxi0Qw4dwbaw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tPc9c3XNQY20sTF4//+E2XQmmrOeHGVHCZO0rBI/cWoMmz30NaGdEqkUPLmGuRoSuKB2l6G90I9RzOenHGpses8IoPTid7dn1Fd2HcElCL8Fj0A9T+XIYkiAGvXcc9tPa7u307I3tsXJf0B9fh8UACoSMcPulPVJMxaQZ5D8cb4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=plKn0FPU; 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="plKn0FPU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C7ACC4CECE; Sat, 9 Nov 2024 10:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731147491; bh=rnlRE9R9i35PBZ/Vnx+DgM0lXDU91FXkxi0Qw4dwbaw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=plKn0FPUiIya1Q/T4830xaQpHK+xmjh8LyokuSSbANSE6Q6agNbLsvtk9bDyV8zLZ p/QD0UgrPh7Xcop2UGux66A6tEDXXROfxpQoTyQFamHU6AY3fwaGWOy2WWDEslfDzf +4NqaRuOPZSkK0EgHiSxzCCss9UdPOSavwEBVTkk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50233: staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg() Date: Sat, 9 Nov 2024 11:15:41 +0100 Message-ID: <2024110930-CVE-2024-50233-d5c3@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=2960; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=rnlRE9R9i35PBZ/Vnx+DgM0lXDU91FXkxi0Qw4dwbaw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn6Zk68JROnTbnt/+TE/nSx2nBps9PHnpqZrmjo+yxh3 BS0sPV9RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzEPoFhnsX10AROjucuKzLd LGeejTiRxa1XwrBgh2VB3JzLbVxyt/YzTrHrLlr3wCkLAA== 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: staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg() In the ad9832_write_frequency() function, clk_get_rate() might return 0. This can lead to a division by zero when calling ad9832_calc_freqreg(). The check if (fout > (clk_get_rate(st->mclk) / 2)) does not protect against the case when fout is 0. The ad9832_write_frequency() function is called from ad9832_write(), and fout is derived from a text buffer, which can contain any value. The Linux kernel CVE team has assigned CVE-2024-50233 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.39 with commit ea707584bac1 and fixed in 5.4.285 with commit fcd6b59f7a77 Issue introduced in 2.6.39 with commit ea707584bac1 and fixed in 5.10.229 with commit 442f786c5bff Issue introduced in 2.6.39 with commit ea707584bac1 and fixed in 5.15.171 with commit 2f39548f4569 Issue introduced in 2.6.39 with commit ea707584bac1 and fixed in 6.1.116 with commit ccbc10647aaf Issue introduced in 2.6.39 with commit ea707584bac1 and fixed in 6.6.60 with commit adfbc08b94e7 Issue introduced in 2.6.39 with commit ea707584bac1 and fixed in 6.11.7 with commit dd9e1cf619c9 Issue introduced in 2.6.39 with commit ea707584bac1 and fixed in 6.12-rc6 with commit 6bd301819f8f 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-50233 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/staging/iio/frequency/ad9832.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/fcd6b59f7a774558e2525251c68aa37aff748e55 https://git.kernel.org/stable/c/442f786c5bff8cfd756ebdeaa4aadbf05c22aa5a https://git.kernel.org/stable/c/2f39548f45693d86e950647012a214da6917dc9f https://git.kernel.org/stable/c/ccbc10647aafe2b7506edb4b10e19c6c2416c162 https://git.kernel.org/stable/c/adfbc08b94e7df08b9ed5fa26b969cc1b54c84ec https://git.kernel.org/stable/c/dd9e1cf619c945f320e686dcaf13e37ef0b05fdd https://git.kernel.org/stable/c/6bd301819f8f69331a55ae2336c8b111fc933f3d