{"id":"CVE-2024-27392","state":"PUBLISHED","title":"nvme: host: fix double-free of struct nvme_id_ns in ns_update_nuse()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme: host: fix double-free of struct nvme_id_ns in ns_update_nuse()\n\nWhen nvme_identify_ns() fails, it frees the pointer to the struct\nnvme_id_ns before it returns. However, ns_update_nuse() calls kfree()\nfor the pointer even when nvme_identify_ns() fails. This results in\nKASAN double-free, which was observed with blktests nvme/045 with\nproposed patches [1] on the kernel v6.8-rc7. Fix the double-free by\nskipping kfree() when nvme_identify_ns() fails.","publishedAt":"2024-05-01T13:05:20.117Z","updatedAt":"2026-08-05T11:29:25.994Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a1a825ab6a60380240ca136596732fdb80bad87a","status":"affected","lessThan":"534f9dc7fe495b3f9cc84363898ac50c5a25fccb","versionType":"git"},{"version":"a1a825ab6a60380240ca136596732fdb80bad87a","status":"affected","lessThan":"8d0d2447394b13fb22a069f0330f9c49b7fff9d3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/host/sysfs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.8.2","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/host/sysfs.c"]}],"references":["https://git.kernel.org/stable/c/534f9dc7fe495b3f9cc84363898ac50c5a25fccb","https://git.kernel.org/stable/c/8d0d2447394b13fb22a069f0330f9c49b7fff9d3"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/27xxx/CVE-2024-27392.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-27392","state":"PUBLISHED","datePublished":"2024-05-01T13:05:20.117Z","dateUpdated":"2026-08-05T11:29:25.994Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-25T13:47:42.677Z"},"containers":{"cna":{"title":"nvme: host: fix double-free of struct nvme_id_ns in ns_update_nuse()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme: host: fix double-free of struct nvme_id_ns in ns_update_nuse()\n\nWhen nvme_identify_ns() fails, it frees the pointer to the struct\nnvme_id_ns before it returns. However, ns_update_nuse() calls kfree()\nfor the pointer even when nvme_identify_ns() fails. This results in\nKASAN double-free, which was observed with blktests nvme/045 with\nproposed patches [1] on the kernel v6.8-rc7. Fix the double-free by\nskipping kfree() when nvme_identify_ns() fails."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a1a825ab6a60380240ca136596732fdb80bad87a","status":"affected","lessThan":"534f9dc7fe495b3f9cc84363898ac50c5a25fccb","versionType":"git"},{"version":"a1a825ab6a60380240ca136596732fdb80bad87a","status":"affected","lessThan":"8d0d2447394b13fb22a069f0330f9c49b7fff9d3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/host/sysfs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.8","versionType":"semver"},{"version":"6.8.2","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/host/sysfs.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/534f9dc7fe495b3f9cc84363898ac50c5a25fccb"},{"url":"https://git.kernel.org/stable/c/8d0d2447394b13fb22a069f0330f9c49b7fff9d3"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is entered only by a local `read()` on the world-readable sysfs attribute `/sys/block/nvmeXnY/nuse`; a remote NVMe-oF target can supply the failing Identify status but cannot itself initiate the code path.\nAC:L - There is no race to win — the second `kfree()` executes unconditionally in the same call once `nvme_identify_ns()` returns an error, and in an NVMe-over-TCP/fabrics deployment the attacker controls the target's Identify response (or forces a reconnect) so the controller is non-LIVE and every read hits the error leg reliably.\nPR:L - `nuse` is a `DEVICE_ATTR_RO` (0444) attribute with no capability check on the read path, so any unprivileged local user or container process with `/sys` mounted can trigger it.\nUI:N - The attacker performs the sysfs read itself; no action by any other user or administrator is required.\nS:U - The corruption is confined to the kernel heap of the same system and does not cross a virtualization, IOMMU, or other security-authority boundary.\nC:H - A double free of a 4096-byte kmalloc-4k object lets two subsequent allocations alias the same memory, producing type confusion/use-after-free that can be leveraged to read arbitrary kernel memory.\nI:H - Freelist corruption from the double free gives the attacker overlapping ownership of a heap object, a well-known route to arbitrary kernel write and control-flow hijack/privilege escalation.\nA:H - The double free trips KASAN/`CONFIG_SLAB_FREELIST_HARDENED` BUG checks and otherwise corrupts the SLUB freelist, causing kernel oops or panic; it can be re-triggered by repeated reads."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:29:25.994Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.8.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/534f9dc7fe495b3f9cc84363898ac50c5a25fccb","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8d0d2447394b13fb22a069f0330f9c49b7fff9d3","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:34:52.266Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-27392","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:43:42.735445Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:32:54.631Z"}}]}}}