Look up another CVE · open CVE-2024-43913 in the interactive tracker
CVE-2024-43913
nvme: apple: fix device reference counting
Published 2024-08-26 (2 years ago) by the Linux kernel CNA. Subsystem drivers/nvme. Debian urgency: not yet assigned.
Debian does not build this code. The per-release build detail is under "Where it lives" below.
What to do, per Debian release
Debian's own status for CVE-2024-43913 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.10.6-1 | Update the kernel and reboot. Fixed in 6.10.6-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.10.6-1 | Update the kernel and reboot. Fixed in 6.10.6-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.10.6-1 | Update the kernel and reboot. Fixed in 6.10.6-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
Drivers must call nvme_uninit_ctrl after a successful nvme_init_ctrl. Split the allocation side out to make the error handling boundary easier to navigate. The apple driver had been doing this wrong, leaking the controller device memory on a tagset failure.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
drivers/nvme/host/apple.c
- What this is
- ARM/APPLE MACHINE SUPPORTMAINTAINERS section matched on drivers/nvme/host/apple.c · asahi@lists.linux.dev · Maintained
- Kernel module
- none to look for. The file would have gone into nvme_apple, and Debian does not compile it into that module, so finding nvme_apple in lsmod would say nothing about this CVE.
Check it on the machine
grep -w CONFIG_NVME_APPLE /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
Show whether Debian builds this, per release
Debian does not build this code. In 4 releases below, every kernel flavour Debian publishes has the switch off, so the vulnerable file is compiled into no kernel binary Debian ships.
- bookworm, trixie, forky, sidn
- n
- not enabled on any flavour - this release does not build the code
- Build switch
- CONFIG_NVME_APPLE
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2024-08-26 (2 years ago)source
- CVSS
- 7.0 high
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.22%, higher than 12.0% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- drivers/nvme
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 5.19 | 6.6.64 | f7d9a18572fc |
| 5.19 | 6.10.5 | d59c4d0eb6ad |
| 5.19 | 6.11 | b9ecbfa45516 |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- 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.
- AC:HAttack complexity, high
- 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.
- PR:LPrivileges required, low
- 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.
- UI:NUser interaction, none
- 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.
- S:UScope, unchanged
- The corruption is confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- 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.
- I:HIntegrity impact, high
- 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.
- A:HAvailability impact, high
- 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.