Patch "ALSA: hda: Fix too short HDMI/DP chmap reporting" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
ALSA: hda: Fix too short HDMI/DP chmap reporting
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
alsa-hda-fix-too-short-hdmi-dp-chmap-reporting.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
c2432466f583cb719b35a41e757da587d9ab1d00Mon Sep 17 00:00:00 2001
From: Takashi Iwai <[email protected]>
Date: Fri, 17 Nov 2017 12:08:40 +0100
Subject: ALSA: hda: Fix too short HDMI/DP chmap reporting
From: Takashi Iwai <[email protected]>
commit c2432466f583cb719b35a41e757da587d9ab1d00 upstream.
We got a regression report about the HD-audio HDMI chmap, where some surround channels are reported as UNKNOWN. The git bisection pointed the culprit at the commit 9b3dc8aa3fb1 ("ALSA: hda - Register chmap obj as priv data instead of codec"). The story behind scene is like this:
- While moving the code out of the legacy HDA to the HDA common place, the patch modifies the code to obtain the chmap array indirectly in a byte array, and it expands it to kctl value array.
- At the latter operation, the size of the array is wrongly passed by sizeof() to the pointer.
- It can be 4 on 32bit arch, thus too short for 6+ channels. (And that's the reason why it didn't hit other persons; it's 8 on 64bit arch, thus it's usually enough.)
The code was further changed meanwhile, but the problem persisted. Let's fix it by correctly evaluating the array size.
--- sound/hda/hdmi_chmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/hda/hdmi_chmap.c +1 -1
@@ -746,7 +746,7 @@ static int hdmi_chmap_ctl_get(struct sndmemset (pcm_chmap,0 ,sizeof (pcm_chmap)); chmap->ops.get_chmap (chmap->hdac, pcm_idx, pcm_chmap); -for (i =0 ; i <sizeof (chmap); i++) +for (i =0 ; i <ARRAY_SIZE (pcm_chmap); i++) ucontrol->value.integer.value[i] = pcm_chmap[i];return 0 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/alsa-usb-audio-fix-potential-zero-division-at-parsing-fu.patch queue-4.9/alsa-timer-remove-kernel-warning-at-compat-ioctl-error-paths.patch queue-4.9/alsa-hda-add-raven-pci-id.patch queue-4.9/alsa-usb-audio-add-sanity-checks-in-v2-clock-parsers.patch queue-4.9/alsa-hda-fix-too-short-hdmi-dp-chmap-reporting.patch queue-4.9/alsa-hda-realtek-fix-alc700-family-no-sound-issue.patch queue-4.9/alsa-usb-audio-fix-potential-out-of-bound-access-at-parsing-su.patch queue-4.9/alsa-pcm-update-tstamp-only-if-audio_tstamp-changed.patch queue-4.9/alsa-usb-audio-add-sanity-checks-to-fe-parser.patch