CVE-2026-74640: ALSA: FCP: fix OOB write in fcp_meter_ctl_get()

Published Aug 22, 2026
·
Updated

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

ALSA: FCP: fix OOB write in fcpmeterctlget()

fcpioctlsetmetermap() bounds the user-supplied Level Meter map size by the driver's own limit of 255

if (map.mapsize < 1 || map.mapsize > 255 || map.meterslots < 1 || map.meterslots > 255) return -EINVAL;

and passes it to fcpaddnewctl() as the control's channel count, where it is stored as elem->channels.

Every control read writes into struct sndctlelemvalue, whose integer array is declared long value[128], so the limit is 128, not 255. fcpmeterctlget() stores one 64-bit word per channel into that array with no bound of its own:

for (i = 0; i < elem->channels; i++) { int idx = private->meterlevelmap[i]; int value = idx < 0 ? 0 : le32tocpu(resp[idx]);

ucontrol->value.integer.value[i] = value; }

sndctlelemreaduser() serves that object from memdupuser(control, sizeof(control)), 1224 bytes on LP64 out of kmalloc-2048. offsetof(struct sndctlelemvalue, value) is 72, so element i is written at byte 72 + 8 i and element 144 already lands past the allocation. At mapsize 255 the last store ends at byte 2112, 888 bytes past the object and 64 bytes into the adjacent slab object. The stored words come from the device and meterlevelmap[] selects which word lands in which slot, so extent and contents are both controlled.

The core does not catch this. sndctlcheckeleminfo() is reached only from sndctleleminfo(), which sndctlelemread() calls under CONFIGSNDCTLDEBUG; without that option sndctlskipvalidation() is a compile-time true. sndctladdreplace() validates kcontrol->count and never inspects elem->channels.

Installing an oversized map needs CAPSYSRAWIO, but the control outlives the hwdep descriptor that created it, so the out-of-bounds stores are issued by any process able to read controls on /dev/snd/controlC0.

KASAN on 7.2.0-rc5 (arm64), triggered by an unprivileged control read:

BUG: KASAN: slab-out-of-bounds in fcpmeterctlget Write of size 8 at addr ffff000017af04c8 by task fcptrigger/185 asanstore8 fcpmeterctlget sndctlelemread sndctlioctl Allocated by task 185: memdupuser sndctlioctl The buggy address is located 0 bytes to the right of allocated 1224-byte region [ffff000017af0000, ffff000017af04c8)

Bound the map size by the ABI limit rather than by 255, and bound the store loop at the sink so it cannot run past the value array whatever elem->channels holds.

Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com>

Affected Software

1 affected component
Linux kernel ALSA FCP (fcp_meter_ctl_get)

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Bound the map size by the ABI limit rather than 255, and ensure CONFIG_SND_CTL_DEBUG is enabled so snd_ctl_skip_validation() is not in effect (the text states without that option snd_ctl_skip_validation() is used).

    Linux kernel (ALSA snd_ctl validation) CONFIG_SND_CTL_DEBUG = enabled
  2. Configuration

    In fcp_meter_ctl_get, bound the user-supplied Level Meter map size by the ABI limit rather than by 255 to prevent out-of-bounds writes into struct snd_ctl_elem_value.

    fcp_meter_ctl_get / fcp ioctl Level Meter map map.map_size = bounded by ABI limit (instead of 255)

Event History

Aug 22, 2026
CVE Published
via MITRE·03:32 PM
Data Sourced
via MITRE·03:32 PM
Description
Data Sourced
via NVD·04:16 PM
Description

Frequently Asked Questions

1

What configuration is required for the out-of-bounds write to occur?

A Level Meter map must be configured with more than 128 channels. The driver accepts map sizes up to 255 and stores that count as the control channel count, while control reads write into an array with space for only 128 integer values.

2

What attacker-controlled input reaches the vulnerable write?

The user-supplied Level Meter map size controls elem->channels. During a control read, fcp_meter_ctl_get() writes one 64-bit value per configured channel without enforcing the 128-element limit.

3

How can I determine whether a system may be affected?

Systems using the Linux kernel ALSA FCP driver may be affected if they have a Level Meter map configured with more than 128 channels. A map size of 144 already causes writes beyond the allocated control-value object; a size of 255 produces the largest described overwrite.

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