CVE-2026-99347 in Linuxinfo

Summary

by MITRE • 11/19/2026

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

ALSA: x86: hdmi: fix chmap array missing terminator entry

had_build_channel_allocation_map() allocates a single struct snd_pcm_chmap_elem via kzalloc() and stores it as intelhaddata->chmap->chmap. struct snd_pcm_chmap.chmap is expected to be a zero-terminated array (see snd_pcm_std_chmaps[]), but
had_register_chmap_ctls() never overrides the TLV callback installed by snd_pcm_add_chmap_ctls(), so the generic pcm_chmap_ctl_tlv() from ALSA core is left in place.

pcm_chmap_ctl_tlv() is reachable by any local user via SNDRV_CTL_IOCTL_TLV_READ on the "Playback Channel Map" control and walks the array with "for (map = info->chmap; map->channels; map++)". Since the driver's single element is never terminated, this walks past the allocation. The same pointer is also freed on hot-unplug and rebuilt on hot-plug under intelhaddata->mutex, while the TLV callback runs under card->controls_rwsem without that mutex, so the walk can also race a concurrent free of the array.

Fix this by allocating a second, zeroed element so the array is properly terminated, and by dropping the inherited TLV callback entirely at registration time, since the driver never implements one of its own.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 11/19/2026

The vulnerability identified in the Linux kernel's ALSA subsystem for Intel High Definition Audio (HDMI) represents a critical memory safety issue stemming from improper array termination and concurrent access patterns. The core technical flaw resides within the had_build_channel_allocation_map function, which is responsible for constructing channel mapping data structures used by audio playback controls. Specifically, this function allocates exactly one instance of the snd_pcm_chmap_elem structure using kzalloc and assigns it to intelhaddata->chmap->chmap. However, the ALSA core framework expects chmap arrays to be null-terminated sequences, similar to the standard channel maps defined in snd_pcm_std_chmaps[]. The driver fails to append a terminating zeroed element after its single allocated entry. This oversight means that any code iterating through this array cannot determine where the valid data ends based on structural markers alone, leading to out-of-bounds memory access when the iteration logic relies solely on checking for null termination or specific field values.

The operational impact of this flaw is realized through the ALSA control interface, specifically via the SNDRV_CTL_IOCTL_TLV_READ ioctl command accessible by any local user with appropriate permissions to interact with audio controls. When a user requests information about the Playback Channel Map, the generic pcm_chmap_ctl_tlv function from the ALSA core is invoked because had_register_chmap_ctls fails to override the default TLV callback installed during control registration. This generic handler iterates through the chmap array using a loop condition that checks if map->channels is non-zero. Because the driver's allocated structure lacks a subsequent zeroed terminator, the iteration proceeds past the bounds of the single kzalloc'd buffer. This results in an out-of-bounds read, potentially exposing kernel memory contents to user space or causing undefined behavior depending on what data resides immediately after the allocation. Such vulnerabilities are classically categorized under CWE-125: Out-of-bounds Read and align with ATT&CK techniques related to unauthorized access of system information via local privilege escalation vectors if further exploitation is possible through subsequent logic flaws triggered by the corrupted state or leaked memory contents.

Beyond the immediate out-of-bounds read, the vulnerability introduces a significant race condition due to inconsistent synchronization primitives during dynamic device management. The chmap pointer and its associated data are subject to hot-plug events where they may be freed during device removal and reallocated upon reconnection. These operations occur under the protection of intelhaddata->mutex. In contrast, the TLV callback that performs the unsafe array walk operates under card->controls_rwsem. Since these two synchronization locks protect different resources and are not held concurrently in a way that prevents overlap between allocation/deallocation cycles and control queries, it is possible for pcm_chmap_ctl_tlv to traverse an array while another thread is freeing or reallocating it. This lack of mutual exclusion creates a use-after-free scenario alongside the out-of-bounds read, significantly increasing the severity of the vulnerability by allowing potential arbitrary code execution or kernel panic through carefully timed race conditions.

The resolution involves two distinct corrective measures implemented within the driver's registration and mapping logic. First, to address the structural deficiency, the allocation size is increased to include a second element which is explicitly zeroed out. This ensures that snd_pcm_chmap_ctl_tlv encounters a valid terminator immediately after processing the actual channel map data, thereby preventing any iteration beyond the allocated buffer boundaries. Second, to eliminate the race condition and remove reliance on potentially unsafe generic handlers, the driver now drops the inherited TLV callback entirely during registration time. Since Intel HDMI audio drivers do not implement custom logic for handling TLV queries that differs from the default behavior in a way that requires specific protection or unique data structures, removing this hook prevents the execution of the vulnerable walk function altogether. This approach aligns with secure coding practices by minimizing attack surface area and ensuring that control interfaces only execute code paths explicitly designed and synchronized within the driver's context.

From a broader security perspective, this incident highlights the importance of strict adherence to API contracts in kernel subsystem development. The ALSA framework provides generic helpers for common tasks like channel mapping, but drivers must correctly initialize data structures according to these expectations. Failure to do so not only compromises memory safety but also undermines synchronization models that assume correct structural integrity. Mitigation strategies for system administrators and developers include ensuring the Linux kernel is updated with patches addressing this specific ALSA HDMI driver flaw. For organizations managing large fleets of systems, automated vulnerability scanning tools should be configured to detect missing array terminators in similar data structures across various drivers. Furthermore, code review processes must enforce checks that verify all allocated arrays intended for generic framework consumption are properly terminated and that callback registrations do not introduce race conditions with dynamic resource management operations.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00191

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!