]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Feb 2021 09:05:16 +0000 (10:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Feb 2021 09:05:16 +0000 (10:05 +0100)
added patches:
hid-make-arrays-usage-and-value-to-be-the-same.patch
usb-quirks-add-quirk-to-start-video-capture-on-elmo-l-12f-document-camera-reliable.patch
usb-quirks-sort-quirk-entries.patch

queue-4.19/hid-make-arrays-usage-and-value-to-be-the-same.patch [new file with mode: 0644]
queue-4.19/usb-quirks-add-quirk-to-start-video-capture-on-elmo-l-12f-document-camera-reliable.patch [new file with mode: 0644]
queue-4.19/usb-quirks-sort-quirk-entries.patch [new file with mode: 0644]

diff --git a/queue-4.19/hid-make-arrays-usage-and-value-to-be-the-same.patch b/queue-4.19/hid-make-arrays-usage-and-value-to-be-the-same.patch
new file mode 100644 (file)
index 0000000..ba7eb22
--- /dev/null
@@ -0,0 +1,57 @@
+From ed9be64eefe26d7d8b0b5b9fa3ffdf425d87a01f Mon Sep 17 00:00:00 2001
+From: Will McVicker <willmcvicker@google.com>
+Date: Sat, 5 Dec 2020 00:48:48 +0000
+Subject: HID: make arrays usage and value to be the same
+
+From: Will McVicker <willmcvicker@google.com>
+
+commit ed9be64eefe26d7d8b0b5b9fa3ffdf425d87a01f upstream.
+
+The HID subsystem allows an "HID report field" to have a different
+number of "values" and "usages" when it is allocated. When a field
+struct is created, the size of the usage array is guaranteed to be at
+least as large as the values array, but it may be larger. This leads to
+a potential out-of-bounds write in
+__hidinput_change_resolution_multipliers() and an out-of-bounds read in
+hidinput_count_leds().
+
+To fix this, let's make sure that both the usage and value arrays are
+the same size.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Will McVicker <willmcvicker@google.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hid/hid-core.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -93,7 +93,7 @@ EXPORT_SYMBOL_GPL(hid_register_report);
+  * Register a new field for this report.
+  */
+-static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages, unsigned values)
++static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages)
+ {
+       struct hid_field *field;
+@@ -104,7 +104,7 @@ static struct hid_field *hid_register_fi
+       field = kzalloc((sizeof(struct hid_field) +
+                        usages * sizeof(struct hid_usage) +
+-                       values * sizeof(unsigned)), GFP_KERNEL);
++                       usages * sizeof(unsigned)), GFP_KERNEL);
+       if (!field)
+               return NULL;
+@@ -300,7 +300,7 @@ static int hid_add_field(struct hid_pars
+       usages = max_t(unsigned, parser->local.usage_index,
+                                parser->global.report_count);
+-      field = hid_register_field(report, usages, parser->global.report_count);
++      field = hid_register_field(report, usages);
+       if (!field)
+               return 0;
diff --git a/queue-4.19/usb-quirks-add-quirk-to-start-video-capture-on-elmo-l-12f-document-camera-reliable.patch b/queue-4.19/usb-quirks-add-quirk-to-start-video-capture-on-elmo-l-12f-document-camera-reliable.patch
new file mode 100644 (file)
index 0000000..6c62fa0
--- /dev/null
@@ -0,0 +1,33 @@
+From 1ebe718bb48278105816ba03a0408ecc2d6cf47f Mon Sep 17 00:00:00 2001
+From: Stefan Ursella <stefan.ursella@wolfvision.net>
+Date: Wed, 10 Feb 2021 15:07:11 +0100
+Subject: usb: quirks: add quirk to start video capture on ELMO L-12F document camera reliable
+
+From: Stefan Ursella <stefan.ursella@wolfvision.net>
+
+commit 1ebe718bb48278105816ba03a0408ecc2d6cf47f upstream.
+
+Without this quirk starting a video capture from the device often fails with
+
+kernel: uvcvideo: Failed to set UVC probe control : -110 (exp. 34).
+
+Signed-off-by: Stefan Ursella <stefan.ursella@wolfvision.net>
+Link: https://lore.kernel.org/r/20210210140713.18711-1-stefan.ursella@wolfvision.net
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/quirks.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -391,6 +391,9 @@ static const struct usb_device_id usb_qu
+       /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */
+       { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF },
++      /* ELMO L-12F document camera */
++      { USB_DEVICE(0x09a1, 0x0028), .driver_info = USB_QUIRK_DELAY_CTRL_MSG },
++
+       /* Broadcom BCM92035DGROM BT dongle */
+       { USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME },
diff --git a/queue-4.19/usb-quirks-sort-quirk-entries.patch b/queue-4.19/usb-quirks-sort-quirk-entries.patch
new file mode 100644 (file)
index 0000000..82936ca
--- /dev/null
@@ -0,0 +1,42 @@
+From 43861d29c0810a70792bf69d37482efb7bb6677d Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 10 Feb 2021 12:17:46 +0100
+Subject: USB: quirks: sort quirk entries
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 43861d29c0810a70792bf69d37482efb7bb6677d upstream.
+
+Move the last entry to its proper place to maintain the VID/PID sort
+order.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Link: https://lore.kernel.org/r/20210210111746.13360-1-johan@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/quirks.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -415,6 +415,9 @@ static const struct usb_device_id usb_qu
+       { USB_DEVICE(0x10d6, 0x2200), .driver_info =
+                       USB_QUIRK_STRING_FETCH_255 },
++      /* novation SoundControl XL */
++      { USB_DEVICE(0x1235, 0x0061), .driver_info = USB_QUIRK_RESET_RESUME },
++
+       /* Huawei 4G LTE module */
+       { USB_DEVICE(0x12d1, 0x15bb), .driver_info =
+                       USB_QUIRK_DISCONNECT_SUSPEND },
+@@ -495,9 +498,6 @@ static const struct usb_device_id usb_qu
+       /* INTEL VALUE SSD */
+       { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
+-      /* novation SoundControl XL */
+-      { USB_DEVICE(0x1235, 0x0061), .driver_info = USB_QUIRK_RESET_RESUME },
+-
+       { }  /* terminating entry must be last */
+ };