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 EE23645949 for ; Mon, 20 May 2024 09:48:38 +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=1716198519; cv=none; b=C1qgBuPiLkBroivLdtgddhLVR0K2GZliBNk2NCbYzWJIlO1GDAKceSnSSEYA2lygkA8vrZ7PKM537xtD+I/hvQknDIGQ24kx/cky91bP2/L4vnf1CH81KGncaBSfoUJAWof9kDqIh6UqeTFOTaFAAAz4N1sAdHK2UJg4O0p/OPk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198519; c=relaxed/simple; bh=QfLUYRUinzHZoPcYsWkTTVRaVYtcbKEAVCX9wU+/SaI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=h9/Q/OgO02b+QckxHE9OgDb7eAin/LD0PEsPHICcqnM2Q0btYJDtGrqUMAW6UQv1ZGpZo/iMQU/tKFhSJC6ynlCpvyLpqjXPKzN6ELJUXFR3PG7TX2hd0DBDFQEE3OCsxG71bkthhQARliaoykjgaCmqI4WXanuQCKqtgCTgwqw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=W5rxhyyp; 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="W5rxhyyp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19C72C2BD10; Mon, 20 May 2024 09:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716198518; bh=QfLUYRUinzHZoPcYsWkTTVRaVYtcbKEAVCX9wU+/SaI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=W5rxhyypmfcS1M59Swa+lCwY9rXowREH/nl5UdCrDIzmfgySwPZCTN7GLenFIraeo xO8CLEJkT2GWEVinK1EFN2lT6q9MFrEOMi/Sb3+JxOxQhqVye27d9vF33KY7mT3jj/ GAGsq6Rd7qHT4C9LyUXHg1Xo4pDTT/+fyJuOS/5c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35985: sched/eevdf: Prevent vlag from going out of bounds in reweight_eevdf() Date: Mon, 20 May 2024 11:48:21 +0200 Message-ID: <2024052018-CVE-2024-35985-8839@gregkh> X-Mailer: git-send-email 2.45.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=2500; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=QfLUYRUinzHZoPcYsWkTTVRaVYtcbKEAVCX9wU+/SaI=; b=owGbwMvMwCRo6H6F97bub03G02pJDGneMkl8jSEvt6em3/3pHXa4qLBH9dScY9qB+bb1V1Z6a GisWvW1I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYi08awYFFt6r9TX6IEnncy 94RY9Vj3Zm9RZ5hfKG2f3yRd3vbQME3LfaERn/8a1q0A 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/eevdf: Prevent vlag from going out of bounds in reweight_eevdf() It was possible to have pick_eevdf() return NULL, which then causes a NULL-deref. This turned out to be due to entity_eligible() returning falsely negative because of a s64 multiplcation overflow. Specifically, reweight_eevdf() computes the vlag without considering the limit placed upon vlag as update_entity_lag() does, and then the scaling multiplication (remember that weight is 20bit fixed point) can overflow. This then leads to the new vruntime being weird which then causes the above entity_eligible() to go side-ways and claim nothing is eligible. Thus limit the range of vlag accordingly. All this was quite rare, but fatal when it does happen. The Linux kernel CVE team has assigned CVE-2024-35985 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.4 with commit 14204acc09f6 and fixed in 6.6.30 with commit 470d347b14b0 Issue introduced in 6.7 with commit eab03c23c2a1 and fixed in 6.8.9 with commit 06f27e6d7bf0 Issue introduced in 6.7 with commit eab03c23c2a1 and fixed in 6.9 with commit 1560d1f6eb6b 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-35985 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/fair.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/470d347b14b0ecffa9b39cf8f644fa2351db3efb https://git.kernel.org/stable/c/06f27e6d7bf0abf54488259ef36bbf0e1fccb35c https://git.kernel.org/stable/c/1560d1f6eb6b398bddd80c16676776c0325fe5fe