{"id":"CVE-2026-99714","aliases":["CVE-2026-99714"],"related":[],"kind":"vulnerability","state":"published","title":"nvme: Do not drop the cdev reference twice when cdev_device_add() fails","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme: Do not drop the cdev reference twice when cdev_device_add() fails\n\nSince commit 9952f3882ecb (\"nvme: fix cdev lifetime\"),\nnvme_add_ns_cdev() and nvme_add_ns_head_cdev() take a reference to the\nnamespace (or namespace head) before calling nvme_cdev_add(), to be\ndropped by the char device's release, nvme_cdev_rel(), and drop it\nthemselves when nvme_cdev_add() fails. But when cdev_device_add()\nfails, nvme_cdev_add() has already put the device, and nvme_cdev_rel()\nhas already dropped that reference: the caller drops it a second time.\n\nWith one allocation failure injected into cdev_device_add() for a\nnamespace on an NVMe over loop controller, deleting the controller\ngives, with native multipath:\n\n  BUG: KASAN: slab-use-after-free in nvme_put_ns_head+0x21/0x140\n  Write of size 4 at addr ff1100000a4ea078 by task init/1\n   nvme_put_ns_head\n   nvme_put_ns\n   nvme_remove_namespaces\n   nvme_do_delete_ctrl\n   nvme_delete_ctrl_sync\n   nvme_sysfs_delete\n  Freed by task 1:\n   kfree\n   nvme_ns_remove\n   nvme_remove_namespaces\n  refcount_t: underflow; use-after-free.\n\nTake the reference in nvme_cdev_add() instead, right before\ncdev_device_add(), and let the callers neither take nor drop it. Add\nnvme_is_ns_cdev() for the check that nvme_cdev_rel() and nvme_cdev_add()\nnow share.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme: Do not drop the cdev reference twice when cdev_device_add() fails\n\nSince commit 9952f3882ecb (\"nvme: fix cdev lifetime\"),\nnvme_add_ns_cdev() and nvme_add_ns_head_cdev() take a reference to the\nnamespace (or namespace head) before calling nvme_cdev_add(), to be\ndropped by the char device's release, nvme_cdev_rel(), and drop it\nthemselves when nvme_cdev_add() fails. But when cdev_device_add()\nfails, nvme_cdev_add() has already put the device, and nvme_cdev_rel()\nhas already dropped that reference: the caller drops it a second time.\n\nWith one allocation failure injected into cdev_device_add() for a\nnamespace on an NVMe over loop controller, deleting the controller\ngives, with native multipath:\n\n  BUG: KASAN: slab-use-after-free in nvme_put_ns_head+0x21/0x140\n  Write of size 4 at addr ff1100000a4ea078 by task init/1\n   nvme_put_ns_head\n   nvme_put_ns\n   nvme_remove_namespaces\n   nvme_do_delete_ctrl\n   nvme_delete_ctrl_sync\n   nvme_sysfs_delete\n  Freed by task 1:\n   kfree\n   nvme_ns_remove\n   nvme_remove_namespaces\n  refcount_t: underflow; use-after-free.\n\nTake the reference in nvme_cdev_add() instead, right before\ncdev_device_add(), and let the callers neither take nor drop it. Add\nnvme_is_ns_cdev() for the check that nvme_cdev_rel() and nvme_cdev_add()\nnow share.","source":"cvelist"}],"published":"2026-11-20T05:50:53.082Z","modified":"2026-11-20T06:18:07.677Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"9952f3882ecba709092379b71e02b09762b26f96","fixed":"45d0c2d7d338ae1606984ed92d254ca0efcef921","status":"affected"},{"type":"git","introduced":"9952f3882ecba709092379b71e02b09762b26f96","fixed":"7dfe79db5615df8d37ae7de6d3ec099b71bf3e03","status":"affected"},{"type":"git","version":"98b09ad7934482e64db4b4477d91e3bbf43adf4c","status":"affected"},{"type":"semver","introduced":"7.2.10","fixed":"7.3","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.3","status":"unaffected"},{"type":"semver","introduced":"7.3.5","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc2","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/45d0c2d7d338ae1606984ed92d254ca0efcef921","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7dfe79db5615df8d37ae7de6d3ec099b71bf3e03","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99714","url":"https://www.cve.org/CVERecord?id=CVE-2026-99714","licence":"CVE Terms of Use","modified":"2026-11-20T05:50:53.082Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99714","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99714","licence":"Public domain","modified":"2026-11-20T06:18:07.677Z"}],"updatedAt":"2026-11-25T22:59:52.318Z","epss":{"score":0.00156,"percentile":0.02475,"date":"2026-11-30T12:00:22.000Z"}}