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 83AC02F6175 for ; Wed, 22 Oct 2025 13:25:16 +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=1761139516; cv=none; b=CU9DxDpzs0/Zf7otPoM1kazjbUC4icNR1mn/inWQKcvlKYhTqaO9xIP3pa1+ZKAvd6BmDOOYNNGyEND0YCGyM1PW6ih3oQgkmY3vbJB7TVulNwcxNCSPlgCV0W2gHkfg3wTDoGkFsfx3ouetO4fNnsKDiPYtxYiZ3NTetBxftmg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761139516; c=relaxed/simple; bh=oLTzbHrrCXVuVEc4Sbl4ZX4EUXEcLohgFyUUKZAysik=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cHPcy2M327hETPj1l/IRAp7whK6ypKuHZtWe/CiZ3Z0gHCYXasZVxCbpl5sE2fFUrYrnXg3LiSeMQ+f0KEgKtrg7uDe5nTfOPRdO1RRnOWFJ1fmeUSNEDutdNvgGpdsntK4kykBD2+ak/Up9W6MJu4vhfbSzzin9kc2Jl6lAvks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xYok+c4G; 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="xYok+c4G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1340BC4CEE7; Wed, 22 Oct 2025 13:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761139516; bh=oLTzbHrrCXVuVEc4Sbl4ZX4EUXEcLohgFyUUKZAysik=; h=From:To:Cc:Subject:Date:Reply-to:From; b=xYok+c4GiK7bFtx/l8Wnm31Q5vZviR2akxaLCpsltkfA4sryfgv9M4WWnhWm+8gMe bMO2JCfNJ5FXyyXusTwXl1yHEz5CeMOLlG6ImlAJ2LisWq3gVoAoLVO9wpnCZ99337 RGqUDeGPjhpj80jzYLwfnC05Y7VtKSqLPIIa6w6E= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50582: regulator: core: Prevent integer underflow Date: Wed, 22 Oct 2025 15:24:30 +0200 Message-ID: <2025102210-CVE-2022-50582-1ac9@gregkh> X-Mailer: git-send-email 2.51.1 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=2362; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=h1vSAx55SSqqCnat2Thu97WupBP4J36J/FG1RqmKbik=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk/bv2quHB6g6KT+ftydiHlWX4afMUpj2ds3LWBZanyP cNXphYLOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiX/IYFlyVF5r/PrRZW+zW 6eDa3euLKzZPNmaYXxD/2se7otLmZeK6v5kdYXs5Fa0WAAA= 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: regulator: core: Prevent integer underflow By using a ratio of delay to poll_enabled_time that is not integer time_remaining underflows and does not exit the loop as expected. As delay could be derived from DT and poll_enabled_time is defined in the driver this can easily happen. Use a signed iterator to make sure that the loop exits once the remaining time is negative. The Linux kernel CVE team has assigned CVE-2022-50582 to this issue. Affected and fixed versions =========================== Fixed in 5.10.150 with commit b051d9bf98bd9cea312b228e264eb6542a9beb67 Fixed in 5.15.75 with commit e33da263e9658bfe870ea7836fbbd72f246d7dbd Fixed in 5.19.17 with commit 9f2395316e4845466cb9b5b9b15a171a2c91913c Fixed in 6.0.3 with commit bfe602d9a349360e60e9051c9cafb9fef204524d Fixed in 6.1 with commit 8d8e16592022c9650df8aedfe6552ed478d7135b 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-50582 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/regulator/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/b051d9bf98bd9cea312b228e264eb6542a9beb67 https://git.kernel.org/stable/c/e33da263e9658bfe870ea7836fbbd72f246d7dbd https://git.kernel.org/stable/c/9f2395316e4845466cb9b5b9b15a171a2c91913c https://git.kernel.org/stable/c/bfe602d9a349360e60e9051c9cafb9fef204524d https://git.kernel.org/stable/c/8d8e16592022c9650df8aedfe6552ed478d7135b