{"id":"CVE-2024-43913","state":"PUBLISHED","title":"nvme: apple: fix device reference counting","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme: apple: fix device reference counting\n\nDrivers must call nvme_uninit_ctrl after a successful nvme_init_ctrl.\nSplit the allocation side out to make the error handling boundary easier\nto navigate. The apple driver had been doing this wrong, leaking the\ncontroller device memory on a tagset failure.","publishedAt":"2024-08-26T10:11:18.273Z","updatedAt":"2026-10-30T12:19:07.649Z","severity":{"score":7,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/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":"5bd2927aceba181b84286e00aa2f56e117e699c3","status":"affected","lessThan":"0c9e4e99dcc0d30160d65044f54a92ff6372c90d","versionType":"git"},{"version":"5bd2927aceba181b84286e00aa2f56e117e699c3","status":"affected","lessThan":"f7d9a18572fcd7130459b7691bd19ee2a2e951ad","versionType":"git"},{"version":"5bd2927aceba181b84286e00aa2f56e117e699c3","status":"affected","lessThan":"d59c4d0eb6adc24c2201f153ccb7fd0a335b0d3d","versionType":"git"},{"version":"5bd2927aceba181b84286e00aa2f56e117e699c3","status":"affected","lessThan":"b9ecbfa45516182cd062fecd286db7907ba84210","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/host/apple.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.64","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.5","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","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/apple.c"]}],"references":["https://git.kernel.org/stable/c/0c9e4e99dcc0d30160d65044f54a92ff6372c90d","https://git.kernel.org/stable/c/f7d9a18572fcd7130459b7691bd19ee2a2e951ad","https://git.kernel.org/stable/c/d59c4d0eb6adc24c2201f153ccb7fd0a335b0d3d","https://git.kernel.org/stable/c/b9ecbfa45516182cd062fecd286db7907ba84210"],"weaknesses":[],"ingestedAt":"2026-10-30T12:36:04.432Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/43xxx/CVE-2024-43913.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-43913","state":"PUBLISHED","datePublished":"2024-08-26T10:11:18.273Z","dateUpdated":"2026-10-30T12:19:07.649Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-08-17T09:11:59.295Z"},"containers":{"cna":{"title":"nvme: apple: fix device reference counting","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme: apple: fix device reference counting\n\nDrivers must call nvme_uninit_ctrl after a successful nvme_init_ctrl.\nSplit the allocation side out to make the error handling boundary easier\nto navigate. The apple driver had been doing this wrong, leaking the\ncontroller device memory on a tagset failure."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5bd2927aceba181b84286e00aa2f56e117e699c3","status":"affected","lessThan":"0c9e4e99dcc0d30160d65044f54a92ff6372c90d","versionType":"git"},{"version":"5bd2927aceba181b84286e00aa2f56e117e699c3","status":"affected","lessThan":"f7d9a18572fcd7130459b7691bd19ee2a2e951ad","versionType":"git"},{"version":"5bd2927aceba181b84286e00aa2f56e117e699c3","status":"affected","lessThan":"d59c4d0eb6adc24c2201f153ccb7fd0a335b0d3d","versionType":"git"},{"version":"5bd2927aceba181b84286e00aa2f56e117e699c3","status":"affected","lessThan":"b9ecbfa45516182cd062fecd286db7907ba84210","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nvme/host/apple.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.64","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.10.5","status":"unaffected","lessThanOrEqual":"6.10.*","versionType":"semver"},{"version":"6.11","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/apple.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/0c9e4e99dcc0d30160d65044f54a92ff6372c90d"},{"url":"https://git.kernel.org/stable/c/f7d9a18572fcd7130459b7691bd19ee2a2e951ad"},{"url":"https://git.kernel.org/stable/c/d59c4d0eb6adc24c2201f153ccb7fd0a335b0d3d"},{"url":"https://git.kernel.org/stable/c/b9ecbfa45516182cd062fecd286db7907ba84210"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The affected code is the Apple ANS2 SoC-internal NVMe platform driver; the vulnerable state is created during local device probe and reached afterwards through ordinary local syscalls (reading `/sys/class/nvme/nvmeN/*`, opening `/dev/nvmeN`). No network, adjacent-network, or physical-access path exists — the controller is on-die, so physical presence buys nothing.\nAC:H - The only branch reaching the buggy `put_dev` label after `nvme_init_ctrl()` succeeds is a `blk_mq_alloc_queue()` failure, i.e. a `GFP_KERNEL` allocation failure inside device probe — small GFP_KERNEL allocations do not fail on demand (they retry and invoke the OOM killer), and probe normally runs only at boot. The attacker cannot influence whether this precondition occurs.\nPR:L - Once the probe has failed and left the controller device registered over freed devm memory, the dangling object is reached with no privileges beyond an unprivileged local account: `/sys/class/nvme/nvmeN/` is world-traversable and `model`, `serial`, `firmware_rev`, `state`, `transport`, `subsysnqn`, `address`, `cntlid`, `queue_count` are all `S_IRUGO` with no capability check in their show handlers.\nUI:N - No victim action is required — the failing probe occurs on its own during boot under memory pressure, and the attacker simply reads the leaked sysfs attributes or opens the leaked device node.\nS:U - The corruption is confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - This is a use-after-free read of the `nvme_ctrl` embedded in the devres-freed `anv` block — `model_show`/`serial_show`/`firmware_rev_show` follow `ctrl->subsys` out of freed memory and `sysfs_emit()` the bytes straight to userspace, disclosing whatever kernel data has reclaimed that slab object.\nI:H - The still-registered device leaves function pointers (`ctrl->ops->get_address`, `ctrl->device->release`, the cdev's `f_op`) inside a freed slab block the attacker can reclaim and groom by spraying same-size allocations, and `nvme_sysfs_show_address()` performs an indirect call through one of them — a control-flow hijack primitive, with `reset_controller`/`delete_controller`/`passthru_err_log_enabled` stores writing into the freed object as well.\nA:H - Dereferencing the freed controller (`ctrl->subsys->model`, `ctrl->ops->get_address()`) oopses the kernel, and because the stale `/dev/nvmeN` and sysfs nodes persist for the lifetime of the boot the crash can be re-triggered at will by any local user; the unreleased ida instance, discard page, and srcu struct also leak on every occurrence."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:19:07.649Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.6.64"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.10.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.11"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-43913","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:28:07.669349Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-12T17:32:56.340Z"}}]}}}