]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 May 2021 09:32:33 +0000 (11:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 May 2021 09:32:33 +0000 (11:32 +0200)
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

queue-4.9/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch [new file with mode: 0644]
queue-4.9/alsa-usb-audio-validate-ms-endpoint-descriptors.patch [new file with mode: 0644]
queue-4.9/revert-alsa-sb8-add-a-check-for-request_region.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch b/queue-4.9/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch
new file mode 100644 (file)
index 0000000..dfdf55e
--- /dev/null
@@ -0,0 +1,73 @@
+From 0edabdfe89581669609eaac5f6a8d0ae6fe95e7f Mon Sep 17 00:00:00 2001
+From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+Date: Thu, 13 May 2021 21:56:49 +0900
+Subject: ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro
+
+From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
+
+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: <stable@vger.kernel.org>
+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 <o-takashi@sakamocchi.jp>
+Link: https://lore.kernel.org/r/20210513125652.110249-3-o-takashi@sakamocchi.jp
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+          * Stanton Controllers & Systems 1 Deck/Mixer
+@@ -82,7 +82,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
+@@ -414,7 +414,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
+@@ -405,7 +405,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.9/alsa-usb-audio-validate-ms-endpoint-descriptors.patch b/queue-4.9/alsa-usb-audio-validate-ms-endpoint-descriptors.patch
new file mode 100644 (file)
index 0000000..63c2917
--- /dev/null
@@ -0,0 +1,37 @@
+From e84749a78dc82bc545f12ce009e3dbcc2c5a8a91 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 10 May 2021 17:06:59 +0200
+Subject: ALSA: usb-audio: Validate MS endpoint descriptors
+
+From: Takashi Iwai <tiwai@suse.de>
+
+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: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20210510150659.17710-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/midi.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/sound/usb/midi.c
++++ b/sound/usb/midi.c
+@@ -1867,8 +1867,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.9/revert-alsa-sb8-add-a-check-for-request_region.patch b/queue-4.9/revert-alsa-sb8-add-a-check-for-request_region.patch
new file mode 100644 (file)
index 0000000..c3d0f0d
--- /dev/null
@@ -0,0 +1,47 @@
+From 94f88309f201821073f57ae6005caefa61bf7b7e Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Mon, 3 May 2021 13:57:01 +0200
+Subject: Revert "ALSA: sb8: add a check for request_region"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+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 <kjlu@umn.edu>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+Fixes: dcd0feac9bab ("ALSA: sb8: add a check for request_region")
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20210503115736.2104747-35-gregkh@linuxfoundation.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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],
index a8c8e98d44dd940757055f17399f15183efb7b6c..1251fd08ff8a9fc37f8e3d4c24d1151369aadea9 100644 (file)
@@ -4,3 +4,6 @@ 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-line6-fix-racy-initialization-of-line6-midi.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