{"id":"CVE-2026-143121","state":"PUBLISHED","title":"power: sequencing: pcie-m2: fix use-after-free in pwrseq_pcie_m2_vregs_enable()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\npower: sequencing: pcie-m2: fix use-after-free in pwrseq_pcie_m2_vregs_enable()\n\nDuring device teardown or on the probe error path, a concurrent consumer\naccess triggers a use-after-free in pwrseq_pcie_m2_vregs_enable() or\npwrseq_pcie_m2_vregs_disable() due to a lifetime inversion between\ndevm-managed device registration and manual resource cleanup.\n\nThe driver exposes the power sequencer using devm_pwrseq_device_register(),\nmeaning the device remains fully registered and accessible on the\npwrseq_bus until the driver core schedules devm_pwrseq_device_unregister()\nto run after pwrseq_pcie_m2_remove() returns. However, the driver performs\nmanual resource teardown within pwrseq_pcie_m2_remove() and the\npwrseq_pcie_m2_probe() error path, prematurely destroying the backing\nregulator array.\n\nThis creates a narrow vulnerability window where the globally visible power\nsequencer is backed by freed memory. If a concurrent consumer invokes\npwrseq_enable() during this window, execution is routed to the sequencer\ncallback and dereferences the destroyed ctx->regs array, resulting in a\ndirect use-after-free and a kernel crash.\n\nSchedule a devres action for freeing the memory used for the regulator\narray to ensure it runs *after* the pwrseq provider was unregistered.","publishedAt":"2026-12-03T09:19:32.726Z","updatedAt":"2026-12-03T09:19:32.726Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3f736aecbdc8e4faf2ed82c981812a6bfc76ea98","status":"affected","lessThan":"965765f5a9af841904e89f62e706ef5fc1eaa146","versionType":"git"},{"version":"3f736aecbdc8e4faf2ed82c981812a6bfc76ea98","status":"affected","lessThan":"cd5f26ed96604b18e4235052525abe6b4ba505d6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/power/sequencing/pwrseq-pcie-m2.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/power/sequencing/pwrseq-pcie-m2.c"]}],"references":["https://git.kernel.org/stable/c/965765f5a9af841904e89f62e706ef5fc1eaa146","https://git.kernel.org/stable/c/cd5f26ed96604b18e4235052525abe6b4ba505d6"],"weaknesses":[],"ingestedAt":"2026-12-03T09:40:06.136Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143121.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143121","state":"PUBLISHED","datePublished":"2026-12-03T09:19:32.726Z","dateUpdated":"2026-12-03T09:19:32.726Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.351Z"},"containers":{"cna":{"title":"power: sequencing: pcie-m2: fix use-after-free in pwrseq_pcie_m2_vregs_enable()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\npower: sequencing: pcie-m2: fix use-after-free in pwrseq_pcie_m2_vregs_enable()\n\nDuring device teardown or on the probe error path, a concurrent consumer\naccess triggers a use-after-free in pwrseq_pcie_m2_vregs_enable() or\npwrseq_pcie_m2_vregs_disable() due to a lifetime inversion between\ndevm-managed device registration and manual resource cleanup.\n\nThe driver exposes the power sequencer using devm_pwrseq_device_register(),\nmeaning the device remains fully registered and accessible on the\npwrseq_bus until the driver core schedules devm_pwrseq_device_unregister()\nto run after pwrseq_pcie_m2_remove() returns. However, the driver performs\nmanual resource teardown within pwrseq_pcie_m2_remove() and the\npwrseq_pcie_m2_probe() error path, prematurely destroying the backing\nregulator array.\n\nThis creates a narrow vulnerability window where the globally visible power\nsequencer is backed by freed memory. If a concurrent consumer invokes\npwrseq_enable() during this window, execution is routed to the sequencer\ncallback and dereferences the destroyed ctx->regs array, resulting in a\ndirect use-after-free and a kernel crash.\n\nSchedule a devres action for freeing the memory used for the regulator\narray to ensure it runs *after* the pwrseq provider was unregistered."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3f736aecbdc8e4faf2ed82c981812a6bfc76ea98","status":"affected","lessThan":"965765f5a9af841904e89f62e706ef5fc1eaa146","versionType":"git"},{"version":"3f736aecbdc8e4faf2ed82c981812a6bfc76ea98","status":"affected","lessThan":"cd5f26ed96604b18e4235052525abe6b4ba505d6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/power/sequencing/pwrseq-pcie-m2.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/power/sequencing/pwrseq-pcie-m2.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/965765f5a9af841904e89f62e706ef5fc1eaa146"},{"url":"https://git.kernel.org/stable/c/cd5f26ed96604b18e4235052525abe6b4ba505d6"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:19:32.726Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.4-rc3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}