BUG: unable to handle kernel NULL pointer dereference in vhci_shutdown_connection

13 views
Skip to first unread message

syzbot

unread,
Dec 16, 2020, 2:42:10 PM12/16/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f2ecb86 Linux 4.14.212
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1471546b500000
kernel config: https://syzkaller.appspot.com/x/.config?x=80549830ca6ffbb2
dashboard link: https://syzkaller.appspot.com/bug?extid=635417e3213fd6ab42dd
compiler: gcc (GCC) 10.1.0-syz 20200507

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

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

vhci_hcd vhci_hcd.0: pdev(1) rhport(1) sockfd(3)
vhci_hcd vhci_hcd.0: devid(0) speed(3) speed_str(high-speed)
vhci_hcd: connection closed
BUG: unable to handle kernel NULL pointer dereference at 000000000000001c
IP: atomic_inc arch/x86/include/asm/atomic.h:92 [inline]
IP: kthread_stop+0x47/0x640 kernel/kthread.c:525
PGD 974a0067 P4D 974a0067 PUD a311c067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 23095 Comm: kworker/u4:0 Not tainted 4.14.212-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usbip_event event_handler
task: ffff88807308e640 task.stack: ffff88822f4c0000
RIP: 0010:atomic_inc arch/x86/include/asm/atomic.h:92 [inline]
RIP: 0010:kthread_stop+0x47/0x640 kernel/kthread.c:525
RSP: 0018:ffff88822f4c7c70 EFLAGS: 00010297
RAX: ffff88807308e640 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000286
RBP: fffffffffffffffc R08: ffffffff8b9c79c8 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff888237c98998
R13: ffff888237c98988 R14: fffffbfff1924130 R15: ffffffff89857f80
FS: 0000000000000000(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000000001c CR3: 00000000b36aa000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
vhci_shutdown_connection+0x12a/0x240 drivers/usb/usbip/vhci_hcd.c:1035
event_handler+0x1c3/0x4a0 drivers/usb/usbip/usbip_event.c:92
process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
kthread+0x30d/0x420 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Code: 00 65 8b 1d bc 17 c9 7e 83 fb 07 0f 87 5b 04 00 00 e8 be d5 1e 00 89 db 48 0f a3 1d 0c 44 d0 08 0f 82 a2 03 00 00 e8 a9 d5 1e 00 <f0> ff 45 20 48 8d 7d 24 48 b8 00 00 00 00 00 fc ff df 48 89 fa
RIP: atomic_inc arch/x86/include/asm/atomic.h:92 [inline] RSP: ffff88822f4c7c70
RIP: kthread_stop+0x47/0x640 kernel/kthread.c:525 RSP: ffff88822f4c7c70
CR2: 000000000000001c
---[ end trace 58159c744ea27d8b ]---


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

syzbot

unread,
Dec 16, 2020, 3:14:11 PM12/16/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 3f2ecb86 Linux 4.14.212
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=166a2287500000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=176efccb500000

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

vhci_hcd vhci_hcd.0: devid(0) speed(3) speed_str(high-speed)
IPv6: ADDRCONF(NETDEV_UP): veth1_macvtap: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_macvtap: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0_macvtap: link becomes ready
vhci_hcd: connection closed
BUG: unable to handle kernel NULL pointer dereference at 000000000000001c
vhci_hcd vhci_hcd.0: pdev(5) rhport(0) sockfd(3)
IP: atomic_inc arch/x86/include/asm/atomic.h:92 [inline]
IP: kthread_stop+0x47/0x640 kernel/kthread.c:525
vhci_hcd vhci_hcd.0: devid(0) speed(3) speed_str(high-speed)
PGD 95efc067 P4D 95efc067 PUD 9c576067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 34 Comm: kworker/u4:2 Not tainted 4.14.212-syzkaller #0
vhci_hcd vhci_hcd.0: pdev(3) rhport(0) sockfd(3)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
vhci_hcd vhci_hcd.0: devid(0) speed(3) speed_str(high-speed)
Workqueue: usbip_event event_handler
task: ffff8880b56721c0 task.stack: ffff8880b5688000
RIP: 0010:atomic_inc arch/x86/include/asm/atomic.h:92 [inline]
RIP: 0010:kthread_stop+0x47/0x640 kernel/kthread.c:525
RSP: 0018:ffff8880b568fc70 EFLAGS: 00010297
RAX: ffff8880b56721c0 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000286
vhci_hcd: connection closed
RBP: fffffffffffffffc R08: ffffffff8b993010 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff888237e40a58
R13: ffff888237e40a48 R14: fffffbfff1924130 R15: ffffffff89857f80
FS: 0000000000000000(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
vhci_hcd: connection closed
CR2: 000000000000001c CR3: 00000000a0028000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
vhci_shutdown_connection+0x12a/0x240 drivers/usb/usbip/vhci_hcd.c:1035
event_handler+0x1c3/0x4a0 drivers/usb/usbip/usbip_event.c:92
process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
vhci_hcd vhci_hcd.0: pdev(4) rhport(1) sockfd(3)
vhci_hcd vhci_hcd.0: devid(0) speed(3) speed_str(high-speed)
vhci_hcd: connection closed
worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
kthread+0x30d/0x420 kernel/kthread.c:232
vhci_hcd vhci_hcd.0: pdev(4) rhport(0) sockfd(3)
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
vhci_hcd vhci_hcd.0: devid(0) speed(3) speed_str(high-speed)
Code: 00 65 8b 1d bc 17 c9 7e 83 fb 07 0f 87 5b 04 00 00 e8 be d5 1e 00 89 db 48 0f a3 1d 0c 44 d0 08 0f 82 a2 03 00 00 e8 a9 d5 1e 00 <f0> ff 45 20 48 8d 7d 24 48 b8 00 00 00 00 00 fc ff df 48 89 fa
vhci_hcd: connection closed
RIP: atomic_inc arch/x86/include/asm/atomic.h:92 [inline] RSP: ffff8880b568fc70
RIP: kthread_stop+0x47/0x640 kernel/kthread.c:525 RSP: ffff8880b568fc70
CR2: 000000000000001c
---[ end trace 06ada97147c23ef4 ]---

syzbot

unread,
Apr 16, 2021, 1:35:08 PM4/16/21
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 534d2cf487b972b2c039bfc55898a7edc2b0ea45
Author: Shuah Khan <sk...@linuxfoundation.org>
Date: Tue Mar 30 01:36:51 2021 +0000

usbip: synchronize event handler with sysfs code paths

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14789e41d00000
start commit: 397a88b2 Linux 4.14.223
git tree: linux-4.14.y
kernel config: https://syzkaller.appspot.com/x/.config?x=104119cfe8dba6b3
dashboard link: https://syzkaller.appspot.com/bug?extid=635417e3213fd6ab42dd
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1244c8ecd00000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: usbip: synchronize event handler with sysfs code paths

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages