{
  "id": "CVE-2026-46242",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-46242",
  "published_at": "2026-05-30T12:13:45.594Z",
  "title": "eventpoll: fix ep_remove struct eventpoll / struct file UAF",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-07-04T16:52:30Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 35.2,
    "repo": "0xBlackash/CVE-2026-46242",
    "source": "github"
  },
  "poc_repo_count": 6,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\neventpoll: fix ep_remove struct eventpoll / struct file UAF\n\nep_remove() (via ep_remove_file()) cleared file-\u003ef_ep under\nfile-\u003ef_lock but then kept using @file inside the critical section\n(is_file_epoll(), hlist_del_rcu() through the head, spin_unlock).\nA concurrent __fput() taking the eventpoll_release() fastpath in\nthat window observed the transient NULL, skipped\neventpoll_release_file() and ran to f_op-\u003erelease / file_free().\n\nFor the epoll-watches-epoll case, f_op-\u003erelease is\nep_eventpoll_release() -\u003e ep_clear_and_put() -\u003e ep_free(), which\nkfree()s the watched struct eventpoll. Its embedded -\u003erefs\nhlist_head is exactly where epi-\u003efllink.pprev points, so the\nsubsequent hlist_del_rcu()'s \"*pprev = next\" scribbles into freed\nkmalloc-192 memory.\n\nIn addition, struct file is SLAB_TYPESAFE_BY_RCU, so the slot\nbacking @file could be recycled by alloc_empty_file() --\nreinitializing f_lock and f_ep -- while ep_remove() is still\nnominally inside that lock. The upshot is an attacker-controllable\nkmem_cache_free() against the wrong slab cache.\n\nPin @file via epi_fget() at the top of ep_remove() and gate the\ncritical section on the pin succeeding. With the pin held @file\ncannot reach refcount zero, which holds __fput() off and\ntransitively keeps the watched struct eventpoll alive across the\nhlist_del_rcu() and the f_lock use, closing both UAFs.\n\nIf the pin fails @file has already reached refcount zero and its\n__fput() is in flight. Because we bailed before clearing f_ep,\nthat path takes the eventpoll_release() slow path into\neventpoll_release_file() and blocks on ep-\u003emtx until the waiter\nside's ep_clear_and_put() drops it. The bailed epi's share of\nep-\u003erefcount stays intact, so the trailing ep_refcount_dec_and_test()\nin ep_clear_and_put() cannot free the eventpoll out from under\neventpoll_release_file(); the orphaned epi is then cleaned up\nthere.\n\nA successful pin also proves we are not racing\neventpoll_release_file() on this epi, so drop the now-redundant\nre-check of epi-\u003edying under f_lock. The cheap lockless\nREAD_ONCE(epi-\u003edying) fast-path bailout stays.",
  "cwe": "CWE-416",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [
    {
      "repo": "0xBlackash/CVE-2026-46242",
      "url": "https://github.com/0xBlackash/CVE-2026-46242",
      "created_at": "2026-07-04T16:52:30Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 22,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2026-02-06T16:11:55Z"
    },
    {
      "repo": "0xredash/CVE-2026-46242",
      "url": "https://github.com/0xredash/CVE-2026-46242",
      "created_at": "2026-07-04T16:52:30Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 22,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2026-02-06T16:11:55Z"
    },
    {
      "repo": "ashrafzaryouh/CVE-2026-46242",
      "url": "https://github.com/ashrafzaryouh/CVE-2026-46242",
      "created_at": "2026-07-04T16:52:30Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 22,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2026-02-06T16:11:55Z"
    },
    {
      "repo": "SaithFranklinB/ScannerBadEpoll",
      "url": "https://github.com/SaithFranklinB/ScannerBadEpoll",
      "created_at": "2026-07-08T00:26:26Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 1,
      "is_poc": "unknown",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "no network code found (normal for a local exploit)"
      ],
      "status": "analyzed",
      "owner_created_at": "2015-12-10T03:44:04Z"
    },
    {
      "repo": "Baba01hacker666/CVE-2026-46242",
      "url": "https://github.com/Baba01hacker666/CVE-2026-46242",
      "created_at": "2026-07-11T03:26:58Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 2,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-11-09T13:14:23Z"
    },
    {
      "repo": "Aayushbankar/bad_epoll_ab_tier2",
      "url": "https://github.com/Aayushbankar/bad_epoll_ab_tier2",
      "created_at": "2026-08-08T05:54:50Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "fake",
      "kind": "fake",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-04-25T12:50:15Z"
    },
    {
      "repo": "BinaryMasc/CVE-2026-46242",
      "url": "https://github.com/BinaryMasc/CVE-2026-46242",
      "created_at": "2026-08-20T01:07:58Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2020-11-02T18:23:32Z"
    },
    {
      "repo": "villager1314/CVE-2026-46242-Analysis",
      "url": "https://github.com/villager1314/CVE-2026-46242-Analysis",
      "created_at": "2026-10-08T14:11:21Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "no network code found (normal for a local exploit)"
      ],
      "status": "analyzed",
      "owner_created_at": "2021-10-15T23:39:09Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= f2451def095c1743adcfcb0cb5dadc86034e162a, \u003c a10fbbe74e1c743beb1bb312109366667461df8a",
          "\u003e= a1f93804449d13f97dabd4b996817de4bf1ed67a, \u003c 3e1144d2515d28e4312e663ea05eac203101491d",
          "\u003e= 58c9b016e12855286370dfb704c08498edbc857a, \u003c 2de4db145b2992da496fea6c51f9839be678ae24",
          "\u003e= 58c9b016e12855286370dfb704c08498edbc857a, \u003c 9324de74a3a59b9fde9b62ee45ebaa71458ba2e5",
          "\u003e= 58c9b016e12855286370dfb704c08498edbc857a, \u003c ef4ca02e95363e78977ca04340d44fe3b4b2b81f",
          "\u003e= 58c9b016e12855286370dfb704c08498edbc857a, \u003c ced39b6a8062bac5c18a1c3df85634107eb8664a",
          "\u003e= 58c9b016e12855286370dfb704c08498edbc857a, \u003c a6dc643c69311677c574a0f17a3f4d66a5f3744b",
          "\u003e= 5.15.209, \u003c 5.15.222",
          "\u003e= 6.1.175, \u003c 6.1.178"
        ],
        "fixed_in": [
          "a10fbbe74e1c743beb1bb312109366667461df8a",
          "3e1144d2515d28e4312e663ea05eac203101491d",
          "2de4db145b2992da496fea6c51f9839be678ae24",
          "9324de74a3a59b9fde9b62ee45ebaa71458ba2e5",
          "ef4ca02e95363e78977ca04340d44fe3b4b2b81f",
          "ced39b6a8062bac5c18a1c3df85634107eb8664a",
          "a6dc643c69311677c574a0f17a3f4d66a5f3744b",
          "5.15.222",
          "6.1.178"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.4"
        ],
        "fixed_in": [
          "0",
          "5.15.222",
          "6.1.178",
          "6.6.144",
          "6.12.95",
          "6.18.33",
          "7.0.10",
          "7.1"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to a10fbbe74e1c743beb1bb312109366667461df8a or 3e1144d2515d28e4312e663ea05eac203101491d or 2de4db145b2992da496fea6c51f9839be678ae24 or 9324de74a3a59b9fde9b62ee45ebaa71458ba2e5 or ef4ca02e95363e78977ca04340d44fe3b4b2b81f or ced39b6a8062bac5c18a1c3df85634107eb8664a or a6dc643c69311677c574a0f17a3f4d66a5f3744b or 5.15.222 or 6.1.178 or later.",
      "Upgrade Linux to 0 or 5.15.222 or 6.1.178 or 6.6.144 or 6.12.95 or 6.18.33 or 7.0.10 or 7.1 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
