{"id":"CVE-2026-139166","aliases":["CVE-2026-139166"],"related":[],"kind":"vulnerability","state":"published","title":"devlink: region: fix snapshot id leak on kernel-allocated ids","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndevlink: region: fix snapshot id leak on kernel-allocated ids\n\nWhen DEVLINK_CMD_REGION_NEW is issued without a snapshot id, the kernel\nallocates one with __devlink_region_snapshot_id_get(). That helper counts\nthe caller as a user of the id, and the caller must release this hold\nonce it is done.\n\ndevlink_nl_region_new_doit() never drops it. The refcount of the id goes\n1 (allocation) -> 2 (snapshot created) and stays at 2. When the snapshot\nis deleted the count only drops to 1, so the id is never erased from\nthe snapshot_ids xarray. The id then stays in use for the lifetime of\nthe devlink instance: requesting a snapshot with that explicit id fails\nwith -EEXIST, and there is no snapshot left to delete to clean it up.\n\nReproducer steps:\n  # devlink region new pci/0000:13:00.0/device-caps\n  pci/0000:13:00.0/device-caps: snapshot 0\n  # devlink region del pci/0000:13:00.0/device-caps snapshot 0\n  # devlink region new pci/0000:13:00.0/device-caps snapshot 0\n  kernel answers: File exists\n\nDrop the caller's reference right after the snapshot has been created,\nas the snapshot then holds its own.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndevlink: region: fix snapshot id leak on kernel-allocated ids\n\nWhen DEVLINK_CMD_REGION_NEW is issued without a snapshot id, the kernel\nallocates one with __devlink_region_snapshot_id_get(). That helper counts\nthe caller as a user of the id, and the caller must release this hold\nonce it is done.\n\ndevlink_nl_region_new_doit() never drops it. The refcount of the id goes\n1 (allocation) -> 2 (snapshot created) and stays at 2. When the snapshot\nis deleted the count only drops to 1, so the id is never erased from\nthe snapshot_ids xarray. The id then stays in use for the lifetime of\nthe devlink instance: requesting a snapshot with that explicit id fails\nwith -EEXIST, and there is no snapshot left to delete to clean it up.\n\nReproducer steps:\n  # devlink region new pci/0000:13:00.0/device-caps\n  pci/0000:13:00.0/device-caps: snapshot 0\n  # devlink region del pci/0000:13:00.0/device-caps snapshot 0\n  # devlink region new pci/0000:13:00.0/device-caps snapshot 0\n  kernel answers: File exists\n\nDrop the caller's reference right after the snapshot has been created,\nas the snapshot then holds its own.","source":"cvelist"}],"published":"2026-11-30T13:32:11.572Z","modified":"2026-11-30T14:18:35.533Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"043b3e22768d5d909cb1474fc21ae2fbaf026c0c","fixed":"242d67e369ec055480eabe893f61b5a94c316aed","status":"affected"},{"type":"git","introduced":"043b3e22768d5d909cb1474fc21ae2fbaf026c0c","fixed":"5c6be0c090fc6f5d88aef30447c2abdbbb9a8e2b","status":"affected"},{"type":"git","introduced":"043b3e22768d5d909cb1474fc21ae2fbaf026c0c","fixed":"33393bd60015355eba67f96ef084a7e1a0e03a5f","status":"affected"},{"type":"git","introduced":"043b3e22768d5d909cb1474fc21ae2fbaf026c0c","fixed":"5ecaa25ea1fc4b5df73ac019915e7785c7df50c3","status":"affected"},{"type":"git","introduced":"043b3e22768d5d909cb1474fc21ae2fbaf026c0c","fixed":"ef8f0a1d888e0280452792f6d4edad237c934a51","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.8","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.119","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/242d67e369ec055480eabe893f61b5a94c316aed","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5c6be0c090fc6f5d88aef30447c2abdbbb9a8e2b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/33393bd60015355eba67f96ef084a7e1a0e03a5f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5ecaa25ea1fc4b5df73ac019915e7785c7df50c3","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ef8f0a1d888e0280452792f6d4edad237c934a51","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139166","url":"https://www.cve.org/CVERecord?id=CVE-2026-139166","licence":"CVE Terms of Use","modified":"2026-11-30T13:32:11.572Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139166","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139166","licence":"Public domain","modified":"2026-11-30T14:18:35.533Z"}],"updatedAt":"2026-11-30T14:32:38.653Z","epss":{"score":0.00201,"percentile":0.10484,"date":"2026-12-01T12:00:22.000Z"}}