CVE-2026-46242

Published May 30, 2026

Last updated a month ago

Overview

AI description

Automated description summarized from trusted sources.

CVE-2026-46242, dubbed "Bad Epoll," is a use-after-free vulnerability found within the Linux kernel's `eventpoll` (epoll) subsystem. The flaw arises from a race condition during the cleanup process of `epoll` file descriptors. Specifically, the `file->f_ep` pointer is cleared in the `ep_remove()` and `ep_remove_file()` functions while the `@file` pointer continues to be referenced within a critical section. This timing issue allows a concurrent `__fput()` operation to observe a transient NULL state for `f_ep`, causing it to bypass necessary cleanup routines and free the `struct eventpoll` object prematurely. Consequently, subsequent operations attempt to access freed memory, leading to memory corruption. The vulnerability affects Linux kernel versions 5.10 through 6.11, impacting a wide range of systems including enterprise servers, desktops, and Android devices.

Description
In the Linux kernel, the following vulnerability has been resolved: eventpoll: fix ep_remove struct eventpoll / struct file UAF ep_remove() (via ep_remove_file()) cleared file->f_ep under file->f_lock but then kept using @file inside the critical section (is_file_epoll(), hlist_del_rcu() through the head, spin_unlock). A concurrent __fput() taking the eventpoll_release() fastpath in that window observed the transient NULL, skipped eventpoll_release_file() and ran to f_op->release / file_free(). For the epoll-watches-epoll case, f_op->release is ep_eventpoll_release() -> ep_clear_and_put() -> ep_free(), which kfree()s the watched struct eventpoll. Its embedded ->refs hlist_head is exactly where epi->fllink.pprev points, so the subsequent hlist_del_rcu()'s "*pprev = next" scribbles into freed kmalloc-192 memory. In addition, struct file is SLAB_TYPESAFE_BY_RCU, so the slot backing @file could be recycled by alloc_empty_file() -- reinitializing f_lock and f_ep -- while ep_remove() is still nominally inside that lock. The upshot is an attacker-controllable kmem_cache_free() against the wrong slab cache. Pin @file via epi_fget() at the top of ep_remove() 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 hlist_del_rcu() and the f_lock 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 f_ep, that path takes the eventpoll_release() slow path into eventpoll_release_file() and blocks on ep->mtx until the waiter side's ep_clear_and_put() drops it. The bailed epi's share of ep->refcount stays intact, so the trailing ep_refcount_dec_and_test() in ep_clear_and_put() cannot free the eventpoll out from under eventpoll_release_file(); the orphaned epi is then cleaned up there. A successful pin also proves we are not racing eventpoll_release_file() on this epi, so drop the now-redundant re-check of epi->dying under f_lock. The cheap lockless READ_ONCE(epi->dying) fast-path bailout stays.
Source
416baaa9-dc9f-4396-8d5f-8c081fb06d67
NVD status
Modified
Products
linux_kernel

Risk scores

CVSS 3.1

Type
Secondary
Base score
7.8
Impact score
5.9
Exploitability score
1.8
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Severity
HIGH

Weaknesses

nvd@nist.gov
CWE-416

Social media

