CVE-2026-98116: ALSA: pcm: Serialize PCM mmap with buffer reallocation to fix page UAF

Published Sep 25, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ALSA: pcm: Serialize PCM mmap with buffer reallocation to fix page UAF

sndpcmhwparams() and sndpcmhwfree() guard buffer reallocation with an mmapcount check performed under the PCM stream lock, but the lock is released long before the buffer is actually freed: sndpcmsyncstop(), constraint refinement and dofreepages() all happen in between. sndpcmmmapdata(), on the other hand, takes no lock at all: it validates against the old buffer's state and dmabytes, remaps its pages into the VMA, and only then increments mmapcount.

A concurrent mmap() can therefore slip in between the check and the free. remappfnrange() installs writable PTEs for the old buffer's pages without taking page references, and the subsequent dofreepages() returns those pages to the page allocator while the VMA still maps them. This leaves a stale, writable mapping of freed pages: a page-level use-after-free that can be leveraged for local privilege escalation.

Make sndpcmmmapdata() participate in the buffer-access scheme introduced for hwparams/hwfree: acquire runtime->bufferaccessing before validating and remapping, and release it afterwards. Buffer reallocation already fails with -EBUSY while accessors are active, and the mmap side now fails with -EBUSY while a reallocation is in progress, so the validate/remap sequence and the check/free sequence can no longer interleave.

A reproducer that turns this race into a stale writable mapping of the freed DMA buffer pages is available on request.

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 25, 2026
CVE Published
via MITRE·10:36 AM
Data Sourced
via MITRE·10:36 AM
Description

Frequently Asked Questions

1

What level of access would an attacker need?

The issue is described as usable for local privilege escalation. Exploitation requires triggering a race involving PCM memory mapping while the PCM buffer is being reallocated or freed.

2

What is the security consequence of winning the race?

A successful race can leave a writable user mapping to pages that have been returned to the page allocator. This is a page-level use-after-free that can be leveraged to elevate privileges locally.

3

Which operations are involved in the vulnerable race?

The race occurs when snd_pcm_mmap_data() maps PCM buffer pages concurrently with snd_pcm_hw_params() or snd_pcm_hw_free() reallocating or freeing that buffer. The mapping could be installed after the reallocation/free path checks mmap_count but before the old pages are actually freed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203