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 64DB73043CC for ; Wed, 12 Nov 2025 10:24:12 +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=1762943053; cv=none; b=QP5R9YezI+kq9SHZTS2FLBUToPNGGpAXzuR6L3AvhkjlgrL6YfKR65hzSTeHdOtE25Tjw9mJoUHOax9eyJgTvPYEcBc8nImspCUkIoB67MxYc/wIL5OM419BXsuPqHZ8xibREgX11C56O4AXxzfkgtxtvINBg0bnvSQMsW+9cuk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762943053; c=relaxed/simple; bh=8m1JwjnZ8cJOg74wF6SrQ1hILWhP9ytI6qAHZ4JYrPs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rn0ZkMKDfbjWjWJlaGPwwXjG9KAfp2r3ciHctjuECgtpqdRF4VA0MyQsnunSVRfTEmwwg9Pa8oEcQzSPFGVbpEsxTdacKlxQ1Ho7pNbZNj/6bw3s+VLhtQtd9tfuqUavNywaA5NDFSQg+O8CzCK+5MrL+Jza49UAnolfEhLiGoc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V1YxO7dF; 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="V1YxO7dF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0ADEC4CEF7; Wed, 12 Nov 2025 10:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762943052; bh=8m1JwjnZ8cJOg74wF6SrQ1hILWhP9ytI6qAHZ4JYrPs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=V1YxO7dFLvufJ6u3CUtpcpOB6kzv2aVmw04pOxptFrR3aZTYXA/jzuYsyFCxZ7Mco 7imUAHx9HM595P/evG8FeSBBCg36UpIfsWKTO3MTl5Bac/KFLoAZ5p70ZEvDj/XK1w ty9EXZrh70gcXQzxVz3/xnEAfdw1gF2Q+JUnVAA8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40126: sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC Date: Wed, 12 Nov 2025 19:24:02 +0900 Message-ID: <2025111253-CVE-2025-40126-a667@gregkh> X-Mailer: git-send-email 2.51.2 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=3758; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=88dntM/3Fl2qRPOqSEBmn7QqvOLi/i67zLw11atfPlM=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkiCZb1V/SubT80Ie5F+XWrgB9rs8vuHau9ELNA6VKqJ bdV2bVTHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARswsMC3oMjsUG7Wey4eTq eRu79GzdgmJXYYYFS2tnnLUKeCebLj8/fW7koW/MVsesAA== 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: sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC The referenced commit introduced exception handlers on user-space memory references in copy_from_user and copy_to_user. These handlers return from the respective function and calculate the remaining bytes left to copy using the current register contents. This commit fixes a couple of bad calculations. This will fix the return value of copy_from_user and copy_to_user in the faulting case. The behaviour of memcpy stays unchanged. The Linux kernel CVE team has assigned CVE-2025-40126 to this issue. Affected and fixed versions =========================== Issue introduced in 4.9 with commit cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada and fixed in 5.4.301 with commit 0bf3dc3a2156f1c5ddaba4b85d09767874634114 Issue introduced in 4.9 with commit cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada and fixed in 5.10.246 with commit 41c18baee66134e6ef786eb075c1b6adb22432b0 Issue introduced in 4.9 with commit cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada and fixed in 5.15.195 with commit 59424dc0d0e044b2eb007686a4724ddd91d57db5 Issue introduced in 4.9 with commit cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada and fixed in 6.1.156 with commit 9b137f277cc3297044aabd950f589e505d30104c Issue introduced in 4.9 with commit cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada and fixed in 6.6.112 with commit 674ff598148a28bae0b5372339de56f2abf0b1d1 Issue introduced in 4.9 with commit cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada and fixed in 6.12.53 with commit 7de3a75bbc8465d816336c74d50109e73501efab Issue introduced in 4.9 with commit cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada and fixed in 6.17.3 with commit 57c278500fce3cd4e1c540700c0b05426a958393 Issue introduced in 4.9 with commit cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada and fixed in 6.18-rc1 with commit 4fba1713001195e59cfc001ff1f2837dab877efb Issue introduced in 4.4.34 with commit 1731d90d8a558ecb20cdee0c2c001ae8e15c251d Issue introduced in 4.8.10 with commit b0580eadc19ff3a617a7d07cfaf2a985153c114e 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-2025-40126 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: arch/sparc/lib/U1memcpy.S 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/0bf3dc3a2156f1c5ddaba4b85d09767874634114 https://git.kernel.org/stable/c/41c18baee66134e6ef786eb075c1b6adb22432b0 https://git.kernel.org/stable/c/59424dc0d0e044b2eb007686a4724ddd91d57db5 https://git.kernel.org/stable/c/9b137f277cc3297044aabd950f589e505d30104c https://git.kernel.org/stable/c/674ff598148a28bae0b5372339de56f2abf0b1d1 https://git.kernel.org/stable/c/7de3a75bbc8465d816336c74d50109e73501efab https://git.kernel.org/stable/c/57c278500fce3cd4e1c540700c0b05426a958393 https://git.kernel.org/stable/c/4fba1713001195e59cfc001ff1f2837dab877efb