[syzbot] [usb?] WARNING in dtv5100_i2c_msg/usb_submit_urb

5 views
Skip to first unread message

syzbot

unread,
May 22, 2025, 2:36:38 AM5/22/25
to gre...@linuxfoundation.org, linux-...@vger.kernel.org, linu...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 5723cc3450bc Merge tag 'dmaengine-fix-6.15' of git://git.k..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=176c5f68580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c3f0e807ec5d1268
dashboard link: https://syzkaller.appspot.com/bug?extid=0335df380edd9bd3ff70
compiler: Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0539c6646d88/disk-5723cc34.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3e53f83634f7/vmlinux-5723cc34.xz
kernel image: https://storage.googleapis.com/syzbot-assets/23a89b974355/bzImage-5723cc34.xz

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

------------[ cut here ]------------
usb 3-1: BOGUS control dir, pipe 80006980 doesn't match bRequestType c0
WARNING: CPU: 0 PID: 15834 at drivers/usb/core/urb.c:413 usb_submit_urb+0x1112/0x1870 drivers/usb/core/urb.c:411
Modules linked in:
CPU: 0 UID: 0 PID: 15834 Comm: syz.3.2930 Not tainted 6.15.0-rc6-syzkaller-00346-g5723cc3450bc #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:usb_submit_urb+0x1112/0x1870 drivers/usb/core/urb.c:411
Code: 0f b6 44 05 00 84 c0 0f 85 38 06 00 00 45 0f b6 04 24 48 c7 c7 00 86 12 8c 48 8b 74 24 18 4c 89 fa 44 89 f1 e8 5f f7 6e fa 90 <0f> 0b 90 90 49 bd 00 00 00 00 00 fc ff df e9 2b f4 ff ff 89 e9 80
RSP: 0018:ffffc90004b3f610 EFLAGS: 00010246
RAX: f5838b6742b91e00 RBX: ffff88801ff35300 RCX: 0000000000080000
RDX: ffffc90010c7f000 RSI: 0000000000004945 RDI: 0000000000004946
RBP: 1ffff11003fd2d6c R08: ffff8880b8923e93 R09: 1ffff110171247d2
R10: dffffc0000000000 R11: ffffed10171247d3 R12: ffff88801fe96b60
R13: dffffc0000000000 R14: 0000000080006980 R15: ffff8881422eaa60
FS: 00007f2867dba6c0(0000) GS:ffff8881260c2000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2867d99d58 CR3: 0000000067e32000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
usb_start_wait_urb+0x114/0x4c0 drivers/usb/core/message.c:59
usb_internal_control_msg drivers/usb/core/message.c:103 [inline]
usb_control_msg+0x232/0x3e0 drivers/usb/core/message.c:154
dtv5100_i2c_msg+0x250/0x330 drivers/media/usb/dvb-usb/dtv5100.c:60
dtv5100_i2c_xfer+0x1a4/0x3c0 drivers/media/usb/dvb-usb/dtv5100.c:86
__i2c_transfer+0x871/0x2170 drivers/i2c/i2c-core-base.c:-1
i2c_transfer+0x25b/0x3a0 drivers/i2c/i2c-core-base.c:2315
i2c_transfer_buffer_flags+0x105/0x190 drivers/i2c/i2c-core-base.c:2343
i2c_master_send include/linux/i2c.h:109 [inline]
i2cdev_write+0x112/0x1b0 drivers/i2c/i2c-dev.c:183
do_loop_readv_writev include/linux/uio.h:-1 [inline]
vfs_writev+0x4a5/0x9a0 fs/read_write.c:1057
do_writev+0x14d/0x2d0 fs/read_write.c:1101
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2866f8e969
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2867dba038 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007f28671b5fa0 RCX: 00007f2866f8e969
RDX: 0000000000000001 RSI: 00002000000012c0 RDI: 0000000000000005
RBP: 00007f2867010ab1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f28671b5fa0 R15: 00007f28672dfa28
</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 syzk...@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 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

syzbot

unread,
May 26, 2025, 10:02:32 PM5/26/25
to gre...@linuxfoundation.org, linux-...@vger.kernel.org, linu...@vger.kernel.org, syzkall...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 0ff41df1cb26 Linux 6.15
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=15245df4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=23c237720c19259f
dashboard link: https://syzkaller.appspot.com/bug?extid=0335df380edd9bd3ff70
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16e4cdf4580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11e07882580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ddad0afe528e/disk-0ff41df1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1e3cda1e4903/vmlinux-0ff41df1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/65288d07516b/bzImage-0ff41df1.xz

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

