eventpoll: don't decrement ep refcount while still holding the ep mutex
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 20 fixed, 3 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-416 and the CVSS impact.
Summary
In the Linux kernel, the following vulnerability has been resolved: eventpoll: don't decrement ep refcount while still holding the ep mutex Jann Horn points out that epoll is decrementing the ep refcount and then doing a mutex_unlock(&ep->mtx); afterwards. That's very wrong, because it can lead to a use-after-free. That pattern is actually fine for the very last reference, because the code in question will delay the actual call to "ep_free(ep)" until after it has unlocked the mutex. But it's wrong for the much subtler "next to last" case when somebody *else* may also be dropping their reference and free the ep while we're still using the mutex. Note that this is true even if that other user is also using the same ep mutex: mutexes, unlike spinlocks, can not be used for object ownership, even if they guarantee mutual exclusion. A mutex "unlock" operation is not atomic, and as one user is still accessing the mutex as part of unlocking it, another user can come in and get the now released mutex and free the data structure while the first user is still cleaning up. See our mutex documentation in Documentation/locking/mutex-design.rst, in particular the section [1] about semantics: "mutex_unlock() may access the mutex structure even after it has internally released the lock already - so it's not safe for another context to acquire the mutex and assume that the mutex_unlock() context is not using the structure anymore" So if we drop our ep ref before the mutex unlock, but we weren't the last one, we may then unlock the mutex, another user comes in, drops _their_ reference and releases the 'ep' as it now has no users - all while the mutex_unlock() is still accessing it. Fix this by simply moving the ep refcount dropping to outside the mutex: the refcount itself is atomic, and doesn't need mutex protection (that's the whole _point_ of refcounts: unlike mutexes, they are inherently about object lifetimes).
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 5.15.209 to before 5.15.222; 6.1.175 to before 6.1.178 | 5.15.222, 6.1.178 | Patch available | CNA |
| Linux | Linux | 6.4 and later | 5.15.222, 6.1.178, 6.6.99, 6.12.39, 6.15.7, 6.16 | Patch available | CNA |
- Linux VendorLinux Affected 5.15.209 to before 5.15.222; 6.1.175 to before 6.1.178 Fixed in 5.15.222, 6.1.178 Patch available CNA
- Linux VendorLinux Affected 6.4 and later Fixed in 5.15.222, 6.1.178, 6.6.99, 6.12.39, 6.15.7, 6.16 Patch available CNA
CPE configurations NVD · 6
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.4 to before 6.6.99; 6.7 to before 6.12.39; 6.13 to before 6.15.7 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:* | 6.16 rc1 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:* | 6.16 rc2 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.16:rc3:*:*:*:*:*:* | 6.16 rc3 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.16:rc4:*:*:*:*:*:* | 6.16 rc4 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.16:rc5:*:*:*:*:*:* | 6.16 rc5 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 6.4 to before 6.6.99; 6.7 to before 6.12.39; 6.13 to before 6.15.7 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:* Versions 6.16 rc1 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:* Versions 6.16 rc2 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.16:rc3:*:*:*:*:*:* Versions 6.16 rc3 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.16:rc4:*:*:*:*:*:* Versions 6.16 rc4 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.16:rc5:*:*:*:*:*:* Versions 6.16 rc5 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 5.15.222, 6.1.178
- Fix · CNA Linux (Linux) Fixed in 5.15.222, 6.1.178, 6.6.99, 6.12.39, 6.15.7, 6.16
Red Hat 4 advisories
- RHSA-2026:4111 Released 2026-03-09 · Red Hat rating Moderatekernel security update
- Red Hat Enterprise Linux AppStream EUS (v. 10.0) kernel-64k-debug-devel-6.12.0-55.63.1.el10_0, kernel-64k-debug-devel-matched-6.12.0-55.63.1.el10_0, kernel-64k-devel-6.12.0-55.63.1.el10_0 +12
- Red Hat Enterprise Linux BaseOS EUS (v. 10.0) kernel-6.12.0-55.63.1.el10_0, kernel-64k-6.12.0-55.63.1.el10_0, kernel-64k-core-6.12.0-55.63.1.el10_0 +28
- Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0) kernel-tools-libs-devel-6.12.0-55.63.1.el10_0, libperf-6.12.0-55.63.1.el10_0
- Red Hat Enterprise Linux Real Time EUS (v. 10.0) kernel-rt-6.12.0-55.63.1.el10_0, kernel-rt-64k-6.12.0-55.63.1.el10_0, kernel-rt-64k-core-6.12.0-55.63.1.el10_0 +21
- Red Hat Enterprise Linux Real Time for NFV EUS (v. 10.0) kernel-rt-6.12.0-55.63.1.el10_0, kernel-rt-core-6.12.0-55.63.1.el10_0, kernel-rt-debug-6.12.0-55.63.1.el10_0 +11
- RHSA-2026:2759 Released 2026-02-16 · Red Hat rating Moderatekernel security update
- Red Hat CodeReady Linux Builder EUS (v.9.6) kernel-tools-libs-devel-5.14.0-570.89.1.el9_6, libperf-5.14.0-570.89.1.el9_6
- Red Hat Enterprise Linux AppStream EUS (v.9.6) kernel-64k-debug-devel-5.14.0-570.89.1.el9_6, kernel-64k-debug-devel-matched-5.14.0-570.89.1.el9_6, kernel-64k-devel-5.14.0-570.89.1.el9_6 +12
- Red Hat Enterprise Linux BaseOS EUS (v.9.6) kernel-5.14.0-570.89.1.el9_6, kernel-64k-5.14.0-570.89.1.el9_6, kernel-64k-core-5.14.0-570.89.1.el9_6 +28
- Red Hat Enterprise Linux Real Time EUS (v.9.6) kernel-rt-5.14.0-570.89.1.el9_6, kernel-rt-64k-5.14.0-570.89.1.el9_6, kernel-rt-64k-core-5.14.0-570.89.1.el9_6 +21
- Red Hat Enterprise Linux Real Time for NFV EUS (v.9.6) kernel-rt-5.14.0-570.89.1.el9_6, kernel-rt-core-5.14.0-570.89.1.el9_6, kernel-rt-debug-5.14.0-570.89.1.el9_6 +11
- RHSA-2026:1690 Released 2026-02-02 · Red Hat rating Importantkernel security update
- Red Hat Enterprise Linux AppStream (v. 10) kernel-64k-debug-devel-6.12.0-124.31.1.el10_1, kernel-64k-debug-devel-matched-6.12.0-124.31.1.el10_1, kernel-64k-devel-6.12.0-124.31.1.el10_1 +12
- Red Hat Enterprise Linux BaseOS (v. 10) kernel-6.12.0-124.31.1.el10_1, kernel-64k-6.12.0-124.31.1.el10_1, kernel-64k-core-6.12.0-124.31.1.el10_1 +29
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) kernel-tools-libs-devel-6.12.0-124.31.1.el10_1, libperf-6.12.0-124.31.1.el10_1
- Red Hat Enterprise Linux Real Time (v. 10) kernel-rt-6.12.0-124.31.1.el10_1, kernel-rt-64k-6.12.0-124.31.1.el10_1, kernel-rt-64k-core-6.12.0-124.31.1.el10_1 +21
- Red Hat Enterprise Linux Real Time for NFV (v. 10) kernel-rt-6.12.0-124.31.1.el10_1, kernel-rt-core-6.12.0-124.31.1.el10_1, kernel-rt-debug-6.12.0-124.31.1.el10_1 +9
Show 1 more Red Hat advisories
- RHSA-2026:1143 Released 2026-01-26 · Red Hat rating Importantkernel security update
- Red Hat Enterprise Linux AppStream (v. 9) kernel-64k-debug-devel-5.14.0-611.26.1.el9_7, kernel-64k-debug-devel-matched-5.14.0-611.26.1.el9_7, kernel-64k-devel-5.14.0-611.26.1.el9_7 +12
- Red Hat Enterprise Linux BaseOS (v. 9) kernel-5.14.0-611.26.1.el9_7, kernel-64k-5.14.0-611.26.1.el9_7, kernel-64k-core-5.14.0-611.26.1.el9_7 +28
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) kernel-tools-libs-devel-5.14.0-611.26.1.el9_7, libperf-5.14.0-611.26.1.el9_7
- Red Hat Enterprise Linux Real Time (v. 9) kernel-rt-5.14.0-611.26.1.el9_7, kernel-rt-64k-5.14.0-611.26.1.el9_7, kernel-rt-64k-core-5.14.0-611.26.1.el9_7 +21
- Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt-5.14.0-611.26.1.el9_7, kernel-rt-core-5.14.0-611.26.1.el9_7, kernel-rt-debug-5.14.0-611.26.1.el9_7 +9
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 7 | Affected | No fix yet |
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
| Red Hat Enterprise Linux 9 | Affected | No fix yet |
| Red Hat CodeReady Linux Builder EUS (v.9.6) | Fixed | RHSA-2026:2759 |
| Red Hat Enterprise Linux AppStream (v. 10) | Fixed | RHSA-2026:1690 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2026:1143 |
| Red Hat Enterprise Linux AppStream EUS (v. 10.0) | Fixed | RHSA-2026:4111 |
| Red Hat Enterprise Linux AppStream EUS (v.9.6) | Fixed | RHSA-2026:2759 |
| Red Hat Enterprise Linux BaseOS (v. 10) | Fixed | RHSA-2026:1690 |
| Red Hat Enterprise Linux BaseOS (v. 9) | Fixed | RHSA-2026:1143 |
| Red Hat Enterprise Linux BaseOS EUS (v. 10.0) | Fixed | RHSA-2026:4111 |
| Red Hat Enterprise Linux BaseOS EUS (v.9.6) | Fixed | RHSA-2026:2759 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) | Fixed | RHSA-2026:1690 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) | Fixed | RHSA-2026:1143 |
| Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0) | Fixed | RHSA-2026:4111 |
| Red Hat Enterprise Linux Real Time (v. 10) | Fixed | RHSA-2026:1690 |
| Red Hat Enterprise Linux Real Time (v. 9) | Fixed | RHSA-2026:1143 |
| Red Hat Enterprise Linux Real Time EUS (v. 10.0) | Fixed | RHSA-2026:4111 |
| Red Hat Enterprise Linux Real Time EUS (v.9.6) | Fixed | RHSA-2026:2759 |
| Red Hat Enterprise Linux Real Time for NFV (v. 10) | Fixed | RHSA-2026:1690 |
| Red Hat Enterprise Linux Real Time for NFV (v. 9) | Fixed | RHSA-2026:1143 |
| Red Hat Enterprise Linux Real Time for NFV EUS (v. 10.0) | Fixed | RHSA-2026:4111 |
| Red Hat Enterprise Linux Real Time for NFV EUS (v.9.6) | Fixed | RHSA-2026:2759 |
Not affected: 3 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
Timeline
- 2026-10-02 Threatist record created from CVE-2025-38349
- 2026-10-03 Alias added: GHSA-c7h3-7f54-949m
- 2026-10-03 Fix available: Linux/Linux@263f5de8302a6f2f136d392e5d3f8b1edf922857, Linux/[email protected] · CNA
- 2026-10-03 1 new reference · CNA
References
Patch 5
- https://git.kernel.org/stable/c/521e9ff0b67c66a17d6f9593dfccafaa984aae4c
- https://git.kernel.org/stable/c/6dee745bd0aec9d399df674256e7b1ecdb615444
- https://git.kernel.org/stable/c/605c18698ecfa99165f36b7f59d3ed503e169814
- https://git.kernel.org/stable/c/8c2e52ebbe885c7eeaabd3b7ddcdc1246fc400d2
- https://project-zero.issues.chromium.org/issues/430541637
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2025-38349 · CVE Program
- CVE-2025-38349 · NVD
- FIRST EPSS
- GHSA-c7h3-7f54-949m · GitHub Advisory Database · CC BY 4.0
- CVE-2025-38349 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences