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 8EFEC20CCD6 for ; Tue, 1 Apr 2025 15:47: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=1743522452; cv=none; b=M7ti+T3DUrki1g9Xrn6ksR66JGZ+AZRWOKfZ099k91eccyMEu2N35Bigk2MrpQoOCDUaG73S/IyC7P/ceFjQwHC4yY8AKxNTgUCRgG/SoWjzP25g8Mx3Qc9+cSxlm1vsSj0uGLjkSLerZ09m1rEAW6xczyTNY5diZ28+96jxpNs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743522452; c=relaxed/simple; bh=G8harS1k+w9jESlLq4+kCQdq1PMflldflIWdr0A/4mY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cfgNbNoNKfdfNnm0DJpYqu9yYquUkDPD8Fdolv66sQvVhOuWHsBV9Nwa7LDlmzV6v5eJwvAcSz64zm/UCML1f+yjOm47/uMYDs9JHYDfCrfxHdy+7DldzA+NQ/Vo9YbxJfCkuPJOhC6UTXdsBYWkcAfpRpHlvGuOLrXrDGtkg54= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZoxaftZM; 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="ZoxaftZM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 273A1C4CEE4; Tue, 1 Apr 2025 15:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743522452; bh=G8harS1k+w9jESlLq4+kCQdq1PMflldflIWdr0A/4mY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ZoxaftZMpoeP1nCW4ExaHP7YKWhXZXwshGFnPB3VyaSVdw0A2keOIKLQXkYO+RwFa BTSSwYXdy0hxx3XsLj75umF1wmGCS6UA9M2PGsgf6TNqqjp9SIXLVgfxlHc385B9oE xqXB5jTY9mmQF9ITupH/rF3rU8/defPCmZ2WExZ0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21965: sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl() Date: Tue, 1 Apr 2025 16:45:50 +0100 Message-ID: <2025040145-CVE-2025-21965-34d8@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=2255; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=G8harS1k+w9jESlLq4+kCQdq1PMflldflIWdr0A/4mY=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvuDQb7u74t7Bmx7r/rXIuQqIc36qDDXY+uZC740dfb VdoUe+5jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiISgTDPL3HnyxnXW69mxvI 9kpAdc/Z9fOkJBkWTIz9cabA4devetlbDJ8Uk1IfMW4yBgA= 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: sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl() If a BPF scheduler provides an invalid CPU (outside the nr_cpu_ids range) as prev_cpu to scx_bpf_select_cpu_dfl() it can cause a kernel crash. To prevent this, validate prev_cpu in scx_bpf_select_cpu_dfl() and trigger an scx error if an invalid CPU is specified. The Linux kernel CVE team has assigned CVE-2025-21965 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit f0e1a0643a59bf1f922fa209cec86a170b784f3f and fixed in 6.12.20 with commit 752b56bb76e2471197d25d6948d85753043b10da Issue introduced in 6.12 with commit f0e1a0643a59bf1f922fa209cec86a170b784f3f and fixed in 6.13.8 with commit 515680e76c536dd4aa8e2b5d674b0d441baddf5b Issue introduced in 6.12 with commit f0e1a0643a59bf1f922fa209cec86a170b784f3f and fixed in 6.14 with commit 9360dfe4cbd62ff1eb8217b815964931523b75b3 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-21965 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/752b56bb76e2471197d25d6948d85753043b10da https://git.kernel.org/stable/c/515680e76c536dd4aa8e2b5d674b0d441baddf5b https://git.kernel.org/stable/c/9360dfe4cbd62ff1eb8217b815964931523b75b3