From mboxrd@z Thu Jan 1 00:00:00 1970 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 7C52814A60A for ; Sat, 9 Nov 2024 10:18:08 +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=1731147488; cv=none; b=lHlUfq13YZDMAov74oP0YMQfoiGioRsvZCAV/w4nXO+YFaF1XIrQez8ZTkEF88Oz41Lq+i4cMJF55HWAzJg2pcdFQOdTpMluM0WfdtmoKgNyMbS2XFMrMZLiEFUhuNUAXpi0b3J/xKGx7r7p5OSyh0comQKgJ3u2gVoLdFjTYUc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731147488; c=relaxed/simple; bh=SnmQRKSETKvOntCzEB6PHBGVJXEaZlp6W/H8nSe1G9Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GZwb9cnlIsF/NaIwNcmbA5q/C3dj+r80k86aCe4hl5LtBeg+iVqLFGGIaSqQ7rn8quy1M5BuQXbZD44H3z2P0q8QOxqd4CDtK5rTsaMqYVIRP+mDSfkwWNep9oqS8wHPWKMgljJOqI0TpfG4voTT4+E8z0pKX5LcZ6GlLZ1SSTA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Cj5NxuDh; 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="Cj5NxuDh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD75AC4CECE; Sat, 9 Nov 2024 10:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731147488; bh=SnmQRKSETKvOntCzEB6PHBGVJXEaZlp6W/H8nSe1G9Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Cj5NxuDhUilnZ75xidwpSnOGwrlyGU77r4jBOcyxmckDXBSAkkKG/5wyfnw5EyQqS bljsw7ZECxz43EafgnW7FgTy2HdMR56aYB9WBTQrfQqSjhZ4JLf5PDhsywzbr6npwZ Ta/wg7Pa9QJn+hdk2SPFxwwxIBPvDZCeffKo9JQA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50232: iio: adc: ad7124: fix division by zero in ad7124_set_channel_odr() Date: Sat, 9 Nov 2024 11:15:40 +0100 Message-ID: <2024110930-CVE-2024-50232-d425@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=2565; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=SnmQRKSETKvOntCzEB6PHBGVJXEaZlp6W/H8nSe1G9Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn6Zk5Ljzls4Dkn6q7HIvRAzSyhIO1cAPPtCv/URqWp6 X1vloh1xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEQcpjEsWC88sWzth67Q6L0R P2Zu/y6RFC7xhmF+uY1p1p4Hys9nnym+WZ009dmNbJ5ZAA== 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: iio: adc: ad7124: fix division by zero in ad7124_set_channel_odr() In the ad7124_write_raw() function, parameter val can potentially be zero. This may lead to a division by zero when DIV_ROUND_CLOSEST() is called within ad7124_set_channel_odr(). The ad7124_write_raw() function is invoked through the sequence: iio_write_channel_raw() -> iio_write_channel_attribute() -> iio_channel_write(), with no checks in place to ensure val is non-zero. The Linux kernel CVE team has assigned CVE-2024-50232 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 7b8d045e497a and fixed in 5.15.171 with commit 4f588fffc307 Issue introduced in 5.13 with commit 7b8d045e497a and fixed in 6.1.116 with commit f51343f346e6 Issue introduced in 5.13 with commit 7b8d045e497a and fixed in 6.6.60 with commit 3dc0eda2cd5c Issue introduced in 5.13 with commit 7b8d045e497a and fixed in 6.11.7 with commit 0ac0beb4235a Issue introduced in 5.13 with commit 7b8d045e497a and fixed in 6.12-rc6 with commit efa353ae1b05 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-50232 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/iio/adc/ad7124.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/4f588fffc307a4bc2761aee6ff275bb4b433e451 https://git.kernel.org/stable/c/f51343f346e6abde094548a7fb34472b0d4cae91 https://git.kernel.org/stable/c/3dc0eda2cd5c653b162852ae5f0631bfe4ca5e95 https://git.kernel.org/stable/c/0ac0beb4235a9a474f681280a3bd4e2a5bb66569 https://git.kernel.org/stable/c/efa353ae1b0541981bc96dbf2e586387d0392baa