Look up another CVE · open CVE-2025-21870 in the interactive tracker
CVE-2025-21870
ASoC: SOF: ipc4-topology: Harden loops for looking up ALH copiers
Published 2025-03-27 (19 months ago) by the Linux kernel CNA. Subsystem sound/soc. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-21870 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.12.17-1 | Update the kernel and reboot. Fixed in 6.12.17-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.12.17-1 | Update the kernel and reboot. Fixed in 6.12.17-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.12.17-1 | Update the kernel and reboot. Fixed in 6.12.17-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
Other, non DAI copier widgets could have the same stream name (sname) as the ALH copier and in that case the copier->data is NULL, no alh_data is attached, which could lead to NULL pointer dereference. We could check for this NULL pointer in sof_ipc4_prepare_copier_module() and avoid the crash, but a similar loop in sof_ipc4_widget_setup_comp_dai() will miscalculate the ALH device count, causing broken audio. The correct fix is to harden the matching logic by making sure that the 1. widget is a DAI widget - so dai = w->private is valid 2. the dai (and thus the copier) is ALH copier
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.
sound/soc/sof/ipc4-topology.c
- What this is
- SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERSMAINTAINERS section matched on sound/soc/sof/ · sound-open-firmware@alsa-project.org · Supported
- Kernel module
- snd_sof
Check it on the machine
grep -wE 'CONFIG_SND|CONFIG_SND_SOC|CONFIG_SND_SOC_SOF' /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.
lsmod | grep -w snd_sofPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookwormMnot built on amd64/cloud-amd64, arm64/arm64, arm64/cloud-arm64, arm64/rt/arm64, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, ppc64el/powerpc64le
- trixieMnot built on amd64/cloud-amd64, arm64/cloud-arm64, armel/rpi, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
- forky, sidMnot built on amd64/cloud-amd64, arm64/cloud-arm64, armhf/armmp, armhf/armmp-lpae, loong64/loong64, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
- M
- a module where it is built at all; some flavours do not build it
- Build switches
- CONFIG_SND, CONFIG_SND_SOC, CONFIG_SND_SOC_SOF
- Reads as
- all on means the file is compiled; any one off means it is not.
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
- 2025-03-27 (19 months ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.20%, higher than 9.2% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- sound/soc
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 6.0 | 6.12.17 | 87c8768a9609 |
| 6.0 | 6.13.5 | 93c6c2e5801a |
| 6.0 | 6.14 | 6fd60136d256 |
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 vulnerable code is reached only through the local ALSA PCM character device (`/dev/snd/pcmC*D*`) via `SNDRV_PCM_IOCTL_HW_PARAMS`, which flows into `sof_pcm_hw_params()` → `sof_prepare_widgets_in_path()` → `sof_ipc4_prepare_copier_module()`. There is no network or remote-peer input on this path.
- AC:LAttack complexity, low
- On an affected system (Intel SoundWire/ALH platform whose topology has a non-DAI widget sharing an `sname` with an ALH copier), the attacker simply opens the PCM device and issues hw_params — the faulty widget-matching loop runs deterministically every time, with no race to win and no memory layout to guess.
- PR:LPrivileges required, low
- Only access to the sound PCM device node is required, which any logged-in desktop user gets via logind ACLs and any `audio`-group member gets on servers/embedded systems; no capability check exists anywhere along the hw_params → widget-prepare path.
- UI:NUser interaction, none
- The attacker performs the entire sequence themselves by opening the PCM device and calling hw_params; no victim action, mount, or file-open by another user is needed.
- S:UScope, unchanged
- The type confusion and heap corruption occur in kernel memory within the same security authority as the attacking local user; no VM, IOMMU, or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- The type confusion causes `dai->private` to be read from a mismatched struct and dereferenced as `struct sof_ipc4_copier *`, disclosing arbitrary kernel heap contents, and the inflated `config_length` makes the `memcpy()` at ipc4-topology.c:2211 read past the 136-byte blob allocation into the IPC payload.
- I:HIntegrity impact, high
- This is a type confusion (`w->private` treated as `struct snd_sof_dai` when it is not), and the unbounded `blob->alh_cfg.mapping[i++]` loop can write past the fixed 16-entry array in a kmalloc-192 object, giving a heap out-of-bounds write that is leverageable for control-flow corruption.
- A:HAvailability impact, high
- The commit explicitly documents a NULL/wild pointer dereference causing a kernel oops, and the miscounted `device_count` additionally corrupts the ALH blob and yields `GENMASK(-1, 0)` via a zero `step` — any of which panics the kernel and can be re-triggered at will.