From: Greg Kroah-Hartman Date: Mon, 24 May 2021 09:32:16 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.4.270~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4cb768a902d6ec3aadba245089aea9b74402548;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch alsa-usb-audio-validate-ms-endpoint-descriptors.patch revert-alsa-sb8-add-a-check-for-request_region.patch --- diff --git a/queue-4.4/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch b/queue-4.4/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch new file mode 100644 index 00000000000..40aa02c1696 --- /dev/null +++ b/queue-4.4/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch @@ -0,0 +1,73 @@ +From 0edabdfe89581669609eaac5f6a8d0ae6fe95e7f Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Thu, 13 May 2021 21:56:49 +0900 +Subject: ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro + +From: Takashi Sakamoto + +commit 0edabdfe89581669609eaac5f6a8d0ae6fe95e7f upstream. + +Mackie d.2 has an extension card for IEEE 1394 communication, which uses +BridgeCo DM1000 ASIC. On the other hand, Mackie d.4 Pro has built-in +function for IEEE 1394 communication by Oxford Semiconductor OXFW971, +according to schematic diagram available in Mackie website. Although I +misunderstood that Mackie d.2 Pro would be also a model with OXFW971, +it's wrong. Mackie d.2 Pro is a model which includes the extension card +as factory settings. + +This commit fixes entries in Kconfig and comment in ALSA OXFW driver. + +Cc: +Fixes: fd6f4b0dc167 ("ALSA: bebob: Add skelton for BeBoB based devices") +Fixes: ec4dba5053e1 ("ALSA: oxfw: Add support for Behringer/Mackie devices") +Signed-off-by: Takashi Sakamoto +Link: https://lore.kernel.org/r/20210513125652.110249-3-o-takashi@sakamocchi.jp +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/firewire/Kconfig | 4 ++-- + sound/firewire/bebob/bebob.c | 2 +- + sound/firewire/oxfw/oxfw.c | 1 - + 3 files changed, 3 insertions(+), 4 deletions(-) + +--- a/sound/firewire/Kconfig ++++ b/sound/firewire/Kconfig +@@ -36,7 +36,7 @@ config SND_OXFW + * Mackie(Loud) Onyx-i series (former models) + * Mackie(Loud) Onyx Satellite + * Mackie(Loud) Tapco Link.Firewire +- * Mackie(Loud) d.2 pro/d.4 pro ++ * Mackie(Loud) d.4 pro + * Mackie(Loud) U.420/U.420d + * TASCAM FireOne + +@@ -91,7 +91,7 @@ config SND_BEBOB + * PreSonus FIREBOX/FIREPOD/FP10/Inspire1394 + * BridgeCo RDAudio1/Audio5 + * Mackie Onyx 1220/1620/1640 (FireWire I/O Card) +- * Mackie d.2 (FireWire Option) ++ * Mackie d.2 (FireWire Option) and d.2 Pro + * Stanton FinalScratch 2 (ScratchAmp) + * Tascam IF-FW/DM + * Behringer XENIX UFX 1204/1604 +--- a/sound/firewire/bebob/bebob.c ++++ b/sound/firewire/bebob/bebob.c +@@ -362,7 +362,7 @@ static const struct ieee1394_device_id b + SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal), + /* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */ + SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal), +- /* Mackie, d.2 (Firewire Option) */ ++ // Mackie, d.2 (Firewire option card) and d.2 Pro (the card is built-in). + SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal), + /* Stanton, ScratchAmp */ + SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal), +--- a/sound/firewire/oxfw/oxfw.c ++++ b/sound/firewire/oxfw/oxfw.c +@@ -320,7 +320,6 @@ static const struct ieee1394_device_id o + * Onyx-i series (former models): 0x081216 + * Mackie Onyx Satellite: 0x00200f + * Tapco LINK.firewire 4x6: 0x000460 +- * d.2 pro: Unknown + * d.4 pro: Unknown + * U.420: Unknown + * U.420d: Unknown diff --git a/queue-4.4/alsa-usb-audio-validate-ms-endpoint-descriptors.patch b/queue-4.4/alsa-usb-audio-validate-ms-endpoint-descriptors.patch new file mode 100644 index 00000000000..8424eaae228 --- /dev/null +++ b/queue-4.4/alsa-usb-audio-validate-ms-endpoint-descriptors.patch @@ -0,0 +1,37 @@ +From e84749a78dc82bc545f12ce009e3dbcc2c5a8a91 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 10 May 2021 17:06:59 +0200 +Subject: ALSA: usb-audio: Validate MS endpoint descriptors + +From: Takashi Iwai + +commit e84749a78dc82bc545f12ce009e3dbcc2c5a8a91 upstream. + +snd_usbmidi_get_ms_info() may access beyond the border when a +malformed descriptor is passed. This patch adds the sanity checks of +the given MS endpoint descriptors, and skips invalid ones. + +Reported-by: syzbot+6bb23a5d5548b93c94aa@syzkaller.appspotmail.com +Cc: +Link: https://lore.kernel.org/r/20210510150659.17710-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/midi.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/sound/usb/midi.c ++++ b/sound/usb/midi.c +@@ -1865,8 +1865,12 @@ static int snd_usbmidi_get_ms_info(struc + ms_ep = find_usb_ms_endpoint_descriptor(hostep); + if (!ms_ep) + continue; ++ if (ms_ep->bLength <= sizeof(*ms_ep)) ++ continue; + if (ms_ep->bNumEmbMIDIJack > 0x10) + continue; ++ if (ms_ep->bLength < sizeof(*ms_ep) + ms_ep->bNumEmbMIDIJack) ++ continue; + if (usb_endpoint_dir_out(ep)) { + if (endpoints[epidx].out_ep) { + if (++epidx >= MIDI_MAX_ENDPOINTS) { diff --git a/queue-4.4/revert-alsa-sb8-add-a-check-for-request_region.patch b/queue-4.4/revert-alsa-sb8-add-a-check-for-request_region.patch new file mode 100644 index 00000000000..c3d0f0d346e --- /dev/null +++ b/queue-4.4/revert-alsa-sb8-add-a-check-for-request_region.patch @@ -0,0 +1,47 @@ +From 94f88309f201821073f57ae6005caefa61bf7b7e Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Mon, 3 May 2021 13:57:01 +0200 +Subject: Revert "ALSA: sb8: add a check for request_region" + +From: Greg Kroah-Hartman + +commit 94f88309f201821073f57ae6005caefa61bf7b7e upstream. + +This reverts commit dcd0feac9bab901d5739de51b3f69840851f8919. + +Because of recent interactions with developers from @umn.edu, all +commits from them have been recently re-reviewed to ensure if they were +correct or not. + +Upon review, this commit was found to be incorrect for the reasons +below, so it must be reverted. It will be fixed up "correctly" in a +later kernel change. + +The original commit message for this change was incorrect as the code +path can never result in a NULL dereference, alluding to the fact that +whatever tool was used to "find this" is broken. It's just an optional +resource reservation, so removing this check is fine. + +Cc: Kangjie Lu +Acked-by: Takashi Iwai +Fixes: dcd0feac9bab ("ALSA: sb8: add a check for request_region") +Cc: stable +Link: https://lore.kernel.org/r/20210503115736.2104747-35-gregkh@linuxfoundation.org +Signed-off-by: Greg Kroah-Hartman +--- + sound/isa/sb/sb8.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/sound/isa/sb/sb8.c ++++ b/sound/isa/sb/sb8.c +@@ -111,10 +111,6 @@ static int snd_sb8_probe(struct device * + + /* block the 0x388 port to avoid PnP conflicts */ + acard->fm_res = request_region(0x388, 4, "SoundBlaster FM"); +- if (!acard->fm_res) { +- err = -EBUSY; +- goto _err; +- } + + if (port[dev] != SNDRV_AUTO_PORT) { + if ((err = snd_sbdsp_create(card, port[dev], irq[dev], diff --git a/queue-4.4/series b/queue-4.4/series index cfbf4b15f30..29bb357f34b 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -2,3 +2,6 @@ openrisc-fix-a-memory-leak.patch scsi-qla2xxx-fix-error-return-code-in-qla82xx_write_.patch ptrace-make-ptrace-fail-if-the-tracee-changed-its-pi.patch cifs-fix-memory-leak-in-smb2_copychunk_range.patch +alsa-usb-audio-validate-ms-endpoint-descriptors.patch +alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch +revert-alsa-sb8-add-a-check-for-request_region.patch