{"id":"CVE-2026-139549","state":"PUBLISHED","title":"nvdimm/pmem: Release gendisk on probe failure","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvdimm/pmem: Release gendisk on probe failure\n\npmem_attach_disk() allocates the gendisk with blk_alloc_disk() and hands\nit to devres only once device_add_disk() has succeeded.  Until that\npoint the probe path owns the disk itself, which is why every failure\nafter the allocation jumps to the out: label and puts it there.\n\nThe devm_init_badblocks() failure returns directly instead, so the disk\nallocated a few lines earlier is never released.  Nothing releases it\nafterwards either: the devres action that would have done so has not\nbeen registered yet, so unbinding the namespace or destroying it does\nnot reach the disk, and it stays allocated along with its queue and its\nbdev inode until the machine is rebooted.\n\ndevm_init_badblocks() only fails when a single page allocation fails, so\nreaching this at all needs memory exhaustion during namespace probe, and\nbecause device_add_disk() has not run there is nothing user visible left\nbehind: no device node, no sysfs entry, only the leaked memory.\n\nRelease the gendisk through the existing cleanup path on this failure.","publishedAt":"2026-11-30T13:35:47.359Z","updatedAt":"2026-11-30T13:35:47.359Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"9713540fd6aab75eca911ae33e59a67d9b9df245","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"acfdb9495320f17cf67a15c863ee152d53d02081","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"02f73f2baa2374326636feda7767b2c97a241864","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"5372a7979cc68eec28cb074ee386df681928c03a","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"e3581fa72dc6ca5340945228f60efed34afaa515","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"f666e1db6026e2f492ad5f4a45782443798fb920","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"855a46681e0ba601952c346e5b62d867e51ecb23","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvdimm/pmem.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvdimm/pmem.c"]}],"references":["https://git.kernel.org/stable/c/9713540fd6aab75eca911ae33e59a67d9b9df245","https://git.kernel.org/stable/c/acfdb9495320f17cf67a15c863ee152d53d02081","https://git.kernel.org/stable/c/02f73f2baa2374326636feda7767b2c97a241864","https://git.kernel.org/stable/c/5372a7979cc68eec28cb074ee386df681928c03a","https://git.kernel.org/stable/c/e3581fa72dc6ca5340945228f60efed34afaa515","https://git.kernel.org/stable/c/f666e1db6026e2f492ad5f4a45782443798fb920","https://git.kernel.org/stable/c/855a46681e0ba601952c346e5b62d867e51ecb23"],"weaknesses":[],"ingestedAt":"2026-11-30T13:52:04.503Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139549.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139549","state":"PUBLISHED","datePublished":"2026-11-30T13:35:47.359Z","dateUpdated":"2026-11-30T13:35:47.359Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.940Z"},"containers":{"cna":{"title":"nvdimm/pmem: Release gendisk on probe failure","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvdimm/pmem: Release gendisk on probe failure\n\npmem_attach_disk() allocates the gendisk with blk_alloc_disk() and hands\nit to devres only once device_add_disk() has succeeded.  Until that\npoint the probe path owns the disk itself, which is why every failure\nafter the allocation jumps to the out: label and puts it there.\n\nThe devm_init_badblocks() failure returns directly instead, so the disk\nallocated a few lines earlier is never released.  Nothing releases it\nafterwards either: the devres action that would have done so has not\nbeen registered yet, so unbinding the namespace or destroying it does\nnot reach the disk, and it stays allocated along with its queue and its\nbdev inode until the machine is rebooted.\n\ndevm_init_badblocks() only fails when a single page allocation fails, so\nreaching this at all needs memory exhaustion during namespace probe, and\nbecause device_add_disk() has not run there is nothing user visible left\nbehind: no device node, no sysfs entry, only the leaked memory.\n\nRelease the gendisk through the existing cleanup path on this failure."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"9713540fd6aab75eca911ae33e59a67d9b9df245","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"acfdb9495320f17cf67a15c863ee152d53d02081","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"02f73f2baa2374326636feda7767b2c97a241864","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"5372a7979cc68eec28cb074ee386df681928c03a","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"e3581fa72dc6ca5340945228f60efed34afaa515","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"f666e1db6026e2f492ad5f4a45782443798fb920","versionType":"git"},{"version":"3dd60fb9d95db9c78fec86ba4df20852a7b974ba","status":"affected","lessThan":"855a46681e0ba601952c346e5b62d867e51ecb23","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvdimm/pmem.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvdimm/pmem.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/9713540fd6aab75eca911ae33e59a67d9b9df245"},{"url":"https://git.kernel.org/stable/c/acfdb9495320f17cf67a15c863ee152d53d02081"},{"url":"https://git.kernel.org/stable/c/02f73f2baa2374326636feda7767b2c97a241864"},{"url":"https://git.kernel.org/stable/c/5372a7979cc68eec28cb074ee386df681928c03a"},{"url":"https://git.kernel.org/stable/c/e3581fa72dc6ca5340945228f60efed34afaa515"},{"url":"https://git.kernel.org/stable/c/f666e1db6026e2f492ad5f4a45782443798fb920"},{"url":"https://git.kernel.org/stable/c/855a46681e0ba601952c346e5b62d867e51ecb23"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:35:47.359Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}