{"api_version":"1","generated_at":"2026-11-30T15:21:44+00:00","cve":"CVE-2026-138815","urls":{"html":"https://cve.report/CVE-2026-138815","api":"https://cve.report/api/cve/CVE-2026-138815.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-138815","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-138815"},"summary":{"title":"nvmet: fix preempt of another registrant by the reservation holder","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: fix preempt of another registrant by the reservation holder\n\nUnless the reservation is of an All Registrants type, nvmet_pr_preempt()\ntreats every Reservation Acquire command with the Preempt or Preempt and\nAbort action that is sent by the reservation holder as the holder\npreempting itself.  It updates the reservation type to RTYPE and\ncompletes the command successfully without looking at PRKEY.\n\nNVMe Base Specification 2.1, section 8.1.22.7 makes the action depend\non PRKEY for these reservation types, no matter which registrant sends\nthe command:\n\n - PRKEY matches the key of the reservation holder: the reservation is\n   preempted.  This is how a holder preempts itself.\n - PRKEY does not match the key of the holder and is not 0h: the\n   registrants whose key matches PRKEY are unregistered.\n - PRKEY does not match the key of the holder and is 0h: the command is\n   aborted with Invalid Field in Command.\n\nWith the current code, a holder that preempts with the key of another\nregistrant leaves that registrant registered, changes the reservation\ntype to RTYPE and still gets a successful completion.  With hosts A, B\nand C registered with the keys 0xa, 0xb and 0xc, and A holding an\nExclusive Access - Registrants Only reservation, A sends:\n\n  # nvme resv-acquire /dev/nvme1 -n 1 --crkey=0xa --prkey=0xb \\\n        --rtype=4 --racqa=1\n  NVME Reservation Acquire success\n  # nvme resv-report /dev/nvme1 -n 1 --eds | grep '^regctl '\n  regctl    : 3\n\nand B can still write to the namespace.  Preempt and Abort (--racqa=2)\ngives the same result.  When C sends the preempt instead (--crkey=0xc),\nB is unregistered and its writes fail with Reservation Conflict.\n\nThis defeats fencing in the pNFS SCSI layout server.  nfsd holds the\nreservation and fences a client that does not return its layout by\ncalling pr_preempt() with the key of that client and the abort flag,\nwhich is the command RFC 9561 section 2.2.3 asks for.  On an nvmet\nnamespace the preempt succeeds, nfsd logs the client as fenced, and the\nclient keeps writing to the device.  In a test with an nfsd server and\ntwo clients on an nvmet-tcp namespace, the namespace still had three\nregistrants after the fence and the fenced client went on writing to\nit.  With this patch two registrants are left and the writes of the\nfenced client fail with a reservation conflict.\n\nTake the self preempt path only when PRKEY is the key of the holder.\nAny other PRKEY sent by the holder is then handled by the code that\nalready serves a non-holder registrant, for Preempt and for Preempt and\nAbort.  For a host that holds the reservation this changes the\nfollowing:\n\n - A preempt with the key of another registrant unregisters the\n   registrants with that key, sends them the registration preempted\n   notification and leaves the reservation type alone.\n - A preempt with PRKEY 0h fails with Invalid Field in Command.  A\n   holder that changed its reservation type this way has to pass its\n   own key in PRKEY, which works with and without this patch.\n - A preempt with a PRKEY that matches no registrant fails with\n   Reservation Conflict.  The specification defines that status only\n   for the All Registrants types.  It is what nvmet already returns to\n   a non-holder registrant in this case and what the SCSI target\n   returns for an unregistered key.  nfsd treats it as a successful\n   fence.\n\nNot changed: when the holder preempts itself, registrants that share\nits key stay registered.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:17:35","updated_at":"2026-11-30 14:17:35"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/d9e84d4e19994818b80846bd2abb7b396e4116a9","name":"https://git.kernel.org/stable/c/d9e84d4e19994818b80846bd2abb7b396e4116a9","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/53e5b0b2a2be40d09ed2a3e413e3ab9ed60b7cf2","name":"https://git.kernel.org/stable/c/53e5b0b2a2be40d09ed2a3e413e3ab9ed60b7cf2","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/7a4ee76f0e8f47f5eee3f63d8a3ed20f5c672e6a","name":"https://git.kernel.org/stable/c/7a4ee76f0e8f47f5eee3f63d8a3ed20f5c672e6a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-138815","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138815","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5a47c2080a7316f184107464e4f76737c0c05186 7a4ee76f0e8f47f5eee3f63d8a3ed20f5c672e6a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5a47c2080a7316f184107464e4f76737c0c05186 53e5b0b2a2be40d09ed2a3e413e3ab9ed60b7cf2 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5a47c2080a7316f184107464e4f76737c0c05186 d9e84d4e19994818b80846bd2abb7b396e4116a9 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.13","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.13 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.63 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.4 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/nvme/target/pr.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"7a4ee76f0e8f47f5eee3f63d8a3ed20f5c672e6a","status":"affected","version":"5a47c2080a7316f184107464e4f76737c0c05186","versionType":"git"},{"lessThan":"53e5b0b2a2be40d09ed2a3e413e3ab9ed60b7cf2","status":"affected","version":"5a47c2080a7316f184107464e4f76737c0c05186","versionType":"git"},{"lessThan":"d9e84d4e19994818b80846bd2abb7b396e4116a9","status":"affected","version":"5a47c2080a7316f184107464e4f76737c0c05186","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/nvme/target/pr.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.13"},{"lessThan":"6.13","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.63","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.4","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.63","versionStartIncluding":"6.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.4","versionStartIncluding":"6.13","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.13","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: fix preempt of another registrant by the reservation holder\n\nUnless the reservation is of an All Registrants type, nvmet_pr_preempt()\ntreats every Reservation Acquire command with the Preempt or Preempt and\nAbort action that is sent by the reservation holder as the holder\npreempting itself.  It updates the reservation type to RTYPE and\ncompletes the command successfully without looking at PRKEY.\n\nNVMe Base Specification 2.1, section 8.1.22.7 makes the action depend\non PRKEY for these reservation types, no matter which registrant sends\nthe command:\n\n - PRKEY matches the key of the reservation holder: the reservation is\n   preempted.  This is how a holder preempts itself.\n - PRKEY does not match the key of the holder and is not 0h: the\n   registrants whose key matches PRKEY are unregistered.\n - PRKEY does not match the key of the holder and is 0h: the command is\n   aborted with Invalid Field in Command.\n\nWith the current code, a holder that preempts with the key of another\nregistrant leaves that registrant registered, changes the reservation\ntype to RTYPE and still gets a successful completion.  With hosts A, B\nand C registered with the keys 0xa, 0xb and 0xc, and A holding an\nExclusive Access - Registrants Only reservation, A sends:\n\n  # nvme resv-acquire /dev/nvme1 -n 1 --crkey=0xa --prkey=0xb \\\n        --rtype=4 --racqa=1\n  NVME Reservation Acquire success\n  # nvme resv-report /dev/nvme1 -n 1 --eds | grep '^regctl '\n  regctl    : 3\n\nand B can still write to the namespace.  Preempt and Abort (--racqa=2)\ngives the same result.  When C sends the preempt instead (--crkey=0xc),\nB is unregistered and its writes fail with Reservation Conflict.\n\nThis defeats fencing in the pNFS SCSI layout server.  nfsd holds the\nreservation and fences a client that does not return its layout by\ncalling pr_preempt() with the key of that client and the abort flag,\nwhich is the command RFC 9561 section 2.2.3 asks for.  On an nvmet\nnamespace the preempt succeeds, nfsd logs the client as fenced, and the\nclient keeps writing to the device.  In a test with an nfsd server and\ntwo clients on an nvmet-tcp namespace, the namespace still had three\nregistrants after the fence and the fenced client went on writing to\nit.  With this patch two registrants are left and the writes of the\nfenced client fail with a reservation conflict.\n\nTake the self preempt path only when PRKEY is the key of the holder.\nAny other PRKEY sent by the holder is then handled by the code that\nalready serves a non-holder registrant, for Preempt and for Preempt and\nAbort.  For a host that holds the reservation this changes the\nfollowing:\n\n - A preempt with the key of another registrant unregisters the\n   registrants with that key, sends them the registration preempted\n   notification and leaves the reservation type alone.\n - A preempt with PRKEY 0h fails with Invalid Field in Command.  A\n   holder that changed its reservation type this way has to pass its\n   own key in PRKEY, which works with and without this patch.\n - A preempt with a PRKEY that matches no registrant fails with\n   Reservation Conflict.  The specification defines that status only\n   for the All Registrants types.  It is what nvmet already returns to\n   a non-holder registrant in this case and what the SCSI target\n   returns for an unregistered key.  nfsd treats it as a successful\n   fence.\n\nNot changed: when the holder preempts itself, registrants that share\nits key stay registered."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:25:14.360Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/7a4ee76f0e8f47f5eee3f63d8a3ed20f5c672e6a"},{"url":"https://git.kernel.org/stable/c/53e5b0b2a2be40d09ed2a3e413e3ab9ed60b7cf2"},{"url":"https://git.kernel.org/stable/c/d9e84d4e19994818b80846bd2abb7b396e4116a9"}],"title":"nvmet: fix preempt of another registrant by the reservation holder","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-138815","datePublished":"2026-11-30T13:25:14.360Z","dateReserved":"2026-11-30T13:22:15.896Z","dateUpdated":"2026-11-30T13:25:14.360Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:17:35","lastModifiedDate":"2026-11-30 14:17:35","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"138815","Ordinal":"1","Title":"nvmet: fix preempt of another registrant by the reservation hold","CVE":"CVE-2026-138815","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"138815","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: fix preempt of another registrant by the reservation holder\n\nUnless the reservation is of an All Registrants type, nvmet_pr_preempt()\ntreats every Reservation Acquire command with the Preempt or Preempt and\nAbort action that is sent by the reservation holder as the holder\npreempting itself.  It updates the reservation type to RTYPE and\ncompletes the command successfully without looking at PRKEY.\n\nNVMe Base Specification 2.1, section 8.1.22.7 makes the action depend\non PRKEY for these reservation types, no matter which registrant sends\nthe command:\n\n - PRKEY matches the key of the reservation holder: the reservation is\n   preempted.  This is how a holder preempts itself.\n - PRKEY does not match the key of the holder and is not 0h: the\n   registrants whose key matches PRKEY are unregistered.\n - PRKEY does not match the key of the holder and is 0h: the command is\n   aborted with Invalid Field in Command.\n\nWith the current code, a holder that preempts with the key of another\nregistrant leaves that registrant registered, changes the reservation\ntype to RTYPE and still gets a successful completion.  With hosts A, B\nand C registered with the keys 0xa, 0xb and 0xc, and A holding an\nExclusive Access - Registrants Only reservation, A sends:\n\n  # nvme resv-acquire /dev/nvme1 -n 1 --crkey=0xa --prkey=0xb \\\n        --rtype=4 --racqa=1\n  NVME Reservation Acquire success\n  # nvme resv-report /dev/nvme1 -n 1 --eds | grep '^regctl '\n  regctl    : 3\n\nand B can still write to the namespace.  Preempt and Abort (--racqa=2)\ngives the same result.  When C sends the preempt instead (--crkey=0xc),\nB is unregistered and its writes fail with Reservation Conflict.\n\nThis defeats fencing in the pNFS SCSI layout server.  nfsd holds the\nreservation and fences a client that does not return its layout by\ncalling pr_preempt() with the key of that client and the abort flag,\nwhich is the command RFC 9561 section 2.2.3 asks for.  On an nvmet\nnamespace the preempt succeeds, nfsd logs the client as fenced, and the\nclient keeps writing to the device.  In a test with an nfsd server and\ntwo clients on an nvmet-tcp namespace, the namespace still had three\nregistrants after the fence and the fenced client went on writing to\nit.  With this patch two registrants are left and the writes of the\nfenced client fail with a reservation conflict.\n\nTake the self preempt path only when PRKEY is the key of the holder.\nAny other PRKEY sent by the holder is then handled by the code that\nalready serves a non-holder registrant, for Preempt and for Preempt and\nAbort.  For a host that holds the reservation this changes the\nfollowing:\n\n - A preempt with the key of another registrant unregisters the\n   registrants with that key, sends them the registration preempted\n   notification and leaves the reservation type alone.\n - A preempt with PRKEY 0h fails with Invalid Field in Command.  A\n   holder that changed its reservation type this way has to pass its\n   own key in PRKEY, which works with and without this patch.\n - A preempt with a PRKEY that matches no registrant fails with\n   Reservation Conflict.  The specification defines that status only\n   for the All Registrants types.  It is what nvmet already returns to\n   a non-holder registrant in this case and what the SCSI target\n   returns for an unregistered key.  nfsd treats it as a successful\n   fence.\n\nNot changed: when the holder preempts itself, registrants that share\nits key stay registered.","Type":"Description","Title":"nvmet: fix preempt of another registrant by the reservation hold"}]}}}