CVE-2026-46242: eventpoll: fix ep_remove struct eventpoll / struct file UAF

Published May 30, 2026
·
Updated

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

eventpoll: fix epremove struct eventpoll / struct file UAF

epremove() (via epremovefile()) cleared file->fep under file->flock but then kept using @file inside the critical section (isfileepoll(), hlistdelrcu() through the head, spinunlock). A concurrent fput() taking the eventpollrelease() fastpath in that window observed the transient NULL, skipped eventpollreleasefile() and ran to fop->release / filefree().

For the epoll-watches-epoll case, fop->release is epeventpollrelease() -> epclearandput() -> epfree(), which kfree()s the watched struct eventpoll. Its embedded ->refs hlisthead is exactly where epi->fllink.pprev points, so the subsequent hlistdelrcu()'s "pprev = next" scribbles into freed kmalloc-192 memory.

In addition, struct file is SLABTYPESAFEBYRCU, so the slot backing @file could be recycled by allocemptyfile() -- reinitializing flock and fep -- while epremove() is still nominally inside that lock. The upshot is an attacker-controllable kmemcachefree() against the wrong slab cache.

Pin @file via epifget() at the top of epremove() and gate the critical section on the pin succeeding. With the pin held @file cannot reach refcount zero, which holds fput() off and transitively keeps the watched struct eventpoll alive across the hlistdelrcu() and the flock use, closing both UAFs.

If the pin fails @file has already reached refcount zero and its fput() is in flight. Because we bailed before clearing fep, that path takes the eventpollrelease() slow path into eventpollreleasefile() and blocks on ep->mtx until the waiter side's epclearandput() drops it. The bailed epi's share of ep->refcount stays intact, so the trailing eprefcountdecandtest() in epclearandput() cannot free the eventpoll out from under eventpollreleasefile(); the orphaned epi is then cleaned up there.

A successful pin also proves we are not racing eventpollreleasefile() on this epi, so drop the now-redundant re-check of epi->dying under flock. The cheap lockless READONCE(epi->dying) fast-path bailout stays.

Affected Software

5 affected components
Linux Linux kernel
Linux Linux kernel>=5.15.209<5.16
Linux Linux kernel>=6.1.175<6.2
Linux Linux kernel>=6.4<6.18.33
Linux Linux kernel>=6.19<7.0.10

Event History

May 30, 2026
CVE Published
via MITRE·12:13 PM
Data Sourced
via MITRE·12:13 PM
DescriptionSeverity
Data Sourced
via Red Hat·01:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·01:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 16, 2026
Data Sourced
12:00 AM
SeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-46242?

CVE-2026-46242 has a severity rating of 75 indicating a high risk level.

2

How do I fix CVE-2026-46242?

To address CVE-2026-46242, update to the latest version of the Linux kernel where the vulnerability has been patched.

3

What impact does CVE-2026-46242 have on my Linux system?

CVE-2026-46242 could potentially allow an uninitialized memory access leading to a denial of service or escalation of privileges.

4

Are all versions of the Linux kernel affected by CVE-2026-46242?

Only specific versions of the Linux kernel prior to the patch release are affected by CVE-2026-46242.

5

What components are involved in CVE-2026-46242?

CVE-2026-46242 involves the eventpoll component of the Linux kernel and can lead to use-after-free conditions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203