Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2026-31778

HIGH 7.1EPSS 3%

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

Mitigation

  • Upgrade Linux to 45424e871abf2a152e247a9cff78359f18dd95c0 or later.

Who should check

  • Anyone running Linux >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 02d9c5b0b5553a391448b6d655262bd829f90234; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3f7f8bae0d52cbd07ab04b76b6aac89ef98ee9f6; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 66194c2575a4f567577ae70b1d7561163ce791a6; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < a82c1bce2d1299dd3c686a8fe48cf75b79a403c7; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3178b62e2e31bab39f63d4c8e54bf4ee0a425627; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3afa2e67f3523a980a2f90fd63c22322ac2b9ce0; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 7594a6464873d90fd229e5b94cdd3b92c9feabed; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 45424e871abf2a152e247a9cff78359f18dd95c0
  • Anyone running Linux 2.6.31

Vulnerability facts

Affected
Linux >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 02d9c5b0b5553a391448b6d655262bd829f90234; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3f7f8bae0d52cbd07ab04b76b6aac89ef98ee9f6; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 66194c2575a4f567577ae70b1d7561163ce791a6; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < a82c1bce2d1299dd3c686a8fe48cf75b79a403c7; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3178b62e2e31bab39f63d4c8e54bf4ee0a425627; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3afa2e67f3523a980a2f90fd63c22322ac2b9ce0; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 7594a6464873d90fd229e5b94cdd3b92c9feabed; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 45424e871abf2a152e247a9cff78359f18dd95c0; Linux 2.6.31
Fixed in
Linux 02d9c5b0b5553a391448b6d655262bd829f90234, Linux 3f7f8bae0d52cbd07ab04b76b6aac89ef98ee9f6, Linux 66194c2575a4f567577ae70b1d7561163ce791a6, Linux 3178b62e2e31bab39f63d4c8e54bf4ee0a425627, Linux 3afa2e67f3523a980a2f90fd63c22322ac2b9ce0, Linux 7594a6464873d90fd229e5b94cdd3b92c9feabed, Linux 45424e871abf2a152e247a9cff78359f18dd95c0
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.1 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: None
  • Availability impact: High
EPSS
0.17% chance of exploitation in 30 days (percentile 3, 2026-11-26)
CWE
CWE-125
Published
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: ALSA: caiaq: fix stack out-of-bounds read in init_card 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 snd_card_set_id() -> copy_valid_id_string(), 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 copy_valid_id_string sound/core/init.c:696 [inline] BUG: KASAN: stack-out-of-bounds in snd_card_set_id_no_lock+0x698/0x74c sound/core/init.c:718 The off-by-one has been present since commit bafeee5b1f8d ("ALSA: snd_usb_caiaq: 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 and fixed versions

Package / productAffectedFixedSource
Linux>= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 02d9c5b0b5553a391448b6d655262bd829f90234; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3f7f8bae0d52cbd07ab04b76b6aac89ef98ee9f6; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 66194c2575a4f567577ae70b1d7561163ce791a6; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < a82c1bce2d1299dd3c686a8fe48cf75b79a403c7; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3178b62e2e31bab39f63d4c8e54bf4ee0a425627; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3afa2e67f3523a980a2f90fd63c22322ac2b9ce0; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 7594a6464873d90fd229e5b94cdd3b92c9feabed; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 45424e871abf2a152e247a9cff78359f18dd95c0—cvelist
Linux2.6.31—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2026-31778. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31778.md
Affected: Linux >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 02d9c5b0b5553a391448b6d655262bd829f90234; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3f7f8bae0d52cbd07ab04b76b6aac89ef98ee9f6; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 66194c2575a4f567577ae70b1d7561163ce791a6; >= bafeee5b1f8d32cbf791c32…
Fixed in: Linux 02d9c5b0b5553a391448b6d655262bd829f90234, Linux 3f7f8bae0d52cbd07ab04b76b6aac89ef98ee9f6, Linux 66194c2575a4f567577ae70b1d7561163ce791a6, Linux 3178b62e2e31bab39f63d4c8e54bf4ee0a425627, Linux 3afa2e67f3523a980a2f90fd63c22322ac2b9ce0, Linux 7594a6464873d90fd229e5b94cdd3b92c9feabed, Linux 45424…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2026-31778 being exploited?

There is no confirmed exploitation: CVE-2026-31778 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.17% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2026-31778?

High: CVSS 7.1 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2026-31778?

Linux >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 02d9c5b0b5553a391448b6d655262bd829f90234; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3f7f8bae0d52cbd07ab04b76b6aac89ef98ee9f6; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 66194c2575a4f567577ae70b1d7561163ce791a6; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < a82c1bce2d1299dd3c686a8fe48cf75b79a403c7; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3178b62e2e31bab39f63d4c8e54bf4ee0a425627; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 3afa2e67f3523a980a2f90fd63c22322ac2b9ce0; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 7594a6464873d90fd229e5b94cdd3b92c9feabed; >= bafeee5b1f8d32cbf791c322b40a6fa91d8ccf7a, < 45424e871abf2a152e247a9cff78359f18dd95c0; Linux 2.6.31.

Is there a fix for CVE-2026-31778?

Yes. Fixed in Linux 02d9c5b0b5553a391448b6d655262bd829f90234, Linux 3f7f8bae0d52cbd07ab04b76b6aac89ef98ee9f6, Linux 66194c2575a4f567577ae70b1d7561163ce791a6, Linux 3178b62e2e31bab39f63d4c8e54bf4ee0a425627, Linux 3afa2e67f3523a980a2f90fd63c22322ac2b9ce0, Linux 7594a6464873d90fd229e5b94cdd3b92c9feabed, Linux 45424e871abf2a152e247a9cff78359f18dd95c0. Upgrade Linux to 45424e871abf2a152e247a9cff78359f18dd95c0 or later.

How do I check if I'm affected by CVE-2026-31778?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors