<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/hid/hid-thrustmaster.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-05-22T12:29:38+00:00</updated>
<entry>
<title>HID: thrustmaster: fix memory leak in thrustmaster_interrupts()</title>
<updated>2025-05-22T12:29:38+00:00</updated>
<author>
<name>Qasim Ijaz</name>
<email>qasdev00@gmail.com</email>
</author>
<published>2025-03-27T23:11:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a6999953707a9c63cbddbef8eb74bf20cde18f67'/>
<id>urn:sha1:a6999953707a9c63cbddbef8eb74bf20cde18f67</id>
<content type='text'>
[ Upstream commit 09d546303b370113323bfff456c4e8cff8756005 ]

In thrustmaster_interrupts(), the allocated send_buf is not
freed if the usb_check_int_endpoints() check fails, leading
to a memory leak.

Fix this by ensuring send_buf is freed before returning in
the error path.

Fixes: 50420d7c79c3 ("HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check")
Signed-off-by: Qasim Ijaz &lt;qasdev00@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: hid-thrustmaster: fix stack-out-of-bounds read in usb_check_int_endpoints()</title>
<updated>2025-02-21T13:01:15+00:00</updated>
<author>
<name>Tulio Fernandes</name>
<email>tuliomf09@gmail.com</email>
</author>
<published>2025-02-05T21:50:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdd9a1ea23ff1a272547217100663e8de4eada40'/>
<id>urn:sha1:cdd9a1ea23ff1a272547217100663e8de4eada40</id>
<content type='text'>
[ Upstream commit 0b43d98ff29be3144e86294486b1373b5df74c0e ]

Syzbot[1] has detected a stack-out-of-bounds read of the ep_addr array from
hid-thrustmaster driver. This array is passed to usb_check_int_endpoints
function from usb.c core driver, which executes a for loop that iterates
over the elements of the passed array. Not finding a null element at the end of
the array, it tries to read the next, non-existent element, crashing the kernel.

To fix this, a 0 element was added at the end of the array to break the for
loop.

[1] https://syzkaller.appspot.com/bug?extid=9c9179ac46169c56c1ad

