KernelScan.io

HIGH Introduced in 5.2

sprd ComprBuf Overflow

CVE-2026-97910

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.7HIGH

01

In the Linux kernel, the following vulnerability has been resolved: ASoC: sprd: validate compress buffer sizes against fixed allocations sprd_platform_compr_open() allocates the stage 0 IRAM buffer (32K data area) and the stage 1 DDR buffer (2M data area) with fixed sizes, but sprd_platform_compr_copy() derives all copy lengths from the user controlled runtime->fragment_size and the write() count, never comparing them against the physical buffer sizes. The compress core only checks fragment_size * fragments for an u32 overflow in snd_compress_check_input(), so a local user can configure a logical buffer of up to ~4GB via SNDRV_COMPRESS_SET_PARAMS, far exceeding the fixed allocations. A fragment_size larger than the 32K IRAM data area makes the stage 0 copy_from_user() overflow past the IRAM allocation, and a buffer_size larger than the 2M DDR buffer makes the wrapping copy at the end of sprd_platform_compr_copy() write fully user controlled data past the buffer. No SNDRV_PCM_TRIGGER_START is needed, a write() in SETUP state reaches the copy callback directly. Reject parameters that do not fit into the fixed buffers in set_params(), and fix the advertised max fragment size: 128K never fitted into the 32K IRAM buffer. The caps values may have been carried over from the qdsp6 driver, which allocates its buffers according to the advertised maxima, unlike this driver. With 32K as max fragment size the advertised limits are self-consistent: 32K * 64 = 2M equals the DDR buffer size. Discovered by Atuin - Automated Vulnerability Discovery Engine.

02

Engine v0.6.0

Risk summary

A local user with access to the Spreadtrum audio compress device can configure buffer parameters that exceed the driver's fixed-size internal allocations, then trigger a write() that copies attacker-controlled data past the end of kernel heap buffers. This leads to kernel memory corruption exploitable for privilege escalation or denial of service on systems using Spreadtrum/UNISOC SoCs.

Affectedsound/soc/sprd/sprd-pcm-compress.c (ASoC Spreadtrum audio compress offload)

Vulnerability analysis

The Spreadtrum audio compress offload driver allocates fixed-size internal buffers (32 KB IRAM and 2 MB DDR) when the compress device is opened, but when a user sets compression parameters via the standard ALSA compress ioctl, the driver never validates that the requested fragment size and total buffer size fit within those fixed allocations. The compress core framework only checks for a u32 overflow in the product of fragment size and count, not against the driver's actual buffer sizes. A local user can therefore set a fragment size larger than the 32 KB internal buffer or a total buffer larger than 2 MB, and a subsequent write() — even before playback is started — causes the kernel to copy user-controlled data past the end of the allocated memory. The fix adds bounds checks in the parameter-setting path that reject configurations exceeding the fixed buffer sizes, and corrects the advertised maximum fragment size from 128 KB to 32 KB so the driver's reported capabilities match its actual hardware constraints. The vulnerable path is reachable by any local user who can open the Spreadtrum audio compress device node, which on systems with this hardware is typically accessible to non-root users through the audio group.

03

BranchIntroducedFixed inPatch commit
5.105.25.10.2712fada8276117
5.155.25.15.222ad796a1bc187
6.15.26.1.1892e27144ba4b9
6.125.26.12.11138a9bb5221bc
6.185.26.18.53ff63b0adc4f6
6.65.26.6.1581467e3989c6e
7.25.27.2.78064b73997f1
mainline5.27.37a4ce92d150b
cip/5.105.25.10.271-cip782fada8276117
cip/6.15.26.1.189-cip612e27144ba4b9
cip/6.1-rt5.26.1.189-cip61-rt322e27144ba4b9
cip/6.125.26.12.111-cip3238a9bb5221bc

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.111-cip32
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.268-cip77-rt34)