<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/atm, branch v6.1.124</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.124</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.124'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-07-05T07:31:55+00:00</updated>
<entry>
<title>usb: atm: cxacru: fix endpoint checking in cxacru_bind()</title>
<updated>2024-07-05T07:31:55+00:00</updated>
<author>
<name>Nikita Zhandarovich</name>
<email>n.zhandarovich@fintech.ru</email>
</author>
<published>2024-06-09T13:15:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5584c776a1af7807ca815ee6265f2c1429fc5727'/>
<id>urn:sha1:5584c776a1af7807ca815ee6265f2c1429fc5727</id>
<content type='text'>
commit 2eabb655a968b862bc0c31629a09f0fbf3c80d51 upstream.

Syzbot is still reporting quite an old issue [1] that occurs due to
incomplete checking of present usb endpoints. As such, wrong
endpoints types may be used at urb sumbitting stage which in turn
triggers a warning in usb_submit_urb().

Fix the issue by verifying that required endpoint types are present
for both in and out endpoints, taking into account cmd endpoint type.

Unfortunately, this patch has not been tested on real hardware.

[1] Syzbot report:
usb 1-1: BOGUS urb xfer, pipe 1 != type 3
WARNING: CPU: 0 PID: 8667 at drivers/usb/core/urb.c:502 usb_submit_urb+0xed2/0x18a0 drivers/usb/core/urb.c:502
Modules linked in:
CPU: 0 PID: 8667 Comm: kworker/0:4 Not tainted 5.14.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
RIP: 0010:usb_submit_urb+0xed2/0x18a0 drivers/usb/core/urb.c:502
...
Call Trace:
 cxacru_cm+0x3c0/0x8e0 drivers/usb/atm/cxacru.c:649
 cxacru_card_status+0x22/0xd0 drivers/usb/atm/cxacru.c:760
 cxacru_bind+0x7ac/0x11a0 drivers/usb/atm/cxacru.c:1209
 usbatm_usb_probe+0x321/0x1ae0 drivers/usb/atm/usbatm.c:1055
 cxacru_usb_probe+0xdf/0x1e0 drivers/usb/atm/cxacru.c:1363
 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396
 call_driver_probe drivers/base/dd.c:517 [inline]
 really_probe+0x23c/0xcd0 drivers/base/dd.c:595
 __driver_probe_device+0x338/0x4d0 drivers/base/dd.c:747
 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:777
 __device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:894
 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
 __device_attach+0x228/0x4a0 drivers/base/dd.c:965
 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
 device_add+0xc2f/0x2180 drivers/base/core.c:3354
 usb_set_configuration+0x113a/0x1910 drivers/usb/core/message.c:2170
 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238
 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293

Reported-and-tested-by: syzbot+00c18ee8497dd3be6ade@syzkaller.appspotmail.com
Fixes: 902ffc3c707c ("USB: cxacru: Use a bulk/int URB to access the command endpoint")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Nikita Zhandarovich &lt;n.zhandarovich@fintech.ru&gt;
Link: https://lore.kernel.org/r/20240609131546.3932-1-n.zhandarovich@fintech.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: move from strlcpy with unused retval to strscpy</title>
<updated>2022-08-19T09:08:54+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2022-08-18T21:01:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b7db5733a5ace9acc1f3104c9050c5aa1363f13b'/>
<id>urn:sha1:b7db5733a5ace9acc1f3104c9050c5aa1363f13b</id>
<content type='text'>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Reviewed-by: Richard Leitner &lt;richard.leitner@skidata.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Link: https://lore.kernel.org/r/20220818210116.7517-1-wsa+renesas@sang-engineering.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb/atm: fix repeated words in comments</title>
<updated>2022-07-27T12:32:20+00:00</updated>
<author>
<name>Jilin Yuan</name>
<email>yuanjilin@cdjrlc.com</email>
</author>
<published>2022-07-16T13:13:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86c4bb4f124eec79423b90ef138402bf0b809bce'/>
<id>urn:sha1:86c4bb4f124eec79423b90ef138402bf0b809bce</id>
<content type='text'>
 Delete the redundant word 'was'.

Signed-off-by: Jilin Yuan &lt;yuanjilin@cdjrlc.com&gt;
Link: https://lore.kernel.org/r/20220716131312.31767-1-yuanjilin@cdjrlc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: remove third argument of usb_maxpacket()</title>
<updated>2022-04-23T08:33:53+00:00</updated>
<author>
<name>Vincent Mailhol</name>
<email>mailhol.vincent@wanadoo.fr</email>
</author>
<published>2022-03-17T03:55:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dcd2e49b550e928164ccefb5bdf90988ed4df00e'/>
<id>urn:sha1:dcd2e49b550e928164ccefb5bdf90988ed4df00e</id>
<content type='text'>
The third argument of usb_maxpacket(): in_out has been deprecated
because it could be derived from the second argument (e.g. using
usb_pipeout(pipe)).

