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 3EB85280325 for ; Wed, 18 Jun 2025 09:30:00 +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=1750239001; cv=none; b=XXMr/pgKHMnBPJiVK6xBYytZfPtjHO8xbKrB0+A1TtX9KY31PDU5WBiZXZq1w5TY1tVA64wa+J1budglssLAdvdNYjxr4z9ldulzJ4cVDMEB3YPRLQiVLUIhghxJac/VRJRxyZWfS55wse0vbLuoGod6hbtVZg73cudqsTy0G18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750239001; c=relaxed/simple; bh=B6mBwiY2Rsy8kEn78LU26XntnzHwryozXADaTth2E+4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=R1KAP57bxhO9/4FbD7dqqS01Mcb88p41fAyPN33cPPc5lxVWy11wEVozQcBr6c1sT3sZtKrQA4GH6C2oUQD72OqAzJJ9gcLuOhyT2T6OWD18/JjBDjulmksKXBJmkLKQZAGT0HX6aysY8PWepnPoO9Ox5ubTkDxVycI4uoNvw6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uhVR7Gbv; 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="uhVR7Gbv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49BD4C4CEE7; Wed, 18 Jun 2025 09:30:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750239000; bh=B6mBwiY2Rsy8kEn78LU26XntnzHwryozXADaTth2E+4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=uhVR7GbvVHWhLaaRGofkKh/ftDZZs2Ag6CSQqXcV3NNELqJiFDCJ01bt7vdP9GXXJ 849PEmi1KIR+siBEg2zKE7Dh4jlZUVTEnOiiv69m/5GsP6LwjeVuidftx6OTH1jZ+/ +rEh/uOJYxgYQD7eeOziZTgjnyLon5+pNAEKBD5A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38012: sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator Date: Wed, 18 Jun 2025 11:28:46 +0200 Message-ID: <2025061843-CVE-2025-38012-6d55@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=2415; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=v2mL2znzyep5y1QTDhLrCnQQqv/Vk+yK3Nl0drBXF70=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBbacbF8nwJfQE1Jxw3Zf9qvzRJJ733oo7Uhoe9u9bk dllcHJXRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzk8XOGBVcDnp49nJvO17GN 69i63ew7447vu8WwYNnvxg3BsmEHZ4Vmim7zqDePOLMwEQA= 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: bpf_iter_scx_dsq_new() should always initialize iterator BPF programs may call next() and destroy() on BPF iterators even after new() returns an error value (e.g. bpf_for_each() macro ignores error returns from new()). bpf_iter_scx_dsq_new() could leave the iterator in an uninitialized state after an error return causing bpf_iter_scx_dsq_next() to dereference garbage data. Make bpf_iter_scx_dsq_new() always clear $kit->dsq so that next() and destroy() become noops. The Linux kernel CVE team has assigned CVE-2025-38012 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 650ba21b131ed1f8ee57826b2c6295a3be221132 and fixed in 6.12.30 with commit 0102989af4c334d1d98b2a0fd4d61a5152e39b72 Issue introduced in 6.12 with commit 650ba21b131ed1f8ee57826b2c6295a3be221132 and fixed in 6.14.8 with commit 255dd31bfc4a67a19b1fc2cd130a50284dadfe3a Issue introduced in 6.12 with commit 650ba21b131ed1f8ee57826b2c6295a3be221132 and fixed in 6.15 with commit 428dc9fc0873989d73918d4a9cc22745b7bbc799 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-38012 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/0102989af4c334d1d98b2a0fd4d61a5152e39b72 https://git.kernel.org/stable/c/255dd31bfc4a67a19b1fc2cd130a50284dadfe3a https://git.kernel.org/stable/c/428dc9fc0873989d73918d4a9cc22745b7bbc799