# CVE-2025-38129: page_pool: Fix use-after-free in page_pool_recycle_in_ring

> A use-after-free vulnerability in the Linux kernel's page pool recycling allows local attackers to potentially execute arbitrary code or escalate privileges.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Jul 2025
- **Updated:** 5 Aug 2026
- **Also known as:** BELL-CVE-2025-38129, DEBIAN-CVE-2025-38129, GHSA-98jq-f2h2-hqf4, RHSA-2026:4444, ROOT-OS-DEBIAN-11-CVE-2025-38129, ROOT-OS-DEBIAN-12-CVE-2025-38129, ROOT-OS-UBUNTU-2204-CVE-2025-38129, ROOT-OS-UBUNTU-2404-CVE-2025-38129, SUSE-SU-2026:0674-1, SUSE-SU-2026:0736-1, SUSE-SU-2026:0745-1, SUSE-SU-2026:0748-1, SUSE-SU-2026:20672-1, SUSE-SU-2026:20673-1, SUSE-SU-2026:20674-1, SUSE-SU-2026:20678-1, SUSE-SU-2026:20679-1, SUSE-SU-2026:20680-1, SUSE-SU-2026:20681-1, SUSE-SU-2026:20699-1, SUSE-SU-2026:20700-1, SUSE-SU-2026:20701-1, SUSE-SU-2026:20702-1, SUSE-SU-2026:20703-1, SUSE-SU-2026:20704-1, SUSE-SU-2026:20705-1, UBUNTU-CVE-2025-38129

## What is CVE-2025-38129?

CVE-2025-38129 is a high-severity use after free vulnerability in Linux kernel, published on 3 Jul 2025. 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:

page_pool: Fix use-after-free in page_pool_recycle_in_ring

syzbot reported a uaf in page_pool_recycle_in_ring:

BUG: KASAN: slab-use-after-free in lock_release+0x151/0xa30 kernel/locking/lockdep.c:5862
Read of size 8 at addr ffff8880286045a0 by task syz.0.284/6943

CPU: 0 UID: 0 PID: 6943 Comm: syz.0.284 Not tainted 6.13.0-rc3-syzkaller-gdfa94ce54f41 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0x169/0x550 mm/kasan/report.c:489
 kasan_report+0x143/0x180 mm/kasan/report.c:602
 lock_release+0x151/0xa30 kernel/locking/lockdep.c:5862
 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:165 [inline]
 _raw_spin_unlock_bh+0x1b/0x40 kernel/locking/spinlock.c:210
 spin_unlock_bh include/linux/spinlock.h:396 [inline]
 ptr_ring_produce_bh include/linux/ptr_ring.h:164 [inline]
 page_pool_recycle_in_ring net/core/page_pool.c:707 [inline]
 page_pool_put_unrefed_netmem+0x748/0xb00 net/core/page_pool.c:826
 page_pool_put_netmem include/net/page_pool/helpers.h:323 [inline]
 page_pool_put_full_netmem include/net/page_pool/helpers.h:353 [inline]
 napi_pp_put_page+0x149/0x2b0 net/core/skbuff.c:1036
 skb_pp_recycle net/core/skbuff.c:1047 [inline]
 skb_free_head net/core/skbuff.c:1094 [inline]
 skb_release_data+0x6c4/0x8a0 net/core/skbuff.c:1125
 skb_release_all net/core/skbuff.c:1190 [inline]
 __kfree_skb net/core/skbuff.c:1204 [inline]
 sk_skb_reason_drop+0x1c9/0x380 net/core/skbuff.c:1242
 kfree_skb_reason include/linux/skbuff.h:1263 [inline]
 __skb_queue_purge_reason include/linux/skbuff.h:3343 [inline]

root cause is:

page_pool_recycle_in_ring
  ptr_ring_produce
    spin_lock(&r->producer_lock);
    WRITE_ONCE(r->queue[r->producer++], ptr)
      //recycle last page to pool
				page_pool_release
				  page_pool_scrub
				    page_pool_empty_ring
				      ptr_ring_consume
				      page_pool_return_page  //release all page
				  __page_pool_destroy
				     free_percpu(pool->recycle_stats);
				     free(pool) //free

     spin_unlock(&r->producer_lock); //pool->ring uaf read
  recycle_stat_inc(pool, ring);

page_pool can be free while page pool recycle the last page in ring.
Add producer-lock barrier to page_pool_release to prevent the page
pool from being free before all pages have been recycled.

