# CVE-2025-23138: watch\_queue: fix pipe accounting mismatch

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-04-16 · Modified: 2026-11-05
- Aliases: UBUNTU-CVE-2025-23138, DEBIAN-CVE-2025-23138
- Record: https://cvemate.com/vulnerability/CVE-2025-23138 · JSON: https://cvemate.com/vulnerability/CVE-2025-23138/json

## Description

```text
In the Linux kernel, the following vulnerability has been resolved:

watch_queue: fix pipe accounting mismatch

Currently, watch_queue_set_size() modifies the pipe buffers charged to
user->pipe_bufs without updating the pipe->nr_accounted on the pipe
itself, due to the if (!pipe_has_watch_queue()) test in
pipe_resize_ring(). This means that when the pipe is ultimately freed,
we decrement user->pipe_bufs by something other than what than we had
charged to it, potentially leading to an underflow. This in turn can
cause subsequent too_many_pipe_buffers_soft() tests to fail with -EPERM.

To remedy this, explicitly account for the pipe usage in
watch_queue_set_size() to match the number set via account_pipe_buffers()

(It's unclear why watch_queue_set_size() does not update nr_accounted;
it may be due to intentional overprovisioning in watch_queue_set_size()?)
```

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.218%, percentile 13.001%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 130)

- debian linux (Debian): \< 6.1.135-1 \| \< 6.12.25-1
- ubuntu linux (Ubuntu): \< 5.15.0-142.152 \| \< 6.8.0-86.87
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 5.15.0-1086.93 \| \< 6.8.0-1041.43
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1086.93~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1041.43~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 5.15.0-1086.93+fips1 \| \< 6.8.0-1041.43+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1091.100 \| \< 6.8.0-1041.47
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.15 (Ubuntu): \< 5.15.0-1091.100~20.04.1
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 44)

- <https://git.kernel.org/stable/c/8658c75343ed00e5e154ebbe24335f51ba8db547>
- <https://git.kernel.org/stable/c/471c89b7d4f58bd6082f7c1fe14d4ca15c7f1284>
- <https://git.kernel.org/stable/c/d40e3537265dea9e3c33021874437ff26dc18787>
- <https://git.kernel.org/stable/c/6dafa27764183738dc5368b669b71e3d0d154f12>
- <https://git.kernel.org/stable/c/56ec918e6c86c1536870e4373e91eddd0c44245f>
- <https://git.kernel.org/stable/c/2d680b988656bb556c863d8b46d9b9096842bf3d>
- <https://git.kernel.org/stable/c/205028ebba838938d3b264dda1d0708fa7fe1ade>
- <https://git.kernel.org/stable/c/f13abc1e8e1a3b7455511c4e122750127f6bc9b0>
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- <https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html>
- <https://ubuntu.com/security/CVE-2025-23138>
- <https://www.cve.org/CVERecord?id=CVE-2025-23138>
- <https://git.kernel.org/linus/f13abc1e8e1a3b7455511c4e122750127f6bc9b0>
- <https://ubuntu.com/security/notices/USN-7591-1>
- <https://ubuntu.com/security/notices/USN-7591-2>
- <https://ubuntu.com/security/notices/USN-7591-3>
- <https://ubuntu.com/security/notices/USN-7592-1>
- <https://ubuntu.com/security/notices/USN-7593-1>
- <https://ubuntu.com/security/notices/USN-7594-1>
- <https://ubuntu.com/security/notices/USN-7591-4>

---

Data as of 2026-12-05T04:44:17.059Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