Hype score
Not currently trending
  1. anthropic CVE-2026-46242. kernel CVEs cascade. patch the host, expect container escapes to follow within days. #Anthropic #CVE-2026-46242 https://t.co/hpOdrGCDAV

    @trerbbb

    1 Aug 2026

    45 Impressions

    1 Retweet

    1 Like

    0 Bookmarks

    0 Replies

    0 Quotes

  2. CVE-2026-46242. 0day Intel: A critical Bad Epoll vulnerability (CVE-2026-46242) allows local users to gain r

    @lyrie_ai

    22 Jul 2026

    41 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    1 Reply

    0 Quotes

  3. 07:45 UTC: CVE-2026-46242 disclosed. A PoC/exploit has been discovered for vulnerability CVE-2026-46242 PT ID: PT-2026-45095 Vendor: Linux Product: Linux k

    @lyrie_ai

    22 Jul 2026

    67 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    1 Reply

    0 Quotes

  4. Linuxカーネルのepollに、解放後利用(UAF)の脆弱性「Bad-Epoll」(CVE-2026-46242)が報告されています。epollは多数の接続や入出力の状態変化をまとめて監視する中核機能。2つの処理が同時に走ったときだけ成立す

    @MalwareBibleJP

    19 Jul 2026

    1365 Impressions

    2 Retweets

    12 Likes

    3 Bookmarks

    0 Replies

    0 Quotes

  5. What a day! (and it's not over yet..) - GhostLock (CVE-2026-43499) Local Root Exploit - Bad epoll (CVE-2026-46242) Local Root Exploit - cPanel File Manager security issue - WHMCS security update

    @georgetasioulis

    8 Jul 2026

    509 Impressions

    0 Retweets

    4 Likes

    1 Bookmark

    0 Replies

    0 Quotes

  6. Added 4 new LPE exploits to lpe-toolkit: - PEdit COW CVE-2026-46331 - DirtyClone CVE-2026-43503 - Bad Epoll CVE-2026-46242 - FUSE OOB CVE-2026-31694 https://t.co/BmdCcmBkWK

    @portbuster1337

    6 Jul 2026

    10226 Impressions

    48 Retweets

    211 Likes

    137 Bookmarks

    2 Replies

    1 Quote

  7. Linux-Kernel Bad Epoll CVE-2026-46242: Lokaler Nutzer erhält Root auf Kernel 6.4 und neuer Am 4. Juli 2026 wurde CVE-2026-46242 veröffentlicht, eine Use-after-free-Race-Co https://t.co/onahzNgWQO https://t.co/p0R4gM18Mh

    @schoenfelderED

    6 Jul 2026

    7 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  8. Bad Epoll (CVE-2026-46242) is a Linux kernel use-after-free flaw that lets unprivileged users gain root. Affects Linux 6.4+ and Android. For More: https://t.co/ciA4rj9abR #BadEpoll #CVE #LinuxKernel #PrivilegeEscalation #Android #InfoSec #CyberSecurity #LinuxSecurity https://t

    @redsecuretech

    4 Jul 2026

    45 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  9. A lot of offensive activities were identified targeting Linux Kernel (CVE-2026-46242) https://t.co/EsMCWe721V

    @vuldb

    31 May 2026

    59 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  10. There is a new vulnerability with elevated criticality in Linux Kernel (CVE-2026-46242) https://t.co/ZjftEUzzgM

    @vuldb

    30 May 2026

    24 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  11. CVE-2026-46242 Linux Kernel Eventpoll Use-After-Free via Concurrent File Descriptor Operations https://t.co/Md8jvYakK8

    @VulmonFeeds

    30 May 2026

    38 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

Configurations

  1. In the Linux kernel, the following vulnerability has been resolved: mm: page_ext: add count limit to page_ext_iter_next to prevent invalid PFN access The page_ext iteration API does not validate if the PFN still belongs to a valid section while advancing the iterator. When dynamically adding memory in the hotplug path, it can lead to a NULL pointer dereference during page_ext_lookup at the boundary of the last valid section when iterator count equals __pgcount. The for_each_page_ext() macro calls page_ext_iter_next() as its loop increment. for_each_page_ext() does a "__page_ext = page_ext_iter_next(&__iter)" at the end. This causes page_ext_iter_next() to increment iter->index past __pgcount and call page_ext_lookup(start_pfn + __pgcount). During memory hotplug (online), the PFN at start_pfn + __pgcount may belong to a section that has not yet been initialized, causing page_ext_lookup() to trigger a NULL pointer dereference. [ 14.555124][ T846] Call trace: [ 14.555125][ T846] lookup_page_ext+0x6c/0x108 (P) [ 14.555127][ T846] page_ext_lookup+0x30/0x3c [ 14.555129][ T846] __reset_page_owner+0x11c/0x260 [ 14.571201][ T846] __free_pages_ok+0x5e8/0x8e0 [ 14.571204][ T846] __free_pages_core+0x78/0xf0 [ 14.571206][ T846] generic_online_page+0x14/0x24 [ 14.597782][ T846] online_pages+0x178/0x30c [ 14.597784][ T846] memory_block_change_state+0x284/0x32c [ 14.597787][ T846] memory_subsys_online+0x4c/0x64 [ 14.597789][ T846] device_online+0x88/0xb0 [ 14.597791][ T846] online_memory_block+0x30/0x40 [ 14.597793][ T846] walk_memory_blocks+0xac/0xe8 [ 14.597794][ T846] add_memory_resource+0x280/0x298 [ 14.656161][ T846] add_memory+0x60/0x98 Move the iteration boundary enforcement inside the iterator functions, so callers cannot inadvertently access beyond the requested range.CVE-2026-64295