recycle_stat_inc() is empty when CONFIG_PAGE_POOL_STATS is not
enabled, which will trigger Wempty-body build warning. Add definition
for pool stat macro to fix warning.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2025-38129?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bpftool` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `bpftool-debuginfo` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-abi-whitelists` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-core` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-debug` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-debug-core` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-debug-debuginfo` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-debug-devel` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-debug-modules` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-debug-modules-extra` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-debuginfo` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-debuginfo-common-x86_64` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-devel` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-doc` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-modules` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-modules-extra` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-tools` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-tools-debuginfo` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-tools-libs` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `perf` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `perf-debuginfo` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `python3-perf` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `python3-perf-debuginfo` | Red Hat:rhel_aus:8.2::baseos | All versions | 0:4.18.0-193.189.1.el8_2 |
| `kernel-livepatch-SLE15-SP6_Update_8` | SUSE:Linux Enterprise Live Patching 15 SP6 | All versions | 14-150600.2.1 |
| `kernel-livepatch-SLE15-SP6_Update_9` | SUSE:Linux Enterprise Live Patching 15 SP6 | All versions | 14-150600.2.1 |
| `kernel-livepatch-SLE15-SP7-RT_Update_0` | SUSE:Linux Enterprise Live Patching 15 SP7 | All versions | 11-150700.3.1 |
| `kernel-livepatch-SLE15-SP7_Update_0` | SUSE:Linux Enterprise Live Patching 15 SP7 | All versions | 11-150700.3.30.1 |
| `kernel-livepatch-SLE15-SP7_Update_1` | SUSE:Linux Enterprise Live Patching 15 SP7 | All versions | 11-150700.2.1 |
| `kernel-livepatch-MICRO-6-0-RT_Update_5` | SUSE:Linux Micro 6.0 | All versions | 15-1.1 |
| `kernel-livepatch-MICRO-6-0-RT_Update_6` | SUSE:Linux Micro 6.0 | All versions | 13-3.1 |
| `kernel-livepatch-MICRO-6-0-RT_Update_7` | SUSE:Linux Micro 6.0 | All versions | 13-1.3 |
| `kernel-livepatch-MICRO-6-0-RT_Update_8` | SUSE:Linux Micro 6.0 | All versions | 12-1.2 |
| `kernel-livepatch-MICRO-6-0_Update_5` | SUSE:Linux Micro 6.0 | All versions | 16-1.2 |
| `kernel-livepatch-MICRO-6-0_Update_6` | SUSE:Linux Micro 6.0 | All versions | 14-3.1 |
| `kernel-livepatch-MICRO-6-0_Update_7` | SUSE:Linux Micro 6.0 | All versions | 13-1.2 |
| `kernel-livepatch-MICRO-6-0-RT_Update_5` | SUSE:Linux Micro 6.1 | All versions | 15-1.1 |
| `kernel-livepatch-MICRO-6-0-RT_Update_6` | SUSE:Linux Micro 6.1 | All versions | 13-3.1 |
| `kernel-livepatch-MICRO-6-0-RT_Update_7` | SUSE:Linux Micro 6.1 | All versions | 13-1.3 |
| `kernel-livepatch-MICRO-6-0-RT_Update_8` | SUSE:Linux Micro 6.1 | All versions | 12-1.2 |

Products: Linux kernel.

## How do I fix CVE-2025-38129?

Apply the vendor's patch.

## Is CVE-2025-38129 being exploited?

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

## Other vulnerabilities in Linux kernel

- [CVE-2026-53266](https://insights.sbomify.com/CVE-2026-53266/): Linux Kernel Out-of-Bounds Write (high 8.8, exploited in the wild)
- [CVE-2013-6282](https://insights.sbomify.com/CVE-2013-6282/): Linux Kernel Improper Input Validation (high 8.8, exploited in the wild)
- [CVE-2022-0185](https://insights.sbomify.com/CVE-2022-0185/): Linux Kernel Heap-Based Buffer Overflow (high 8.4, exploited in the wild)
- [CVE-2013-2094](https://insights.sbomify.com/CVE-2013-2094/): Linux Kernel Privilege Escalation (high 8.4, exploited in the wild)
- [CVE-2026-53362](https://insights.sbomify.com/CVE-2026-53362/): Linux Kernel Unspecified (high 7.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-38129 and fix it if it is affected.

What it is: CVE-2025-38129 is a high-severity use after free vulnerability in Linux kernel, published on 3 Jul 2025. 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-2025-38129 in the wild and no public exploit code.

Affected product: Linux kernel. 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-2025-38129/ (Markdown: https://insights.sbomify.com/CVE-2025-38129/index.md)
```

## Sources

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

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