]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Jan 2025 11:44:24 +0000 (12:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Jan 2025 11:44:24 +0000 (12:44 +0100)
added patches:
alsa-usb-audio-add-delay-quirk-for-usb-audio-device.patch
input-atkbd-map-f23-key-to-support-default-copilot-shortcut.patch
input-xpad-add-support-for-wooting-two-he-arm.patch
input-xpad-add-unofficial-xbox-360-wireless-receiver-clone.patch
revert-usb-gadget-u_serial-disable-ep-before-setting-port-to-null-to-fix-the-crash-caused-by-port-being-null.patch
usb-serial-quatech2-fix-null-ptr-deref-in-qt2_process_read_urb.patch

queue-5.15/alsa-usb-audio-add-delay-quirk-for-usb-audio-device.patch [new file with mode: 0644]
queue-5.15/input-atkbd-map-f23-key-to-support-default-copilot-shortcut.patch [new file with mode: 0644]
queue-5.15/input-xpad-add-support-for-wooting-two-he-arm.patch [new file with mode: 0644]
queue-5.15/input-xpad-add-unofficial-xbox-360-wireless-receiver-clone.patch [new file with mode: 0644]
queue-5.15/revert-usb-gadget-u_serial-disable-ep-before-setting-port-to-null-to-fix-the-crash-caused-by-port-being-null.patch [new file with mode: 0644]
queue-5.15/series
queue-5.15/usb-serial-quatech2-fix-null-ptr-deref-in-qt2_process_read_urb.patch [new file with mode: 0644]

diff --git a/queue-5.15/alsa-usb-audio-add-delay-quirk-for-usb-audio-device.patch b/queue-5.15/alsa-usb-audio-add-delay-quirk-for-usb-audio-device.patch
new file mode 100644 (file)
index 0000000..5ebd3a4
--- /dev/null
@@ -0,0 +1,37 @@
+From ad5b205f9e022b407d91f952faddd05718be2866 Mon Sep 17 00:00:00 2001
+From: Lianqin Hu <hulianqin@vivo.com>
+Date: Wed, 15 Jan 2025 09:32:35 +0000
+Subject: ALSA: usb-audio: Add delay quirk for USB Audio Device
+
+From: Lianqin Hu <hulianqin@vivo.com>
+
+commit ad5b205f9e022b407d91f952faddd05718be2866 upstream.
+
+Audio control requests that sets sampling frequency sometimes fail on
+this card. Adding delay between control messages eliminates that problem.
+
+usb 1-1: New USB device found, idVendor=0d8c, idProduct=0014
+usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
+usb 1-1: Product: USB Audio Device
+usb 1-1: Manufacturer: C-Media Electronics Inc.
+
+Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Link: https://patch.msgid.link/TYUPR06MB6217E94D922B9BF422A73F32D2192@TYUPR06MB6217.apcprd06.prod.outlook.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/quirks.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -1836,6 +1836,8 @@ static const struct usb_audio_quirk_flag
+                  QUIRK_FLAG_CTL_MSG_DELAY_1M),
+       DEVICE_FLG(0x0c45, 0x6340, /* Sonix HD USB Camera */
+                  QUIRK_FLAG_GET_SAMPLE_RATE),
++      DEVICE_FLG(0x0d8c, 0x0014, /* USB Audio Device */
++                 QUIRK_FLAG_CTL_MSG_DELAY_1M),
+       DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */
+                  QUIRK_FLAG_FIXED_RATE),
+       DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */
diff --git a/queue-5.15/input-atkbd-map-f23-key-to-support-default-copilot-shortcut.patch b/queue-5.15/input-atkbd-map-f23-key-to-support-default-copilot-shortcut.patch
new file mode 100644 (file)
index 0000000..5f48e6d
--- /dev/null
@@ -0,0 +1,45 @@
+From 907bc9268a5a9f823ffa751957a5c1dd59f83f42 Mon Sep 17 00:00:00 2001
+From: Mark Pearson <mpearson-lenovo@squebb.ca>
+Date: Mon, 20 Jan 2025 20:24:08 -0800
+Subject: Input: atkbd - map F23 key to support default copilot shortcut
+
+From: Mark Pearson <mpearson-lenovo@squebb.ca>
+
+commit 907bc9268a5a9f823ffa751957a5c1dd59f83f42 upstream.
+
+Microsoft defined Meta+Shift+F23 as the Copilot shortcut instead of a
+dedicated keycode, and multiple vendors have their keyboards emit this
+sequence in response to users pressing a dedicated "Copilot" key.
+Unfortunately the default keymap table in atkbd does not map scancode
+0x6e (F23) and so the key combination does not work even if userspace
+is ready to handle it.
+
+Because this behavior is common between multiple vendors and the
+scancode is currently unused map 0x6e to keycode 193 (KEY_F23) so that
+key sequence is generated properly.
+
+MS documentation for the scan code:
+https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#scan-codes
+Confirmed on Lenovo, HP and Dell machines by Canonical.
+Tested on Lenovo T14s G6 AMD.
+
+Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
+Link: https://lore.kernel.org/r/20250107034554.25843-1-mpearson-lenovo@squebb.ca
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/input/keyboard/atkbd.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/input/keyboard/atkbd.c
++++ b/drivers/input/keyboard/atkbd.c
+@@ -90,7 +90,7 @@ static const unsigned short atkbd_set2_k
+         0, 46, 45, 32, 18,  5,  4, 95,  0, 57, 47, 33, 20, 19,  6,183,
+         0, 49, 48, 35, 34, 21,  7,184,  0,  0, 50, 36, 22,  8,  9,185,
+         0, 51, 37, 23, 24, 11, 10,  0,  0, 52, 53, 38, 39, 25, 12,  0,
+-        0, 89, 40,  0, 26, 13,  0,  0, 58, 54, 28, 27,  0, 43,  0, 85,
++        0, 89, 40,  0, 26, 13,  0,193, 58, 54, 28, 27,  0, 43,  0, 85,
+         0, 86, 91, 90, 92,  0, 14, 94,  0, 79,124, 75, 71,121,  0,  0,
+        82, 83, 80, 76, 77, 72,  1, 69, 87, 78, 81, 74, 55, 73, 70, 99,
diff --git a/queue-5.15/input-xpad-add-support-for-wooting-two-he-arm.patch b/queue-5.15/input-xpad-add-support-for-wooting-two-he-arm.patch
new file mode 100644 (file)
index 0000000..ca7cdcb
--- /dev/null
@@ -0,0 +1,31 @@
+From 222f3390c15c4452a9f7e26f5b7d9138e75d00d5 Mon Sep 17 00:00:00 2001
+From: Jack Greiner <jack@emoss.org>
+Date: Fri, 17 Jan 2025 16:51:58 -0800
+Subject: Input: xpad - add support for wooting two he (arm)
+
+From: Jack Greiner <jack@emoss.org>
+
+commit 222f3390c15c4452a9f7e26f5b7d9138e75d00d5 upstream.
+
+Add Wooting Two HE (ARM) to the list of supported devices.
+
+Signed-off-by: Jack Greiner <jack@emoss.org>
+Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
+Link: https://lore.kernel.org/r/20250107192830.414709-3-rojtberg@gmail.com
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/input/joystick/xpad.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/input/joystick/xpad.c
++++ b/drivers/input/joystick/xpad.c
+@@ -349,6 +349,7 @@ static const struct xpad_device {
+       { 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 },
+       { 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 },
+       { 0x31e3, 0x1220, "Wooting Two HE", 0, XTYPE_XBOX360 },
++      { 0x31e3, 0x1230, "Wooting Two HE (ARM)", 0, XTYPE_XBOX360 },
+       { 0x31e3, 0x1300, "Wooting 60HE (AVR)", 0, XTYPE_XBOX360 },
+       { 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 },
+       { 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 },
diff --git a/queue-5.15/input-xpad-add-unofficial-xbox-360-wireless-receiver-clone.patch b/queue-5.15/input-xpad-add-unofficial-xbox-360-wireless-receiver-clone.patch
new file mode 100644 (file)
index 0000000..38957ef
--- /dev/null
@@ -0,0 +1,35 @@
+From e4940fe6322c851659c17852b671c6e7b1aa9f56 Mon Sep 17 00:00:00 2001
+From: Nilton Perim Neto <niltonperimneto@gmail.com>
+Date: Fri, 17 Jan 2025 09:34:18 -0800
+Subject: Input: xpad - add unofficial Xbox 360 wireless receiver clone
+
+From: Nilton Perim Neto <niltonperimneto@gmail.com>
+
+commit e4940fe6322c851659c17852b671c6e7b1aa9f56 upstream.
+
+Although it mimics the Microsoft's VendorID, it is in fact a clone.
+Taking into account that the original Microsoft Receiver is not being
+manufactured anymore, this drive can solve dpad issues encontered by
+those who still use the original 360 Wireless controller
+but are using a receiver clone.
+
+Signed-off-by: Nilton Perim Neto <niltonperimneto@gmail.com>
+Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
+Link: https://lore.kernel.org/r/20250107192830.414709-12-rojtberg@gmail.com
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/input/joystick/xpad.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/input/joystick/xpad.c
++++ b/drivers/input/joystick/xpad.c
+@@ -129,6 +129,7 @@ static const struct xpad_device {
+       { 0x045e, 0x028e, "Microsoft X-Box 360 pad", 0, XTYPE_XBOX360 },
+       { 0x045e, 0x028f, "Microsoft X-Box 360 pad v2", 0, XTYPE_XBOX360 },
+       { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
++      { 0x045e, 0x02a9, "Xbox 360 Wireless Receiver (Unofficial)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
+       { 0x045e, 0x02d1, "Microsoft X-Box One pad", 0, XTYPE_XBOXONE },
+       { 0x045e, 0x02dd, "Microsoft X-Box One pad (Firmware 2015)", 0, XTYPE_XBOXONE },
+       { 0x045e, 0x02e3, "Microsoft X-Box One Elite pad", 0, XTYPE_XBOXONE },
diff --git a/queue-5.15/revert-usb-gadget-u_serial-disable-ep-before-setting-port-to-null-to-fix-the-crash-caused-by-port-being-null.patch b/queue-5.15/revert-usb-gadget-u_serial-disable-ep-before-setting-port-to-null-to-fix-the-crash-caused-by-port-being-null.patch
new file mode 100644 (file)
index 0000000..ad1f0ae
--- /dev/null
@@ -0,0 +1,47 @@
+From 086fd062bc3883ae1ce4166cff5355db315ad879 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Fri, 17 Jan 2025 09:17:12 +0100
+Subject: Revert "usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit 086fd062bc3883ae1ce4166cff5355db315ad879 upstream.
+
+This reverts commit 13014969cbf07f18d62ceea40bd8ca8ec9d36cec.
+
+It is reported to cause crashes on Tegra systems, so revert it for now.
+
+Link: https://lore.kernel.org/r/1037c1ad-9230-4181-b9c3-167dbaa47644@nvidia.com
+Reported-by: Jon Hunter <jonathanh@nvidia.com>
+Cc: stable <stable@kernel.org>
+Cc: Lianqin Hu <hulianqin@vivo.com>
+Link: https://lore.kernel.org/r/2025011711-yippee-fever-a737@gregkh
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/gadget/function/u_serial.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/gadget/function/u_serial.c
++++ b/drivers/usb/gadget/function/u_serial.c
+@@ -1393,10 +1393,6 @@ void gserial_disconnect(struct gserial *
+       /* REVISIT as above: how best to track this? */
+       port->port_line_coding = gser->port_line_coding;
+-      /* disable endpoints, aborting down any active I/O */
+-      usb_ep_disable(gser->out);
+-      usb_ep_disable(gser->in);
+-
+       port->port_usb = NULL;
+       gser->ioport = NULL;
+       if (port->port.count > 0) {
+@@ -1408,6 +1404,10 @@ void gserial_disconnect(struct gserial *
+       spin_unlock(&port->port_lock);
+       spin_unlock_irqrestore(&serial_port_lock, flags);
++      /* disable endpoints, aborting down any active I/O */
++      usb_ep_disable(gser->out);
++      usb_ep_disable(gser->in);
++
+       /* finally, free any unused/unusable I/O buffers */
+       spin_lock_irqsave(&port->port_lock, flags);
+       if (port->port.count == 0)
index 11bcdff58997f16d7626aa1e8f642ddd59f872fa..51a9ca70784d820210f951b4f458c33d976ca238 100644 (file)
@@ -16,3 +16,9 @@ platform-chrome-cros_ec_typec-check-for-ec-driver.patch
 ipv4-ip_tunnel-fix-suspicious-rcu-usage-warning-in-ip_tunnel_find.patch
 scsi-storvsc-ratelimit-warning-logs-to-prevent-vm-denial-of-service.patch
 wifi-iwlwifi-add-a-few-rate-index-validity-checks.patch
+usb-serial-quatech2-fix-null-ptr-deref-in-qt2_process_read_urb.patch
+revert-usb-gadget-u_serial-disable-ep-before-setting-port-to-null-to-fix-the-crash-caused-by-port-being-null.patch
+alsa-usb-audio-add-delay-quirk-for-usb-audio-device.patch
+input-atkbd-map-f23-key-to-support-default-copilot-shortcut.patch
+input-xpad-add-unofficial-xbox-360-wireless-receiver-clone.patch
+input-xpad-add-support-for-wooting-two-he-arm.patch
diff --git a/queue-5.15/usb-serial-quatech2-fix-null-ptr-deref-in-qt2_process_read_urb.patch b/queue-5.15/usb-serial-quatech2-fix-null-ptr-deref-in-qt2_process_read_urb.patch
new file mode 100644 (file)
index 0000000..c3ff8b4
--- /dev/null
@@ -0,0 +1,53 @@
+From 575a5adf48b06a2980c9eeffedf699ed5534fade Mon Sep 17 00:00:00 2001
+From: Qasim Ijaz <qasdev00@gmail.com>
+Date: Mon, 13 Jan 2025 18:00:34 +0000
+Subject: USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb()
+
+From: Qasim Ijaz <qasdev00@gmail.com>
+
+commit 575a5adf48b06a2980c9eeffedf699ed5534fade upstream.
+
+This patch addresses a null-ptr-deref in qt2_process_read_urb() due to
+an incorrect bounds check in the following:
+
+       if (newport > serial->num_ports) {
+               dev_err(&port->dev,
+                       "%s - port change to invalid port: %i\n",
+                       __func__, newport);
+               break;
+       }
+
+The condition doesn't account for the valid range of the serial->port
+buffer, which is from 0 to serial->num_ports - 1. When newport is equal
+to serial->num_ports, the assignment of "port" in the
+following code is out-of-bounds and NULL:
+
+       serial_priv->current_port = newport;
+       port = serial->port[serial_priv->current_port];
+
+The fix checks if newport is greater than or equal to serial->num_ports
+indicating it is out-of-bounds.
+
+Reported-by: syzbot <syzbot+506479ebf12fe435d01a@syzkaller.appspotmail.com>
+Closes: https://syzkaller.appspot.com/bug?extid=506479ebf12fe435d01a
+Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver")
+Cc: <stable@vger.kernel.org>      # 3.5
+Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
+Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/quatech2.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/quatech2.c
++++ b/drivers/usb/serial/quatech2.c
+@@ -525,7 +525,7 @@ static void qt2_process_read_urb(struct
+                               newport = *(ch + 3);
+-                              if (newport > serial->num_ports) {
++                              if (newport >= serial->num_ports) {
+                                       dev_err(&port->dev,
+                                               "%s - port change to invalid port: %i\n",
+                                               __func__, newport);