CVE-2026-138877: ALSA: hda/hdmi: clamp sad_count in ELD proc write handler
In the Linux kernel, the following vulnerability has been resolved:
ALSA: hda/hdmi: clamp sadcount in ELD proc write handler
sndhdmiwriteeldinfo() parses a "sadcount N" line from the root-writable ELD proc interface and assigns N directly to e->sadcount with no upper bound, unlike the per-index "sadN" lines a few lines below which are already bounded to ELDMAXSAD.
sndhdmieldupdatepcminfo() later iterates "for (i = 0; i < e->sadcount; i++)" over the fixed e->sad[ELDMAXSAD] array, so an oversized sadcount read from the proc file causes it to walk past the array.
Reject sadcount values above ELDMAXSAD, matching the existing per-index guard.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the ALSA HDA/HDMI ELD proc write handler, reject sad_count values above ELD_MAX_SAD before iterating over e->sad.
Event History
Frequently Asked Questions
Who can trigger the out-of-bounds access?
An attacker needs root-level write access to the ELD proc interface. The vulnerable handler is described as root-writable, so unprivileged users are not shown to be able to trigger it directly.
What input causes the issue?
Writing a "sad_count N" value greater than ELD_MAX_SAD causes the handler to store an oversized count. A later PCM-information update then iterates beyond the fixed e->sad[ELD_MAX_SAD] array.
How can exposure be reduced before applying the fix?
Prevent untrusted parties from obtaining root-level access or writing to the ELD proc interface. The issue depends on supplying an oversized sad_count through that interface.
How does the fix prevent exploitation?
The resolved change rejects sad_count values above ELD_MAX_SAD. This makes the count consistent with the existing bounds checks for per-index sadN entries and prevents iteration past the fixed SAD array.