CVE-2026-31778: ALSA: caiaq: fix stack out-of-bounds read in init_card

Published May 1, 2026
·
Updated

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

ALSA: caiaq: fix stack out-of-bounds read in initcard

The loop creates a whitespace-stripped copy of the card shortname where len < sizeof(card->id) is used for the bounds check. Since sizeof(card->id) is 16 and the local id buffer is also 16 bytes, writing 16 non-space characters fills the entire buffer, overwriting the terminating nullbyte.

When this non-null-terminated string is later passed to sndcardsetid() -> copyvalididstring(), the function scans forward with while (nid && ...) and reads past the end of the stack buffer, reading the contents of the stack.

A USB device with a product name containing many non-ASCII, non-space characters (e.g. multibyte UTF-8) will reliably trigger this as follows:

BUG: KASAN: stack-out-of-bounds in copyvalididstring sound/core/init.c:696 [inline] BUG: KASAN: stack-out-of-bounds in sndcardsetidnolock+0x698/0x74c sound/core/init.c:718

The off-by-one has been present since commit bafeee5b1f8d ("ALSA: sndusbcaiaq: give better shortname") from June 2009 (v2.6.31-rc1), which first introduced this whitespace-stripping loop. The original code never accounted for the null terminator when bounding the copy.

Fix this by changing the loop bound to sizeof(card->id) - 1, ensuring at least one byte remains as the null terminator.

Affected Software

14 affected components
The Linux Foundation ALSA snd_usb_caiaq (caiaq) driver>=2.6.31-rc1
Linux Linux kernel>=2.6.31<5.10.253
Linux Linux kernel>=5.11<5.15.203
Linux Linux kernel>=5.16<6.1.168
Linux Linux kernel>=6.2<6.6.134
Linux Linux kernel>=6.7<6.12.81
Linux Linux kernel>=6.13<6.18.22
Linux Linux kernel>=6.19<6.19.12
Linux Linux kernel=7.0-rc1
Linux Linux kernel=7.0-rc2
Linux Linux kernel=7.0-rc3
Linux Linux kernel=7.0-rc4
Linux Linux kernel=7.0-rc5
Linux Linux kernel=7.0-rc6

Event History

May 1, 2026
CVE Published
via MITRE·02:15 PM
Data Sourced
via MITRE·02:15 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-31778?

CVE-2026-31778 has a moderate severity level due to the potential for stack out-of-bounds read issues that can lead to information disclosure.

2

How do I fix CVE-2026-31778?

To resolve CVE-2026-31778, update the ALSA snd_usb_caiaq driver to the latest version that contains the patch for this vulnerability.

3

What systems are affected by CVE-2026-31778?

CVE-2026-31778 affects the Linux Kernel ALSA snd_usb_caiaq driver starting from version 2.6.31-rc1.

4

What is the potential impact of CVE-2026-31778?

The potential impact of CVE-2026-31778 includes unauthorized access to sensitive information due to the out-of-bounds read.

5

Is CVE-2026-31778 a remote attack vector?

No, CVE-2026-31778 is not a remote attack vector; it requires local access to exploit the vulnerability.

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