Look up another CVE · open CVE-2024-26799 in the interactive tracker
CVE-2024-26799
ASoC: qcom: Fix uninitialized pointer dmactl
Published 2024-04-04 (3 years 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-2024-26799 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.7.9-1 | Update the kernel and reboot. Fixed in 6.7.9-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.7.9-1 | Update the kernel and reboot. Fixed in 6.7.9-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.7.9-1 | Update the kernel and reboot. Fixed in 6.7.9-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
In the case where __lpass_get_dmactl_handle is called and the driver id dai_id is invalid the pointer dmactl is not being assigned a value, and dmactl contains a garbage value since it has not been initialized and so the null check may not work. Fix this to initialize dmactl to NULL. One could argue that modern compilers will set this to zero, but it is useful to keep this initialized as per the same way in functions __lpass_platform_codec_intf_init and lpass_cdc_dma_daiops_hw_params. Cleans up clang scan build warning: sound/soc/qcom/lpass-cdc-dma.c:275:7: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
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/qcom/lpass-cdc-dma.c
- What this is
- QCOM AUDIO (ASoC) DRIVERSMAINTAINERS section matched on sound/soc/qcom/ · linux-sound@vger.kernel.org · Supported
- Kernel module
- snd_soc_lpass_cdc_dma
Check it on the machine
grep -wE 'CONFIG_SND|CONFIG_SND_SOC|CONFIG_SND_SOC_LPASS_CDC_DMA' /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_soc_lpass_cdc_dmaPrints 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 does not build this code in 1 release. It does build it in 3 releases, so the answer depends on which release the machine runs.
- bookwormn
- trixieMnot built on amd64/amd64, amd64/cloud-amd64, amd64/rt/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/amd64, amd64/cloud-amd64, amd64/rt-amd64, arm64/cloud-arm64, armhf/armmp, armhf/armmp-lpae, loong64/loong64, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
- n
- not enabled on any flavour - this release does not build the code
- 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_LPASS_CDC_DMA
- 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
- 2024-04-04 (3 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.24%, higher than 14.1% 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 |
|---|---|---|
| 5.18 | 6.6.21 | 99adc8b4d2f3 |
| 5.18 | 6.7.9 | d5a7726e6ea6 |
| 5.18 | 6.8 | 1382d8b55129 |
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 only way to invoke `lpass_cdc_dma_daiops_trigger()` is an `SNDRV_PCM_IOCTL_DROP`/`PAUSE` ioctl on a local `/dev/snd/pcmC*D*` node, routed through `soc_pcm_trigger()` → `snd_soc_pcm_dai_trigger()`. No packet, adjacent-network, or physical path reaches this DAI operation.
- AC:HAttack complexity, high
- The uninitialized `dmactl` is only consumed when `__lpass_get_dmactl_handle()` falls to its `default:` arm, which requires `cpu_dai->driver->id` to lie outside `LPASS_CDC_DMA_RX0…VA_TX8`; that id is a compile-time constant in the DAI table and the sole in-tree consumer (`lpass-sc7280.c`: ids 6, 19, 25) is fully covered. The attacker cannot influence which DAI table the kernel was built with, which is CVSS's "conditions beyond the attacker's control."
- PR:LPrivileges required, low
- Reaching the trigger op needs only an open PCM substream on a `root:audio` 0660 device node — no `capable()`, `CAP_SYS_ADMIN`, or any other check exists along `snd_pcm_ioctl` → `soc_pcm_trigger` → the DAI callback. A local unprivileged account with routine audio access (default for desktop and Chromebook sessions on this SoC) suffices.
- UI:NUser interaction, none
- The attacker opens the PCM device and issues the DROP/PAUSE ioctls entirely from their own process. No victim needs to play audio, mount anything, or take any action.
- S:UScope, unchanged
- The garbage pointer is dereferenced by kernel code operating on the kernel's own LPASS regmap, and all consequences stay within the kernel's security authority. No hypervisor, IOMMU, or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- When the branch is taken, `dmactl` holds residual kernel-stack data that an attacker can prime via a preceding syscall at the same stack depth, and `dmactl->codec_enable` is then loaded as a `struct reg_field *` — an attacker-influenced read of arbitrary kernel memory feeding subsequent regmap state. Per the round-up rule this uncontrolled-pointer read is scored High rather than as a bounded leak.
- I:HIntegrity impact, high
- `regmap_fields_write(dmactl->codec_enable, id, LPAIF_DMACTL_ENABLE_OFF)` performs a write through a field descriptor obtained from the wild pointer, with `id` also left uninitialized as the field index, yielding writes to attacker-influenced register/memory locations. That is a memory-corruption primitive usable toward control-flow hijack, not a bounded modification.
- A:HAvailability impact, high
- Dereferencing an uninitialized stack pointer that survives the `if (!dmactl)` guard produces an immediate oops in `regmap_fields_write()`, and a bad regmap field index can additionally program the LPASS DMA control block into an invalid state. Any such kernel oops or wedged audio DMA engine is a full availability loss.