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 5713C421EFD for ; Wed, 4 Feb 2026 16:05:24 +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=1770221124; cv=none; b=j8H22df5k/GyUqooOpiTu88rFwqQovuxOiwy2u3rk7fm1ECJUsMJBxfyAp3FvUmQeCEsU5WsiFQLrZQF+uETaBILeOfYsvq2sGU5M94LpTRmWaDY4jSc8gXXaFlCLBdFwUW42KXJ/Nh3lzovzxwPLE5ZZGMqMPM8JTY6lwBQE/k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770221124; c=relaxed/simple; bh=fbrRo6Ah34IKdXnQTNkcZsKg60kXh4n/6yFir06Wh5k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FcrEmR3OaCS7OhKGUL6Ae1kseEZaF5Gnl9HJQzNNHSuYGK7asZKy8YolmTr72sUSSXEKk551qcXXHyk6dLQ/wzSP90TrIF3bvKAxMLNXllYl/jk2lS924sIk+yjkGDgSZtrP/+AJAzdOklrlxLPRwyMabGV9GHU0sN61SGNO9jE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WXz/7CSZ; 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="WXz/7CSZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2D79C4CEF7; Wed, 4 Feb 2026 16:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770221124; bh=fbrRo6Ah34IKdXnQTNkcZsKg60kXh4n/6yFir06Wh5k=; h=From:To:Cc:Subject:Date:Reply-To:From; b=WXz/7CSZ3YhOtMhrmdyOAqm7hsdVsfyL1CmItIgDeehEZAzPiSNTMYP/JoiGUf3a1 kpIRpbIZQKliKIKUzDCDI7huX8d9ztQKCSlUSnmCqiHIFBBBPUEphvD/UvKIcF+RGg teA01pW5i2O7DVaHxUq+DH33X4yG6Z+Vr6MqFdcY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23052: ftrace: Do not over-allocate ftrace memory Date: Wed, 4 Feb 2026 17:04:47 +0100 Message-ID: <2026020450-CVE-2026-23052-340f@gregkh> X-Mailer: git-send-email 2.53.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3133; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Ov7IPliZDyqpml6iiJMwbZyGiIhxcPHDzhZJ1oU1WwQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnNeUpTblgUmMw5tYnj46Ndjy4F+y2Ry+L9vLz6aHDvC f9f9guCOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiPawM87Q2SzxLc7Hu9jgi /GGifmy5sZeLNMM8TTuJJI09Pzs+1dZPONN94MAl64ppAA== 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: ftrace: Do not over-allocate ftrace memory The pg_remaining calculation in ftrace_process_locs() assumes that ENTRIES_PER_PAGE multiplied by 2^order equals the actual capacity of the allocated page group. However, ENTRIES_PER_PAGE is PAGE_SIZE / ENTRY_SIZE (integer division). When PAGE_SIZE is not a multiple of ENTRY_SIZE (e.g. 4096 / 24 = 170 with remainder 16), high-order allocations (like 256 pages) have significantly more capacity than 256 * 170. This leads to pg_remaining being underestimated, which in turn makes skip (derived from skipped - pg_remaining) larger than expected, causing the WARN(skip != remaining) to trigger. Extra allocated pages for ftrace: 2 with 654 skipped WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:7295 ftrace_process_locs+0x5bf/0x5e0 A similar problem in ftrace_allocate_records() can result in allocating too many pages. This can trigger the second warning in ftrace_process_locs(). Extra allocated pages for ftrace WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:7276 ftrace_process_locs+0x548/0x580 Use the actual capacity of a page group to determine the number of pages to allocate. Have ftrace_allocate_pages() return the number of allocated pages to avoid having to calculate it. Use the actual page group capacity when validating the number of unused pages due to skipped entries. Drop the definition of ENTRIES_PER_PAGE since it is no longer used. The Linux kernel CVE team has assigned CVE-2026-23052 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 4a3efc6baff931da9a85c6d2e42c87bd9a827399 and fixed in 6.18.7 with commit 9aef476717994e96dadfb359641c4b82b521aa36 Issue introduced in 6.15 with commit 4a3efc6baff931da9a85c6d2e42c87bd9a827399 and fixed in 6.19-rc6 with commit be55257fab181b93af38f8c4b1b3cb453a78d742 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-2026-23052 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/trace/ftrace.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/9aef476717994e96dadfb359641c4b82b521aa36 https://git.kernel.org/stable/c/be55257fab181b93af38f8c4b1b3cb453a78d742