CVE-2025-23138

MEDIUM

Linux Kernel - Pipe Buffer Accounting Mismatch in watch_queue_set_size

Title source: llm
STIX 2.1

Description

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()?)

Scores

CVSS v3 5.5
EPSS 0.0004
EPSS Percentile 14.1%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Details

Status published
Products (33)
debian/debian_linux 11.0
linux/Kernel < 5.10.236linux
linux/Kernel 5.11.0 - 5.15.180linux
linux/Kernel 5.16.0 - 6.1.134linux
linux/Kernel 6.13.0 - 6.14.2linux
linux/Kernel 6.2.0 - 6.6.87linux
linux/Kernel 6.7.0 - 6.12.23linux
linux/Kernel 6.8.0 - 6.13.11linux
Linux/Linux < 6.8
Linux/Linux 162ae0e78bdabf84ef10c1293c4ed7865cb7d3c8 - 8658c75343ed00e5e154ebbe24335f51ba8db547
... and 23 more
Published Apr 16, 2025
Tracked Since Feb 18, 2026