Bug 2389491 (CVE-2025-38614) - CVE-2025-38614 kernel: eventpoll: Fix semi-unbounded recursion
Summary: CVE-2025-38614 kernel: eventpoll: Fix semi-unbounded recursion
Keywords:
Status: NEW
Alias: CVE-2025-38614
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-08-19 18:03 UTC by OSIDB Bzimport
Modified: 2025-11-17 08:14 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2025:17760 0 None None None 2025-10-13 04:01:39 UTC
Red Hat Product Errata RHSA-2025:18318 0 None None None 2025-10-20 09:48:58 UTC
Red Hat Product Errata RHSA-2025:19104 0 None None None 2025-10-27 16:19:22 UTC
Red Hat Product Errata RHSA-2025:19268 0 None None None 2025-10-29 15:11:49 UTC
Red Hat Product Errata RHSA-2025:19492 0 None None None 2025-11-03 15:53:39 UTC
Red Hat Product Errata RHSA-2025:21051 0 None None None 2025-11-12 00:31:12 UTC
Red Hat Product Errata RHSA-2025:21128 0 None None None 2025-11-12 13:48:42 UTC
Red Hat Product Errata RHSA-2025:21463 0 None None None 2025-11-17 08:14:44 UTC

Description OSIDB Bzimport 2025-08-19 18:03:49 UTC
In the Linux kernel, the following vulnerability has been resolved:

eventpoll: Fix semi-unbounded recursion

Ensure that epoll instances can never form a graph deeper than
EP_MAX_NESTS+1 links.

Currently, ep_loop_check_proc() ensures that the graph is loop-free and
does some recursion depth checks, but those recursion depth checks don't
limit the depth of the resulting tree for two reasons:

 - They don't look upwards in the tree.
 - If there are multiple downwards paths of different lengths, only one of
   the paths is actually considered for the depth check since commit
   28d82dc1c4ed ("epoll: limit paths").

Essentially, the current recursion depth check in ep_loop_check_proc() just
serves to prevent it from recursing too deeply while checking for loops.

A more thorough check is done in reverse_path_check() after the new graph
edge has already been created; this checks, among other things, that no
paths going upwards from any non-epoll file with a length of more than 5
edges exist. However, this check does not apply to non-epoll files.

As a result, it is possible to recurse to a depth of at least roughly 500,
tested on v6.15. (I am unsure if deeper recursion is possible; and this may
have changed with commit 8c44dac8add7 ("eventpoll: Fix priority inversion
problem").)

To fix it:

1. In ep_loop_check_proc(), note the subtree depth of each visited node,
and use subtree depths for the total depth calculation even when a subtree
has already been visited.
2. Add ep_get_upwards_depth_proc() for similarly determining the maximum
depth of an upwards walk.
3. In ep_loop_check(), use these values to limit the total path length
between epoll nodes to EP_MAX_NESTS edges.

Comment 4 errata-xmlrpc 2025-10-13 04:01:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2025:17760 https://access.redhat.com/errata/RHSA-2025:17760

Comment 6 errata-xmlrpc 2025-10-20 09:48:57 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2025:18318 https://access.redhat.com/errata/RHSA-2025:18318

Comment 8 errata-xmlrpc 2025-10-27 16:19:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.4 Extended Update Support

Via RHSA-2025:19104 https://access.redhat.com/errata/RHSA-2025:19104

Comment 9 errata-xmlrpc 2025-10-29 15:11:48 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2025:19268 https://access.redhat.com/errata/RHSA-2025:19268

Comment 10 errata-xmlrpc 2025-11-03 15:53:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions

Via RHSA-2025:19492 https://access.redhat.com/errata/RHSA-2025:19492

Comment 11 errata-xmlrpc 2025-11-12 00:31:11 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2025:21051 https://access.redhat.com/errata/RHSA-2025:21051

Comment 12 errata-xmlrpc 2025-11-12 13:48:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2025:21128 https://access.redhat.com/errata/RHSA-2025:21128

Comment 13 errata-xmlrpc 2025-11-17 08:14:43 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2025:21463 https://access.redhat.com/errata/RHSA-2025:21463


Note You need to log in before you can comment on or make changes to this bug.