Patch "HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hid-hid-thrustmaster-fix-warning-in-thrustmaster_pro.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b3e406b75986fca2664219378a64acf35f0b5bd1
Author: Karol Przybylski <karprzy7@xxxxxxxxx>
Date:   Thu Dec 5 23:22:21 2024 +0100

    HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check
    
    [ Upstream commit 50420d7c79c37a3efe4010ff9b1bb14bc61ebccf ]
    
    syzbot has found a type mismatch between a USB pipe and the transfer
    endpoint, which is triggered by the hid-thrustmaster driver[1].
    There is a number of similar, already fixed issues [2].
    In this case as in others, implementing check for endpoint type fixes the issue.
    
    [1] https://syzkaller.appspot.com/bug?extid=040e8b3db6a96908d470
    [2] https://syzkaller.appspot.com/bug?extid=348331f63b034f89b622
    
    Fixes: c49c33637802 ("HID: support for initialization of some Thrustmaster wheels")
    Reported-by: syzbot+040e8b3db6a96908d470@xxxxxxxxxxxxxxxxxxxxxxxxx
    Tested-by: syzbot+040e8b3db6a96908d470@xxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Karol Przybylski <karprzy7@xxxxxxxxx>
    Signed-off-by: Jiri Kosina <jkosina@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c
index cf1679b0d4fbb..6c3e758bbb09e 100644
--- a/drivers/hid/hid-thrustmaster.c
+++ b/drivers/hid/hid-thrustmaster.c
@@ -170,6 +170,14 @@ static void thrustmaster_interrupts(struct hid_device *hdev)
 	ep = &usbif->cur_altsetting->endpoint[1];
 	b_ep = ep->desc.bEndpointAddress;
 
+	/* Are the expected endpoints present? */
+	u8 ep_addr[1] = {b_ep};
+
+	if (!usb_check_int_endpoints(usbif, ep_addr)) {
+		hid_err(hdev, "Unexpected non-int endpoint\n");
+		return;
+	}
+
 	for (i = 0; i < ARRAY_SIZE(setup_arr); ++i) {
 		memcpy(send_buf, setup_arr[i], setup_arr_sizes[i]);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux