public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [usb?] WARNING in gl861_ctrl_msg/usb_submit_urb
@ 2025-04-24 21:39 syzbot
  2025-04-26 13:13 ` Nikita Zhandarovich
  2025-05-19 15:56 ` Nikita Zhandarovich
  0 siblings, 2 replies; 4+ messages in thread
From: syzbot @ 2025-04-24 21:39 UTC (permalink / raw)
  To: gregkh, linux-kernel, linux-usb, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    6fea5fabd332 Merge tag 'mm-hotfixes-stable-2025-04-19-21-2..
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=15240ccc580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=68d9f79fc685cd4
dashboard link: https://syzkaller.appspot.com/bug?extid=721071c10f3c7e4e5dcb
compiler:       Debian clang version 15.0.6, Debian LLD 15.0.6
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1669cc70580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=10489ccc580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/796861732b0e/disk-6fea5fab.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/00255924cbaa/vmlinux-6fea5fab.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9a955adbead1/bzImage-6fea5fab.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+721071c10f3c7e4e5dcb@syzkaller.appspotmail.com

------------[ cut here ]------------
usb 2-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType c0
WARNING: CPU: 0 PID: 5845 at drivers/usb/core/urb.c:413 usb_submit_urb+0x11dd/0x18c0 drivers/usb/core/urb.c:411
Modules linked in:
CPU: 0 UID: 0 PID: 5845 Comm: syz-executor566 Not tainted 6.15.0-rc2-syzkaller-00488-g6fea5fabd332 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:usb_submit_urb+0x11dd/0x18c0 drivers/usb/core/urb.c:411
Code: 48 8b 4c 24 08 0f b6 04 01 84 c0 0f 85 52 05 00 00 45 0f b6 07 48 c7 c7 a0 59 f2 8c 4c 89 f6 48 89 da 89 e9 e8 64 c2 f1 f9 90 <0f> 0b 90 90 e9 c7 f3 ff ff 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 53
RSP: 0018:ffffc900040df748 EFLAGS: 00010246
RAX: a1ba001046e4b900 RBX: ffff88801e2f6cc0 RCX: ffff888027a31e00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000080000280 R08: ffffffff818218d2 R09: 1ffff9200081be84
R10: dffffc0000000000 R11: fffff5200081be85 R12: ffff8881453e30b0
R13: ffff88801e6c1b00 R14: ffffffff8cf2c440 R15: ffff8880206cf7c0
FS:  000055558e0e4380(0000) GS:ffff888124f9a000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000558df9b18050 CR3: 00000000326be000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 usb_start_wait_urb+0x11a/0x530 drivers/usb/core/message.c:59
 usb_internal_control_msg drivers/usb/core/message.c:103 [inline]
 usb_control_msg+0x2b3/0x4c0 drivers/usb/core/message.c:154
 gl861_ctrl_msg+0x332/0x6f0 drivers/media/usb/dvb-usb-v2/gl861.c:58
 gl861_i2c_master_xfer+0x3b4/0x650 drivers/media/usb/dvb-usb-v2/gl861.c:144
 __i2c_transfer+0x859/0x2250 drivers/i2c/i2c-core-base.c:-1
 i2c_transfer+0x2c2/0x430 drivers/i2c/i2c-core-base.c:2315
 i2cdev_ioctl_rdwr+0x488/0x780 drivers/i2c/i2c-dev.c:306
 i2cdev_ioctl+0x78a/0xa20 drivers/i2c/i2c-dev.c:467
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:906 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:892
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf3/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f83d3039529
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffa9feff58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000200000000000 RCX: 00007f83d3039529
RDX: 0000200000002580 RSI: 0000000000000707 RDI: 0000000000000004
RBP: 00000000000f4240 R08: 00232d6332692f76 R09: 00000000000000a0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001
R13: 00007fffa9ff0178 R14: 00007fffa9feff80 R15: 00007fffa9feff70
 </TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [usb?] WARNING in gl861_ctrl_msg/usb_submit_urb
  2025-04-24 21:39 [syzbot] [usb?] WARNING in gl861_ctrl_msg/usb_submit_urb syzbot
@ 2025-04-26 13:13 ` Nikita Zhandarovich
  2025-05-19 15:56 ` Nikita Zhandarovich
  1 sibling, 0 replies; 4+ messages in thread
From: Nikita Zhandarovich @ 2025-04-26 13:13 UTC (permalink / raw)
  To: syzbot
  Cc: Nikita Zhandarovich, syzkaller-bugs, linux-kernel, linux-usb,
	Wolfram Sang, Alan Stern

Hi,

> ------------[ cut here ]------------
> usb 2-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType c0
> WARNING: CPU: 0 PID: 5845 at drivers/usb/core/urb.c:413 usb_submit_urb+0x11dd/0x18c0 drivers/usb/core/urb.c:411
> Modules linked in:
> CPU: 0 UID: 0 PID: 5845 Comm: syz-executor566 Not tainted 6.15.0-rc2-syzkaller-00488-g6fea5fabd332 #0 PREEMPT(full) 
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
> RIP: 0010:usb_submit_urb+0x11dd/0x18c0 drivers/usb/core/urb.c:411
> ...
> Call Trace:
>  <TASK>
>  usb_start_wait_urb+0x11a/0x530 drivers/usb/core/message.c:59
>  usb_internal_control_msg drivers/usb/core/message.c:103 [inline]
>  usb_control_msg+0x2b3/0x4c0 drivers/usb/core/message.c:154
>  gl861_ctrl_msg+0x332/0x6f0 drivers/media/usb/dvb-usb-v2/gl861.c:58
>  gl861_i2c_master_xfer+0x3b4/0x650 drivers/media/usb/dvb-usb-v2/gl861.c:144
>  __i2c_transfer+0x859/0x2250 drivers/i2c/i2c-core-base.c:-1
> ...

This issue seems similar to another one [1], syzkaller managing to
craft a I2C transfer request with 0-length read message. That
request is moved to 0-length USB read request, which is forbidden.

Alan suggested a fix [2] to issue [1]. I guess it makes sense to
do something similar here as well. Unless there is a consensus
about checking for such cases deeper in I2C core?

[1] https://syzkaller.appspot.com/bug?extid=c38e5e60d0041a99dbf5
[2] https://lore.kernel.org/all/c7f67d3b-f1e6-4d68-99aa-e462fdcb315f@rowland.harvard.edu/


Regards,
Nikita




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [usb?] WARNING in gl861_ctrl_msg/usb_submit_urb
  2025-04-24 21:39 [syzbot] [usb?] WARNING in gl861_ctrl_msg/usb_submit_urb syzbot
  2025-04-26 13:13 ` Nikita Zhandarovich
@ 2025-05-19 15:56 ` Nikita Zhandarovich
  2025-05-19 20:17   ` syzbot
  1 sibling, 1 reply; 4+ messages in thread
From: Nikita Zhandarovich @ 2025-05-19 15:56 UTC (permalink / raw)
  To: syzbot+721071c10f3c7e4e5dcb
  Cc: Nikita Zhandarovich, syzkaller-bugs, linux-kernel

#syz test

---
 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
index f1c79f351ec8..5c76116fd565 100644
--- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
+++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
@@ -19,6 +19,10 @@ module_param_named(force_pid_filter_usage, dvb_usb_force_pid_filter_usage,
 MODULE_PARM_DESC(force_pid_filter_usage,
 		"force all DVB USB devices to use a PID filter, if any (default: 0)");
 
+static const struct i2c_adapter_quirks i2c_usb_quirks = {
+	.flags = I2C_AQ_NO_ZERO_LEN_READ,
+};
+
 static int dvb_usbv2_download_firmware(struct dvb_usb_device *d,
 		const char *name)
 {
@@ -63,6 +67,7 @@ static int dvb_usbv2_i2c_init(struct dvb_usb_device *d)
 
 	strscpy(d->i2c_adap.name, d->name, sizeof(d->i2c_adap.name));
 	d->i2c_adap.algo = d->props->i2c_algo;
+	d->i2c_adap.quirks = &i2c_usb_quirks;
 	d->i2c_adap.dev.parent = &d->udev->dev;
 	i2c_set_adapdata(&d->i2c_adap, d);
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [syzbot] [usb?] WARNING in gl861_ctrl_msg/usb_submit_urb
  2025-05-19 15:56 ` Nikita Zhandarovich
@ 2025-05-19 20:17   ` syzbot
  0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2025-05-19 20:17 UTC (permalink / raw)
  To: linux-kernel, n.zhandarovich, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+721071c10f3c7e4e5dcb@syzkaller.appspotmail.com
Tested-by: syzbot+721071c10f3c7e4e5dcb@syzkaller.appspotmail.com

Tested on:

commit:         a5806cd5 Linux 6.15-rc7
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1208d2d4580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=2985a126e936c276
dashboard link: https://syzkaller.appspot.com/bug?extid=721071c10f3c7e4e5dcb
compiler:       Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2
patch:          https://syzkaller.appspot.com/x/patch.diff?x=10bf21f4580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-19 20:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24 21:39 [syzbot] [usb?] WARNING in gl861_ctrl_msg/usb_submit_urb syzbot
2025-04-26 13:13 ` Nikita Zhandarovich
2025-05-19 15:56 ` Nikita Zhandarovich
2025-05-19 20:17   ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox