summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHui Peng2018-12-26 00:11:52 +0100
committerGreg Kroah-Hartman2019-01-13 09:51:06 +0100
commit6c8c16479b2363972d02bc6a4be132a9a9acd17e (patch)
tree843fe1501506e2dfe2ad231e309afa0dc79fc411 /sound
parentALSA: usb-audio: Check mixer unit descriptors more strictly (diff)
downloadkernel-qcow2-linux-6c8c16479b2363972d02bc6a4be132a9a9acd17e.tar.gz
kernel-qcow2-linux-6c8c16479b2363972d02bc6a4be132a9a9acd17e.tar.xz
kernel-qcow2-linux-6c8c16479b2363972d02bc6a4be132a9a9acd17e.zip
ALSA: usb-audio: Fix an out-of-bound read in create_composite_quirks
commit cbb2ebf70daf7f7d97d3811a2ff8e39655b8c184 upstream. In `create_composite_quirk`, the terminating condition of for loops is `quirk->ifnum < 0`. So any composite quirks should end with `struct snd_usb_audio_quirk` object with ifnum < 0. for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) { ..... } the data field of Bower's & Wilkins PX headphones usb device device quirks do not end with {.ifnum = -1}, wihch may result in out-of-bound read. This Patch fix the bug by adding an ending quirk object. Fixes: 240a8af929c7 ("ALSA: usb-audio: Add a quirck for B&W PX headphones") Signed-off-by: Hui Peng <benquike@163.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/quirks-table.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 1c73b9ed44a6..57c6209a4ccb 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -3326,6 +3326,9 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
}
}
},
+ {
+ .ifnum = -1
+ },
}
}
},
@@ -3374,6 +3377,9 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
}
}
},
+ {
+ .ifnum = -1
+ },
}
}
},