CVE-2026-100016: ALSA: compress: reject buffer geometry change on gapless next_track
In the Linux kernel, the following vulnerability has been resolved:
ALSA: compress: reject buffer geometry change on gapless nexttrack
sndcomprsetparams() is invoked from the gapless nexttrack re-entry path, which calls sndcomprallocatebuffer() again and lets buffersize change while totalbytesavailable and totalbytestransferred still hold values computed for the previous buffer. sndcomprcalcavail() then derives an avail/count value from those stale counters against the new buffersize, and sndcomprwritedata() copyfromuser()s that many bytes into the new, potentially smaller buffer, overflowing it with user-controlled length and content.
The buffer is set up once, with the initial SETPARAMS, and neither the core nor the DSP expects it to change for a gapless track transition. Do not call sndcomprallocatebuffer() on the nexttrack path and reject a request that changes the buffer geometry, so that the codec parameters that the driver receives match the buffer in use.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
On the gapless next_track path, do not call snd_compr_allocate_buffer(); reject requests that change the buffer geometry so the parameters match the buffer already in use.