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 9052CBE46 for ; Sat, 16 Aug 2025 11:14:06 +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=1755342846; cv=none; b=WHanVhD8cBZSpLH3T+MxaAgQH2kgC0o6A6LkaehHRZY0YoWynaTa6nFNGOZxiFE5qiGQTiuctQsvHiUx+re2MkWleBC4qh8BI34EUasZ6BVuBYvV7cLZaMs9YBCKssGfe7iV+gmaF6o/VivmQmYcGw5ra5dsUv+8tvZuNinJPMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755342846; c=relaxed/simple; bh=B42xQlfNH+vp7wDUsSXNbYcHZOVS2ZpgbO2L5Y5gkiE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=apc5QmcYHN2nou+OKQgWP9jdI8kIM6TMFhoIfnVO7IDKijY533R4ohj1UqYPSf6A3flC1Y3DCLy6UgaZVBmIz4tmq6y7eoM7FJ3L/6cztefwyQ38sIPYoF1et95suzVAIqU/RbpJVAaohFCsKsOwK/p3/tEb779VHF5WL48/muw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MM2mYMdP; 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="MM2mYMdP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A363CC4CEEF; Sat, 16 Aug 2025 11:14:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755342846; bh=B42xQlfNH+vp7wDUsSXNbYcHZOVS2ZpgbO2L5Y5gkiE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MM2mYMdPb9zABOhLMAegjlgskAp1qdgxYU+6tnH067rO+AsXLdJjCuEPCzZHi2O4R ZLk7zbADdiv/ros+LA/KrX6dGM+t52XixPBrBUQ5R9vdSdabD5aRRWSFnZ6HvQRq54 FAeE0Y/zEzuzFe4yU9nS0r7m7wsCWc9OjS4xZRIU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38522: sched/ext: Prevent update_locked_rq() calls with NULL rq Date: Sat, 16 Aug 2025 13:13:53 +0200 Message-ID: <2025081652-CVE-2025-38522-641c@gregkh> X-Mailer: git-send-email 2.50.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=2423; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OcjG9/JPvwmOWy8N4z4IqoOGhataDH8sHALhlrFPdOY=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkL0j84FM0/H/f/sJujU6mWxEJ9w4LMS7VrDlmkFLtNy rAN1zDviGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlcmMswP2L/bo26aNt++zOb ox9rfTb9+J17M8N8FyZTk9C/hx9HFN97mWi9ZeNClqSLAA== 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: sched/ext: Prevent update_locked_rq() calls with NULL rq Avoid invoking update_locked_rq() when the runqueue (rq) pointer is NULL in the SCX_CALL_OP and SCX_CALL_OP_RET macros. Previously, calling update_locked_rq(NULL) with preemption enabled could trigger the following warning: BUG: using __this_cpu_write() in preemptible [00000000] This happens because __this_cpu_write() is unsafe to use in preemptible context. rq is NULL when an ops invoked from an unlocked context. In such cases, we don't need to store any rq, since the value should already be NULL (unlocked). Ensure that update_locked_rq() is only called when rq is non-NULL, preventing calling __this_cpu_write() on preemptible context. The Linux kernel CVE team has assigned CVE-2025-38522 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 18853ba782bef65fc81ef2b3370382e5b479c5eb and fixed in 6.15.8 with commit 237c43037b336e36a49eb9f2daac1c7719ec7f8b Issue introduced in 6.15 with commit 18853ba782bef65fc81ef2b3370382e5b479c5eb and fixed in 6.16 with commit e14fd98c6d66cb76694b12c05768e4f9e8c95664 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-38522 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/sched/ext.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/237c43037b336e36a49eb9f2daac1c7719ec7f8b https://git.kernel.org/stable/c/e14fd98c6d66cb76694b12c05768e4f9e8c95664