WARNING in rtl8150_open/usb_submit_urb
Subsystems (5)
syzbot
syzbotHello,
syzbot found the following issue on:
HEAD commit: fc88bb116179 usb: roles: add lockdep class key to struct u.. git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing console output: https://syzkaller.appspot.com/x/log.txt?x=17b89e97980000 kernel config: https://syzkaller.appspot.com/x/.config?x=f470942baada45b1 dashboard link: https://syzkaller.appspot.com/bug?extid=d7e968426f644b567e31 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16bb5463980000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=150ca88f980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/5b06342088f5/disk-fc88bb11.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e881a8c2cb53/vmlinux-fc88bb11.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4bf14d7b61d4/bzImage-fc88bb11.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
------------[ cut here ]------------ usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 1 PID: 2586 at drivers/usb/core/urb.c:503 usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Modules linked in: CPU: 1 UID: 0 PID: 2586 Comm: dhcpcd Not tainted 6.11.0-rc4-syzkaller-00069-gfc88bb116179 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0010:usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Code: 84 3c 02 00 00 e8 05 e4 fc fc 4c 89 ef e8 fd 25 d7 fe 45 89 e0 89 e9 4c 89 f2 48 89 c6 48 c7 c7 20 5d a0 87 e8 46 e6 c2 fc 90 <0f> 0b 90 90 e9 e9 f8 ff ff e8 d7 e3 fc fc 49 81 c4 c0 05 00 00 e9 RSP: 0018:ffffc9000441f740 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff888112487a00 RCX: ffffffff811a99a9 RDX: ffff88810df6ba80 RSI: ffffffff811a99b6 RDI: 0000000000000001 RBP: 0000000000000003 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 R13: ffff8881023bf0a8 R14: ffff888112452a20 R15: ffff888112487a7c FS: 00007fc04eea5740(0000) GS:ffff8881f6300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0a1de9f870 CR3: 000000010dbd0000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> rtl8150_open+0x300/0xe30 drivers/net/usb/rtl8150.c:733 __dev_open+0x2d4/0x4e0 net/core/dev.c:1474 __dev_change_flags+0x561/0x720 net/core/dev.c:8838 dev_change_flags+0x8f/0x160 net/core/dev.c:8910 devinet_ioctl+0x127a/0x1f10 net/ipv4/devinet.c:1177 inet_ioctl+0x3aa/0x3f0 net/ipv4/af_inet.c:1003 sock_do_ioctl+0x116/0x280 net/socket.c:1222 sock_ioctl+0x22e/0x6c0 net/socket.c:1341 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x193/0x220 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc04ef73d49 Code: 5c c3 48 8d 44 24 08 48 89 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 b8 10 00 00 00 c7 44 24 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 76 10 48 8b 15 ae 60 0d 00 f7 d8 41 83 c8 RSP: 002b:00007ffdc6648808 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fc04eea56c0 RCX: 00007fc04ef73d49 RDX: 00007ffdc66589f8 RSI: 0000000000008914 RDI: 0000000000000005 RBP: 00007ffdc6668bb8 R08: 00007ffdc66589b8 R09: 00007ffdc6658968 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdc66589f8 R14: 0000000000000028 R15: 0000000000008914 </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 [email protected].
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
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b831f83e40a24f07c8dcba5be408d93beedc820f
syzbot
syzbotsyzbot has tested the proposed patch but the reproducer is still triggering an issue: WARNING in rtl8150_open/usb_submit_urb
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in rtl8150_open/usb_submit_urb
------------[ cut here ]------------ usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 0 PID: 2582 at drivers/usb/core/urb.c:503 usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Modules linked in: CPU: 0 UID: 0 PID: 2582 Comm: dhcpcd Not tainted 6.11.0-rc6-syzkaller-00183-gb831f83e40a2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 RIP: 0010:usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Code: 84 3c 02 00 00 e8 45 c1 fc fc 4c 89 ef e8 fd 1e d7 fe 45 89 e0 89 e9 4c 89 f2 48 89 c6 48 c7 c7 e0 61 a0 87 e8 36 c2 c2 fc 90 <0f> 0b 90 90 e9 e9 f8 ff ff e8 17 c1 fc fc 49 81 c4 c0 05 00 00 e9 RSP: 0018:ffffc9000185f740 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff88810a710f00 RCX: ffffffff811a9639 RDX: ffff88810f3157c0 RSI: ffffffff811a9646 RDI: 0000000000000001 RBP: 0000000000000003 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000001 R13: ffff88811d1ea0a8 R14: ffff888109f221e0 R15: ffff88810a710f7c FS: 00007f11f9604740(0000) GS:ffff8881f6200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fef9e900870 CR3: 000000010dfa2000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> rtl8150_open+0x300/0xe30 drivers/net/usb/rtl8150.c:733 __dev_open+0x2d4/0x4e0 net/core/dev.c:1474 __dev_change_flags+0x561/0x720 net/core/dev.c:8838 dev_change_flags+0x8f/0x160 net/core/dev.c:8910 devinet_ioctl+0x127a/0x1f10 net/ipv4/devinet.c:1177 inet_ioctl+0x3aa/0x3f0 net/ipv4/af_inet.c:1003 sock_do_ioctl+0x116/0x280 net/socket.c:1222 sock_ioctl+0x22e/0x6c0 net/socket.c:1341 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x193/0x220 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f11f96d2d49 Code: 5c c3 48 8d 44 24 08 48 89 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 b8 10 00 00 00 c7 44 24 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 76 10 48 8b 15 ae 60 0d 00 f7 d8 41 83 c8 RSP: 002b:00007ffdef3c4138 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f11f96046c0 RCX: 00007f11f96d2d49 RDX: 00007ffdef3d4328 RSI: 0000000000008914 RDI: 0000000000000005 RBP: 00007ffdef3e44e8 R08: 00007ffdef3d42e8 R09: 00007ffdef3d4298 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdef3d4328 R14: 0000000000000028 R15: 0000000000008914 </TASK>
Tested on:
commit: b831f83e Merge tag 'bpf-6.11-rc7' of git://git.kernel... git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git console output: https://syzkaller.appspot.com/x/log.txt?x=17f75c8b980000 kernel config: https://syzkaller.appspot.com/x/.config?x=9e0217c0b2cf4322 dashboard link: https://syzkaller.appspot.com/bug?extid=d7e968426f644b567e31 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
Test to see that issue is still active.
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
syzbot
syzbotsyzbot has tested the proposed patch but the reproducer is still triggering an issue: WARNING in rtl8150_open/usb_submit_urb
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in rtl8150_open/usb_submit_urb
------------[ cut here ]------------ usb 1-1: BOGUS urb xfer, pipe 3 != type 1 WARNING: CPU: 1 PID: 2570 at drivers/usb/core/urb.c:503 usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Modules linked in: CPU: 1 UID: 0 PID: 2570 Comm: dhcpcd Not tainted 6.13.0-syzkaller-gffd294d346d1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 RIP: 0010:usb_submit_urb+0xe4b/0x1730 drivers/usb/core/urb.c:503 Code: 84 3c 02 00 00 e8 b5 dc f1 fc 4c 89 ef e8 1d b7 d5 fe 45 89 e0 89 e9 4c 89 f2 48 89 c6 48 c7 c7 00 ea a1 87 e8 86 d8 b5 fc 90 <0f> 0b 90 90 e9 e9 f8 ff ff e8 87 dc f1 fc 49 81 c4 b8 05 00 00 e9 RSP: 0018:ffffc9000154f740 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff88810a78cd00 RCX: ffffffff811f67b9 RDX: ffff88810e7d3a80 RSI: ffffffff811f67c6 RDI: 0000000000000001 RBP: 0000000000000003 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001 R13: ffff8881240640a8 R14: ffff88811a2f5be0 R15: ffff88810a78cd7c FS: 00007f72f9fff740(0000) GS:ffff8881f6300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f40287f068 CR3: 000000010df6e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> rtl8150_open+0x300/0xe30 drivers/net/usb/rtl8150.c:733 __dev_open+0x2d4/0x4e0 net/core/dev.c:1506 __dev_change_flags+0x561/0x720 net/core/dev.c:8968 dev_change_flags+0x8f/0x160 net/core/dev.c:9040 devinet_ioctl+0x11d9/0x1f50 net/ipv4/devinet.c:1208 inet_ioctl+0x3aa/0x3f0 net/ipv4/af_inet.c:1001 sock_do_ioctl+0x116/0x280 net/socket.c:1209 sock_ioctl+0x41c/0x690 net/socket.c:1328 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0x190/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f72fa0cdd49 Code: 5c c3 48 8d 44 24 08 48 89 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 b8 10 00 00 00 c7 44 24 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 76 10 48 8b 15 ae 60 0d 00 f7 d8 41 83 c8 RSP: 002b:00007fff0282c468 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f72f9fff6c0 RCX: 00007f72fa0cdd49 RDX: 00007fff0283c658 RSI: 0000000000008914 RDI: 0000000000000005 RBP: 00007fff0284c818 R08: 00007fff0283c618 R09: 00007fff0283c5c8 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff0283c658 R14: 0000000000000028 R15: 0000000000008914 </TASK>
Tested on:
commit: ffd294d3 Linux 6.13 git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master console output: https://syzkaller.appspot.com/x/log.txt?x=11e539df980000 kernel config: https://syzkaller.appspot.com/x/.config?x=169f362a4628fd81 dashboard link: https://syzkaller.appspot.com/bug?extid=d7e968426f644b567e31 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
Test to see if sanity check for endpoints works.
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git main
--- drivers/net/usb/rtl8150.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/net/usb/rtl8150.c +22 -0
@@ -71,6 +71,14 @@#define MSR_SPEED (1<<3)#define MSR_LINK (1<<2) +/* USB endpoints */ +enum rtl8150_usb_ep { +RTL8150_USB_EP_CONTROL =0 , +RTL8150_USB_EP_BULK_IN =1 , +RTL8150_USB_EP_BULK_OUT =2 , +RTL8150_USB_EP_INT_IN =3 , +}; +/* Interrupt pipe data */ #define INT_TSR 0x00#define INT_RSR 0x01
@@ -880,6 +888,20 @@ static int rtl8150_probe(struct usb_interface *intf,return -ENOMEM ; } +/* Verify that required endpoints are present */ +static const u8 bulk_ep_addr[] = { +RTL8150_USB_EP_BULK_IN |USB_DIR_IN , +RTL8150_USB_EP_BULK_OUT |USB_DIR_OUT , +0 }; +static const u8 int_ep_addr[] = { +RTL8150_USB_EP_INT_IN |USB_DIR_IN , +0 }; +if (!usb_check_bulk_endpoints (intf, bulk_ep_addr) || + !usb_check_int_endpoints (intf, int_ep_addr)) { +dev_err (&intf->dev,"couldn't find required endpoints\n" ); + goto out; + } +tasklet_setup (&dev->tl, rx_fixup);spin_lock_init (&dev->rx_pool_lock);
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Tested on:
commit: 5bc55a33 Linux 6.13-rc7 git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git main console output: https://syzkaller.appspot.com/x/log.txt?x=1770d618580000 kernel config: https://syzkaller.appspot.com/x/.config?x=f8c8f8861a602fe5 dashboard link: https://syzkaller.appspot.com/bug?extid=d7e968426f644b567e31 compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 patch: https://syzkaller.appspot.com/x/patch.diff?x=12248ab0580000
Note: testing is done by a robot and is best-effort only.