{"id":"CVE-2026-99517","summary":"nvmet: fix use-after-free of the old registrant in nvmet_pr_preempt()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: fix use-after-free of the old registrant in nvmet_pr_preempt()\n\nnvmet_pr_preempt() handles a preempt sent by the reservation holder by\nchanging the reservation type with nvmet_pr_update_reg_attr(), unless\nthe reservation is of an All Registrants type.  For the holder that\nhelper does not modify the registrant in place: it puts a copy on the\nregistrant list, points pr-\u003eholder to the copy and passes the old\nregistrant to kfree_rcu().\n\nIf the reservation type changed, nvmet_pr_preempt() then hands\n&reg-\u003ehostid of that old registrant to nvmet_pr_resv_released().  Unless\nthe reservation released notification is masked, that function takes\nsubsys-\u003elock and compares the host id against every controller of the\nsubsystem.  The caller only holds pr-\u003epr_sem and is not in an RCU\nread-side critical section, so nothing keeps the old registrant alive\nwhile it is read.\n\nThe result is a read of 16 freed bytes that decides which controllers\nget the notification.  Found by code inspection.  kfree_rcu() defers\nthe free, so it usually happens after the read; when the pending free\nis forced to run before the read, KASAN reports the host id as freed\nmemory.\n\nPass the host id of the controller that sent the command instead.  The\nregistrant was looked up by that host id, and the controller outlives\nthe request.","modified":"2026-11-19T17:01:26.786856363Z","published":"2026-11-19T14:44:21.976Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99517.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/506c066da8fb2cef32210ca84439c7bb9855504f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f316aa7f018840523939183425394931b373e4d7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fd7843365a9e73f6ee32c30487c21cb62b84c0a2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99517.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99517"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"5a47c2080a7316f184107464e4f76737c0c05186"},{"fixed":"506c066da8fb2cef32210ca84439c7bb9855504f"},{"fixed":"fd7843365a9e73f6ee32c30487c21cb62b84c0a2"},{"fixed":"f316aa7f018840523939183425394931b373e4d7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99517.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.61"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99517.json"}}],"schema_version":"1.9.2"}