# CVE-2026-23052: ftrace: Do not over-allocate ftrace memory

> A logic error in Linux kernel ftrace memory allocation causes excessive page usage and kernel warnings, potentially leading to denial of service.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Feb 2026
- **Updated:** 4 Jul 2026
- **Also known as:** BELL-CVE-2026-23052, DEBIAN-CVE-2026-23052, GHSA-qvpg-9fvc-x6cv, UBUNTU-CVE-2026-23052

## What is CVE-2026-23052?

CVE-2026-23052 is a denial of service vulnerability in Linux, published on 4 Feb 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official 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.

## Which versions are affected by CVE-2026-23052?


## How do I fix CVE-2026-23052?

Apply the vendor's patch.

## Is CVE-2026-23052 being exploited?

There is no known exploitation of CVE-2026-23052 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-23052 and fix it if it is affected.

What it is: CVE-2026-23052 is a denial of service vulnerability in Linux, published on 4 Feb 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-23052 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-23052/ (Markdown: https://insights.sbomify.com/CVE-2026-23052/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-23052
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-23052
- OSV: https://osv.dev/vulnerability/CVE-2026-23052

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-23052/
Summaries are generated and may contain mistakes; the official description above is the record.
