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 ABF8C24B256 for ; Sat, 11 Jan 2025 12:25: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=1736598332; cv=none; b=mEeo3Z1UqwijS+OTC/NjbbXFfTcpTWp8XDHftQBaWnHo3weRAJJSyfN1vw5+UPbr74Hw5P8DBI01I1YMCI8TnYEuhgH2pJsUAGqSixH12amC24QrN5WkzcSox8j8UNXnvS4SGauOx5mCJihPVQBoW8jWZLqk664b+RyFzhQ5QO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736598332; c=relaxed/simple; bh=P1s95CARszv6Wr2myCcsMVdE7XGIn1SoGS8XlE3v5B4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bwV/VjNAeXnaOzlLviqGiKsFbNAlpstuktlWPPSCgvQ7EPSiWI2ucJN2BzMFBGVyyoI1dwYKcJkMg2CLdHhZ3o2wPlImVPFkrxXF0HKqw0TvYod2BdNyUK9X38c4aLARVIFouh/tNZmyk1R6WX63s6+8MQjhCnWN0EOoJ43jV4A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=i9Rh+B5x; 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="i9Rh+B5x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2FFAC4CED2; Sat, 11 Jan 2025 12:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1736598332; bh=P1s95CARszv6Wr2myCcsMVdE7XGIn1SoGS8XlE3v5B4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=i9Rh+B5xkUX7QQI6Wj2WPGjyEN7oDPB4yKmEDYQpcu5RTLQV+2IKQXuIJy5gNJkfl woYsr5Rb4n0zfaCyJcjttvNmry4wIyLk7Z22VXeay+L8EutRkPFjexHLCIAGVJC+Yx HpDnH3EOZwctgaM7wvJ9HUQNyN7PPUW+6orUN1vk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-41932: sched: fix warning in sched_setaffinity Date: Sat, 11 Jan 2025 13:25:16 +0100 Message-ID: <2025011116-CVE-2024-41932-ed84@gregkh> X-Mailer: git-send-email 2.48.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=2520; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=P1s95CARszv6Wr2myCcsMVdE7XGIn1SoGS8XlE3v5B4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlNyTpHFXs/O6zhf5prfVBEqdHrSfEk45D7ArZG+7aEX pPi8frXEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPRi2WY735R9tK2b74lxyIW RjS+f7v/pfSrHoYFp3Q7Hl9XfFDpVRGwyXe3UQZPiBM7AA== 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: fix warning in sched_setaffinity Commit 8f9ea86fdf99b added some logic to sched_setaffinity that included a WARN when a per-task affinity assignment races with a cpuset update. Specifically, we can have a race where a cpuset update results in the task affinity no longer being a subset of the cpuset. That's fine; we have a fallback to instead use the cpuset mask. However, we have a WARN set up that will trigger if the cpuset mask has no overlap at all with the requested task affinity. This shouldn't be a warning condition; its trivial to create this condition. Reproduced the warning by the following setup: - $PID inside a cpuset cgroup - another thread repeatedly switching the cpuset cpus from 1-2 to just 1 - another thread repeatedly setting the $PID affinity (via taskset) to 2 The Linux kernel CVE team has assigned CVE-2024-41932 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit 8f9ea86fdf99b81458cc21fc1c591fcd4a0fa1f4 and fixed in 6.12.5 with commit 5c3fb75f538cfcb886f6dfeb497d99fc2f263ee6 Issue introduced in 6.2 with commit 8f9ea86fdf99b81458cc21fc1c591fcd4a0fa1f4 and fixed in 6.13-rc3 with commit 70ee7947a29029736a1a06c73a48ff37674a851b 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-2024-41932 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/syscalls.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/5c3fb75f538cfcb886f6dfeb497d99fc2f263ee6 https://git.kernel.org/stable/c/70ee7947a29029736a1a06c73a48ff37674a851b