{"id":"CVE-2026-143235","state":"PUBLISHED","title":"ublk: publish a new device by its id only once it is set up","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nublk: publish a new device by its id only once it is set up\n\nADD_DEV stores the device in ublk_index_idr when it allocates the id,\nand control commands find it there as soon as ublk_add_chdev() has\ninitialized its struct device, before the char device is added. If\ndev_set_name() or cdev_device_add() then fails, ublk_add_chdev() drops\nthe initial reference to free the device. A DEL_DEV that found the\ndevice meanwhile waits for ublk_ctl_mutex, then calls ublk_remove():\ncdev_device_del() of a device that was never added, and a second put of\nthe initial reference, which frees the device under the callers still\nholding references.\n\nReserve the id with a NULL entry, which idr_find() and the idr iterators\nskip, and store the device once ublk_add_chdev() succeeded.","publishedAt":"2026-12-03T09:20:49.893Z","updatedAt":"2026-12-03T09:20:49.893Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"71f28f3136aff5890cd56de78abc673f8393cad9","status":"affected","lessThan":"452b083495cea3546d8b1b5413ec56443ff08505","versionType":"git"},{"version":"71f28f3136aff5890cd56de78abc673f8393cad9","status":"affected","lessThan":"6b3a2e0f8843b233a98ebdd82099bb34d474cf5d","versionType":"git"},{"version":"71f28f3136aff5890cd56de78abc673f8393cad9","status":"affected","lessThan":"6c96e3284dfcfbc64fdd8ff37fe0c7bfb1060261","versionType":"git"},{"version":"71f28f3136aff5890cd56de78abc673f8393cad9","status":"affected","lessThan":"e5c463e5074a940c644d54d8fc29aba06709aab0","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ublk_drv.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.0","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","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/block/ublk_drv.c"]}],"references":["https://git.kernel.org/stable/c/452b083495cea3546d8b1b5413ec56443ff08505","https://git.kernel.org/stable/c/6b3a2e0f8843b233a98ebdd82099bb34d474cf5d","https://git.kernel.org/stable/c/6c96e3284dfcfbc64fdd8ff37fe0c7bfb1060261","https://git.kernel.org/stable/c/e5c463e5074a940c644d54d8fc29aba06709aab0"],"weaknesses":[],"ingestedAt":"2026-12-03T09:42:04.348Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143235.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143235","state":"PUBLISHED","datePublished":"2026-12-03T09:20:49.893Z","dateUpdated":"2026-12-03T09:20:49.893Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.361Z"},"containers":{"cna":{"title":"ublk: publish a new device by its id only once it is set up","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nublk: publish a new device by its id only once it is set up\n\nADD_DEV stores the device in ublk_index_idr when it allocates the id,\nand control commands find it there as soon as ublk_add_chdev() has\ninitialized its struct device, before the char device is added. If\ndev_set_name() or cdev_device_add() then fails, ublk_add_chdev() drops\nthe initial reference to free the device. A DEL_DEV that found the\ndevice meanwhile waits for ublk_ctl_mutex, then calls ublk_remove():\ncdev_device_del() of a device that was never added, and a second put of\nthe initial reference, which frees the device under the callers still\nholding references.\n\nReserve the id with a NULL entry, which idr_find() and the idr iterators\nskip, and store the device once ublk_add_chdev() succeeded."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"71f28f3136aff5890cd56de78abc673f8393cad9","status":"affected","lessThan":"452b083495cea3546d8b1b5413ec56443ff08505","versionType":"git"},{"version":"71f28f3136aff5890cd56de78abc673f8393cad9","status":"affected","lessThan":"6b3a2e0f8843b233a98ebdd82099bb34d474cf5d","versionType":"git"},{"version":"71f28f3136aff5890cd56de78abc673f8393cad9","status":"affected","lessThan":"6c96e3284dfcfbc64fdd8ff37fe0c7bfb1060261","versionType":"git"},{"version":"71f28f3136aff5890cd56de78abc673f8393cad9","status":"affected","lessThan":"e5c463e5074a940c644d54d8fc29aba06709aab0","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ublk_drv.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.0","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.0","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","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/block/ublk_drv.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/452b083495cea3546d8b1b5413ec56443ff08505"},{"url":"https://git.kernel.org/stable/c/6b3a2e0f8843b233a98ebdd82099bb34d474cf5d"},{"url":"https://git.kernel.org/stable/c/6c96e3284dfcfbc64fdd8ff37fe0c7bfb1060261"},{"url":"https://git.kernel.org/stable/c/e5c463e5074a940c644d54d8fc29aba06709aab0"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:20:49.893Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.0","versionEndExcluding":"7.4-rc3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}