N.B. function usb_maxpacket() was made variadic to accommodate the
transition from the old prototype with three arguments to the new one
with only two arguments (so that no renaming is needed). The variadic
argument is to be removed once all users of usb_maxpacket() get
migrated.

CC: Duncan Sands &lt;duncan.sands@free.fr&gt;
CC: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: Olav Kongas &lt;ok@artecdesign.ee&gt;
CC: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Signed-off-by: Vincent Mailhol &lt;mailhol.vincent@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/20220317035514.6378-7-mailhol.vincent@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>exit: Rename complete_and_exit to kthread_complete_and_exit</title>
<updated>2021-12-13T18:04:45+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2021-11-22T17:15:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cead18552660702a4a46f58e65188fe5f36e9dfe'/>
<id>urn:sha1:cead18552660702a4a46f58e65188fe5f36e9dfe</id>
<content type='text'>
Update complete_and_exit to call kthread_exit instead of do_exit.

Change the name to reflect this change in functionality.  All of the
users of complete_and_exit are causing the current kthread to exit so
this change makes it clear what is happening.

Move the implementation of kthread_complete_and_exit from
kernel/exit.c to to kernel/kthread.c.  As this function is kthread
specific it makes most sense to live with the kthread functions.

There are no functional change.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>usb: atm: Use struct_size() helper</title>
<updated>2021-10-05T10:50:22+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2021-09-28T23:39:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b626871a7cda136fc88c11c486c2f87df59d0dee'/>
<id>urn:sha1:b626871a7cda136fc88c11c486c2f87df59d0dee</id>
<content type='text'>
Make use of the struct_size() helper instead of an open-coded version,
in order to avoid any potential type mistakes or integer overflows that,
in the worse scenario, could lead to heap overflows.

Link: https://github.com/KSPP/linux/issues/160
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Link: https://lore.kernel.org/r/20210928233935.GA299525@embeddedor
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: atm: cxacru: Fix typo in comment</title>
<updated>2021-05-21T18:05:40+00:00</updated>
<author>
<name>zuoqilin</name>
<email>zuoqilin@yulong.com</email>
</author>
<published>2021-05-21T09:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b274e2a44e163461a11e5e19e4ad405062cbf3b4'/>
<id>urn:sha1:b274e2a44e163461a11e5e19e4ad405062cbf3b4</id>
<content type='text'>
Change 'contol' to 'control'.

Signed-off-by: zuoqilin &lt;zuoqilin@yulong.com&gt;
Link: https://lore.kernel.org/r/20210521095804.773-1-zuoqilin1@163.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: usb: atm: use pr_err() and pr_warn() instead of raw printk()</title>
<updated>2020-12-09T14:22:51+00:00</updated>
<author>
<name>Enrico Weigelt, metux IT consult</name>
<email>info@metux.net</email>
</author>
<published>2020-12-08T09:32:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba7052f52c13a6feeced5adbb906b6b7ef7efab8'/>
<id>urn:sha1:ba7052f52c13a6feeced5adbb906b6b7ef7efab8</id>
<content type='text'>
Since we have the nice helpers pr_err() and pr_warn(), use them instead
of raw printk().

Acked-by: Duncan Sands &lt;duncan.sands@free.fr&gt;
Signed-off-by: Enrico Weigelt, metux IT consult &lt;info@metux.net&gt;
Link: https://lore.kernel.org/r/20201208093206.24780-3-info@metux.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: usb: atm: use atm_info() instead of atm_printk(KERN_INFO ...</title>
<updated>2020-12-09T14:22:51+00:00</updated>
<author>
<name>Enrico Weigelt, metux IT consult</name>
<email>info@metux.net</email>
</author>
<published>2020-12-08T09:32:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d4e3866b7656268a04f518a7feb2c4698d8b899'/>
<id>urn:sha1:6d4e3866b7656268a04f518a7feb2c4698d8b899</id>
<content type='text'>
Since we already have the useful atm_info() macro, use it instead of
raw atm_printk()

Signed-off-by: Enrico Weigelt, metux IT consult &lt;info@metux.net&gt;
Link: https://lore.kernel.org/r/20201208093206.24780-2-info@metux.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: usb: atm: reduce noise</title>
<updated>2020-12-09T14:22:51+00:00</updated>
<author>
<name>Enrico Weigelt, metux IT consult</name>
<email>info@metux.net</email>
</author>
<published>2020-12-08T09:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3291eb7329b1c999f952f7d84f9d716b65d235cf'/>
<id>urn:sha1:3291eb7329b1c999f952f7d84f9d716b65d235cf</id>
<content type='text'>
If drivers work correctly, they should remain silent.

Signed-off-by: Enrico Weigelt, metux IT consult &lt;info@metux.net&gt;
Link: https://lore.kernel.org/r/20201208093206.24780-1-info@metux.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