------------[ cut here ]------------
usb 1-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType c0
WARNING: CPU: 0 PID: 5833 at drivers/usb/core/urb.c:413 usb_submit_urb+0x1112/0x1870 drivers/usb/core/urb.c:411
Modules linked in:
CPU: 0 UID: 0 PID: 5833 Comm: syz-executor411 Not tainted 6.15.0-syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:usb_submit_urb+0x1112/0x1870 drivers/usb/core/urb.c:411
Code: 0f b6 44 05 00 84 c0 0f 85 38 06 00 00 45 0f b6 04 24 48 c7 c7 a0 87 12 8c 48 8b 74 24 18 4c 89 fa 44 89 f1 e8 df db 6e fa 90 <0f> 0b 90 90 49 bd 00 00 00 00 00 fc ff df e9 2b f4 ff ff 89 e9 80
RSP: 0018:ffffc9000440f610 EFLAGS: 00010246
RAX: eecd5c38d4424c00 RBX: ffff888021eac200 RCX: ffff888033e81e00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000002
RBP: 1ffff1100435d80c R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff1bba984 R12: ffff888021aec060
R13: dffffc0000000000 R14: 0000000080000280 R15: ffff888028cb5dc0
FS: 000055555d4a6380(0000) GS:ffff8881260c2000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd4d4ed1140 CR3: 00000000779d6000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
usb_start_wait_urb+0x114/0x4c0 drivers/usb/core/message.c:59
usb_internal_control_msg drivers/usb/core/message.c:103 [inline]
usb_control_msg+0x232/0x3e0 drivers/usb/core/message.c:154
dtv5100_i2c_msg+0x250/0x330 drivers/media/usb/dvb-usb/dtv5100.c:60
dtv5100_i2c_xfer+0x1a4/0x3c0 drivers/media/usb/dvb-usb/dtv5100.c:86
__i2c_transfer+0x871/0x2170 drivers/i2c/i2c-core-base.c:-1
i2c_transfer+0x25b/0x3a0 drivers/i2c/i2c-core-base.c:2315
i2c_transfer_buffer_flags+0x105/0x190 drivers/i2c/i2c-core-base.c:2343
i2c_master_send include/linux/i2c.h:109 [inline]
i2cdev_write+0x112/0x1b0 drivers/i2c/i2c-dev.c:183
do_loop_readv_writev include/linux/uio.h:-1 [inline]
vfs_writev+0x4a5/0x9a0 fs/read_write.c:1057
do_writev+0x14d/0x2d0 fs/read_write.c:1101
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa54bca17b9
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:00007fff3a510bc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa54bca17b9
RDX: 0000000000000001 RSI: 0000200000000680 RDI: 0000000000000004
RBP: 00007fa54bd145f0 R08: 00232d6332692f76 R09: 0000000000000006
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
</TASK>


---
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.

Oliver Neukum

unread,
May 28, 2025, 9:01:58 AM5/28/25
to syzbot, gre...@linuxfoundation.org, linux-...@vger.kernel.org, linu...@vger.kernel.org, syzkall...@googlegroups.com, Alan Stern
On 27.05.25 04:02, syzbot wrote:

>
> ------------[ cut here ]------------
> usb 1-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType c0
> WARNING: CPU: 0 PID: 5833 at drivers/usb/core/urb.c:413 usb_submit_urb+0x1112/0x1870 drivers/usb/core/urb.c:411

[..]
> Call Trace:
> <TASK>
> usb_start_wait_urb+0x114/0x4c0 drivers/usb/core/message.c:59
> usb_internal_control_msg drivers/usb/core/message.c:103 [inline]
> usb_control_msg+0x232/0x3e0 drivers/usb/core/message.c:154
> dtv5100_i2c_msg+0x250/0x330 drivers/media/usb/dvb-usb/dtv5100.c:60
> dtv5100_i2c_xfer+0x1a4/0x3c0 drivers/media/usb/dvb-usb/dtv5100.c:86

Hi,

these transfers are done via control transfers to endpoint 0.
So this is not yet another one of those cases that a driver fails
to verify that it operates on the intended hardware.
I'd say that a driver can assume that endpoint 0 exists and is
a control endpoint.

But I am afraid we never check that. Should we?

Regards
Oliver

Alan Stern

unread,
May 28, 2025, 4:16:36 PM5/28/25
to Oliver Neukum, syzbot, gre...@linuxfoundation.org, linux-...@vger.kernel.org, linu...@vger.kernel.org, syzkall...@googlegroups.com
That's not the problem here. The problem is the same as in other USB
I2C drivers, and
Wolfgang Sang has been fixing them up one by one. Namely, these
devices send I2C
messages as control transfers over ep0, and this doesn't work right
with the client asks
for a 0-length read transfer (since USB doesn't support 0-length read
control transfers,
only 0-length writes).

Alan Stern
Reply all
Reply to author
Forward
0 new messages