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 5FA361E0E14 for ; Wed, 18 Jun 2025 09:35:32 +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=1750239332; cv=none; b=GlkMaQDKxGEI1nruS6eXM1Cid1fHXsLJZM/RZXyYtN3EF0WV8FRA7Hkh4llXw4txag+t8Cpjk+QGPzHeAJRdrmuUGeePdcB3LJtnmIcBU+UUaJwjXYlFgH6mNW1KLDNMkVqMtqCM8OdZJYBF7ocBBr2dM/awh1yiO937mpGbGjY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750239332; c=relaxed/simple; bh=997pthlU46VAPTi+u7u13cM+/GIaXREBOo09N/OxO+w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=r706GTkENwtmvMX06At3/At69ev6ORM+DIagpNs+ss5UDkBwxpGYEpol4HfpE/P/004fpZMQGziOwQoBAwRqObUxCjE2tVGtVJc0JLIstkfv5QcQnbC3PQ5SKf+FLwi3bhqtJ05Z1RkdkaiYGkLpl+VRL9D90wZQxwWM0e12wbg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dWn85wrS; 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="dWn85wrS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE478C4CEE7; Wed, 18 Jun 2025 09:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750239332; bh=997pthlU46VAPTi+u7u13cM+/GIaXREBOo09N/OxO+w=; h=From:To:Cc:Subject:Date:Reply-to:From; b=dWn85wrSSjWbAdtLMQqa1a4Yt/Vua60beUj8FbaHxrYE4lL+Hm/W2QCjAjqXz+F9G dmD0LnfSmVLGN0whm14Ko9GgDREGhfjXx8xptTn0QLJgBpx5eSr9kiMPio7/8EBSRL Jv+Z7+u+exg7IlVk90LReZY2lrC3cdzo+wO2/YwU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38067: rseq: Fix segfault on registration when rseq_cs is non-zero Date: Wed, 18 Jun 2025 11:34:02 +0200 Message-ID: <2025061837-CVE-2025-38067-b173@gregkh> X-Mailer: git-send-email 2.49.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=2506; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lVobxlohdB3kcWIuU+b5orplNuAhqU2a3agET0fayik=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlB7R8fbrDvXFC8pYRh5symM3VWf+c8/rr58wmj+ymvJ kc9EOIy6IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJBF1imMPr8ebFK741DO91 G53WaPxQZ8tIjGKYX33GnuuF98HNx5bzP/70LSBaZEuTDgA= 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: rseq: Fix segfault on registration when rseq_cs is non-zero The rseq_cs field is documented as being set to 0 by user-space prior to registration, however this is not currently enforced by the kernel. This can result in a segfault on return to user-space if the value stored in the rseq_cs field doesn't point to a valid struct rseq_cs. The correct solution to this would be to fail the rseq registration when the rseq_cs field is non-zero. However, some older versions of glibc will reuse the rseq area of previous threads without clearing the rseq_cs field and will also terminate the process if the rseq registration fails in a secondary thread. This wasn't caught in testing because in this case the leftover rseq_cs does point to a valid struct rseq_cs. What we can do is clear the rseq_cs field on registration when it's non-zero which will prevent segfaults on registration and won't break the glibc versions that reuse rseq areas on thread creation. The Linux kernel CVE team has assigned CVE-2025-38067 to this issue. Affected and fixed versions =========================== Fixed in 6.14.9 with commit 2df285dab00fa03a3ef939b6cb0d0d0aeb0791db Fixed in 6.15 with commit fd881d0a085fc54354414aed990ccf05f282ba53 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-38067 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: kernel/rseq.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/2df285dab00fa03a3ef939b6cb0d0d0aeb0791db https://git.kernel.org/stable/c/fd881d0a085fc54354414aed990ccf05f282ba53