Reported-by: syzbot+9c9179ac46169c56c1ad@syzkaller.appspotmail.com
Fixes: 50420d7c79c3 ("HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check")
Signed-off-by: Túlio Fernandes &lt;tuliomf09@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check</title>
<updated>2025-02-08T08:57:11+00:00</updated>
<author>
<name>Karol Przybylski</name>
<email>karprzy7@gmail.com</email>
</author>
<published>2024-12-05T22:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5bcae4212a6a4b4204f46a1b8bcba08909d2007'/>
<id>urn:sha1:e5bcae4212a6a4b4204f46a1b8bcba08909d2007</id>
<content type='text'>
[ 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@syzkaller.appspotmail.com
Tested-by: syzbot+040e8b3db6a96908d470@syzkaller.appspotmail.com
Signed-off-by: Karol Przybylski &lt;karprzy7@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: thrustmaster: Add sparco wheel and fix array length</title>
<updated>2022-08-25T09:38:55+00:00</updated>
<author>
<name>Michael Hübner</name>
<email>michaelh.95@t-online.de</email>
</author>
<published>2022-08-05T08:05:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d9a17651f3749e69890db57ca66e677dfee70829'/>
<id>urn:sha1:d9a17651f3749e69890db57ca66e677dfee70829</id>
<content type='text'>
Add device id for the Sparco R383 Mod wheel.

Fix wheel info array length to match actual wheel count present in the array.

Signed-off-by: Michael Hübner &lt;michaelh.95@t-online.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: hid-thrustmaster: fix OOB read in thrustmaster_interrupts</title>
<updated>2022-02-21T08:15:10+00:00</updated>
<author>
<name>Pavel Skripkin</name>
<email>paskripkin@gmail.com</email>
</author>
<published>2022-02-20T16:01:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc3ef2e3297b3c0e2006b5d7b3d66965e3392036'/>
<id>urn:sha1:fc3ef2e3297b3c0e2006b5d7b3d66965e3392036</id>
<content type='text'>
Syzbot reported an slab-out-of-bounds Read in thrustmaster_probe() bug.
The root case is in missing validation check of actual number of endpoints.

Code should not blindly access usb_host_interface::endpoint array, since
it may contain less endpoints than code expects.

Fix it by adding missing validaion check and print an error if
number of endpoints do not match expected number

Fixes: c49c33637802 ("HID: support for initialization of some Thrustmaster wheels")
Reported-and-tested-by: syzbot+35eebd505e97d315d01c@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin &lt;paskripkin@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: Add support for open wheel and no attachment to T300</title>
<updated>2022-02-16T16:09:33+00:00</updated>
<author>
<name>Michael Hübner</name>
<email>michaelh.95@t-online.de</email>
</author>
<published>2022-01-20T07:40:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0a5a587501b54e8c6d86960b047d4491fd40dcf2'/>
<id>urn:sha1:0a5a587501b54e8c6d86960b047d4491fd40dcf2</id>
<content type='text'>
Different add ons to the wheel base report different models. Having
no wheel mounted to the base and using the open wheel attachment is
added here.

Signed-off-by: Michael Hübner &lt;michaelh.95@t-online.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: check for valid USB device for many HID drivers</title>
<updated>2021-12-02T14:36:18+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2021-12-01T18:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=93020953d0fa7035fd036ad87a47ae2b7aa4ae33'/>
<id>urn:sha1:93020953d0fa7035fd036ad87a47ae2b7aa4ae33</id>
<content type='text'>
Many HID drivers assume that the HID device assigned to them is a USB
device as that was the only way HID devices used to be able to be
created in Linux.  However, with the additional ways that HID devices
can be created for many different bus types, that is no longer true, so
properly check that we have a USB device associated with the HID device
before allowing a driver that makes this assumption to claim it.

Cc: Jiri Kosina &lt;jikos@kernel.org&gt;
Cc: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Cc: Michael Zaidman &lt;michael.zaidman@gmail.com&gt;
Cc: Stefan Achatz &lt;erazor_de@users.sourceforge.net&gt;
Cc: Maxime Coquelin &lt;mcoquelin.stm32@gmail.com&gt;
Cc: Alexandre Torgue &lt;alexandre.torgue@foss.st.com&gt;
Cc: linux-input@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
[bentiss: amended for thrustmater.c hunk to apply]
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Link: https://lore.kernel.org/r/20211201183503.2373082-3-gregkh@linuxfoundation.org
</content>
</entry>
<entry>
<title>HID: thrustmaster: fix sparse warnings</title>
<updated>2021-11-19T14:53:31+00:00</updated>
<author>
<name>Vihas Mak</name>
<email>makvihas@gmail.com</email>
</author>
<published>2021-11-13T20:04:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa48020c9fae2872f7bf8f38e09f73eb61fdb4ce'/>
<id>urn:sha1:fa48020c9fae2872f7bf8f38e09f73eb61fdb4ce</id>
<content type='text'>
Changed 0 to NULL to fix following sparse warnings:

    drivers/hid/hid-thrustmaster.c:208:43: warning: Using plain integer as NULL pointer
    drivers/hid/hid-thrustmaster.c:241:17: warning: Using plain integer as NULL pointer
    drivers/hid/hid-thrustmaster.c:275:37: warning: Using plain integer as NULL pointer

Signed-off-by: Vihas Mak &lt;makvihas@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: thrustmaster: Fix memory leak in thrustmaster_interrupts()</title>
<updated>2021-08-20T12:24:57+00:00</updated>
<author>
<name>Evgeny Novikov</name>
<email>novikov@ispras.ru</email>
</author>
<published>2021-07-30T16:53:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c3800eed22d21c66912b4461a403b4448ed88d95'/>
<id>urn:sha1:c3800eed22d21c66912b4461a403b4448ed88d95</id>
<content type='text'>
thrustmaster_interrupts() does not free memory for send_buf when
usb_interrupt_msg() fails. This is fixed by the given patch.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov &lt;novikov@ispras.ru&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: thrustmaster: Fix memory leak in remove</title>
<updated>2021-08-20T12:24:57+00:00</updated>
<author>
<name>Evgeny Novikov</name>
<email>novikov@ispras.ru</email>
</author>
<published>2021-07-30T16:51:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df3a97bdbc252d3421f1c5d6d713ad6e4f36a469'/>
<id>urn:sha1:df3a97bdbc252d3421f1c5d6d713ad6e4f36a469</id>
<content type='text'>
thrustmaster_remove() does not release memory for
tm_wheel-&gt;change_request. This is fixed by the patch.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov &lt;novikov@ispras.ru&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
