syzbot


general protection fault in magicmouse_remove

Status: fixed on 2021/11/10 00:50
Subsystems: usb input
[Documentation on labels]
Reported-by: syzbot+ee6f6e2e68886ca256a8@syzkaller.appspotmail.com
Fix commit: 4b4f6cecca44 HID: magicmouse: fix NULL-deref on disconnect
First crash: 1176d, last: 1138d
Discussions (5)
Title Replies (including bot) Last reply
[PATCH 5.4 00/78] 5.4.125-rc1 review 86 (86) 2021/06/16 15:01
[PATCH 5.10 000/137] 5.10.43-rc1 review 144 (144) 2021/06/10 09:02
[PATCH 5.12 000/161] 5.12.10-rc1 review 171 (171) 2021/06/09 20:47
[PATCH] HID: magicmouse: fix NULL-deref on disconnect 2 (2) 2021/05/26 10:51
[syzbot] general protection fault in magicmouse_remove 1 (2) 2021/05/17 10:08

Sample crash report:
usb 1-1: New USB device found, idVendor=05ac, idProduct=0265, bcdDevice= 0.40
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 1-1: config 0 descriptor??
usb 1-1: USB disconnect, device number 2
general protection fault, probably for non-canonical address 0xdffffc000000002b: 0000 [#1] SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000158-0x000000000000015f]
CPU: 0 PID: 7 Comm: kworker/0:1 Not tainted 5.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
RIP: 0010:timer_is_static_object+0x20/0x90 kernel/time/timer.c:625
Code: 84 00 00 00 00 00 0f 1f 40 00 41 54 53 48 89 fb e8 d5 86 10 00 48 8d 7b 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 4f 45 31 e4 48 83 7b 08 00 74 0c e8 ab 86 10 00 44
RSP: 0018:ffffc9000007f330 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: 0000000000000150 RCX: 0000000000000000
RDX: 000000000000002b RSI: ffffffff8130663b RDI: 0000000000000158
RBP: 0000000000000002 R08: 0000000000000000 R09: ffffffff8a5c35ab
R10: fffffbfff14b86b5 R11: 0000000000000000 R12: dffffc0000000000
R13: ffffffff86090c00 R14: 0000000000000150 R15: 1ffff9200000fe6b
FS:  0000000000000000(0000) GS:ffff8881f6a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004ba438 CR3: 00000001097bb000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 debug_object_assert_init lib/debugobjects.c:886 [inline]
 debug_object_assert_init+0x1df/0x2e0 lib/debugobjects.c:861
 debug_timer_assert_init kernel/time/timer.c:737 [inline]
 debug_assert_init kernel/time/timer.c:782 [inline]
 del_timer+0x6d/0x110 kernel/time/timer.c:1202
 try_to_grab_pending+0x6d/0xd0 kernel/workqueue.c:1252
 __cancel_work_timer+0xa6/0x570 kernel/workqueue.c:3098
 magicmouse_remove+0x3a/0x50 drivers/hid/hid-magicmouse.c:782
 hid_device_remove+0xed/0x240 drivers/hid/hid-core.c:2317
 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1181
 device_release_driver_internal drivers/base/dd.c:1212 [inline]
 device_release_driver+0x26/0x40 drivers/base/dd.c:1235
 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533
 device_del+0x502/0xd40 drivers/base/core.c:3507
 hid_remove_device drivers/hid/hid-core.c:2488 [inline]
 hid_destroy_device+0xe1/0x150 drivers/hid/hid-core.c:2507
 usbhid_disconnect+0x9f/0xe0 drivers/hid/usbhid/hid-core.c:1436
 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458
 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1181
 device_release_driver_internal drivers/base/dd.c:1212 [inline]
 device_release_driver+0x26/0x40 drivers/base/dd.c:1235
 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533
 device_del+0x502/0xd40 drivers/base/core.c:3507
 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1413
 usb_disconnect.cold+0x27d/0x791 drivers/usb/core/hub.c:2219
 hub_port_connect drivers/usb/core/hub.c:5127 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5416 [inline]
 port_event drivers/usb/core/hub.c:5562 [inline]
 hub_event+0x1c9c/0x4320 drivers/usb/core/hub.c:5644
 process_one_work+0x98d/0x1580 kernel/workqueue.c:2275
 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421
 kthread+0x38c/0x460 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Modules linked in:
---[ end trace 3f2c8ec737b57211 ]---
RIP: 0010:timer_is_static_object+0x20/0x90 kernel/time/timer.c:625
Code: 84 00 00 00 00 00 0f 1f 40 00 41 54 53 48 89 fb e8 d5 86 10 00 48 8d 7b 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 4f 45 31 e4 48 83 7b 08 00 74 0c e8 ab 86 10 00 44
RSP: 0018:ffffc9000007f330 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: 0000000000000150 RCX: 0000000000000000
RDX: 000000000000002b RSI: ffffffff8130663b RDI: 0000000000000158
RBP: 0000000000000002 R08: 0000000000000000 R09: ffffffff8a5c35ab
R10: fffffbfff14b86b5 R11: 0000000000000000 R12: dffffc0000000000
R13: ffffffff86090c00 R14: 0000000000000150 R15: 1ffff9200000fe6b
FS:  0000000000000000(0000) GS:ffff8881f6a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000004ba438 CR3: 00000001097bb000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (47):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/05 08:37 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d665ea6ea86c 06c27ff5 .config console log report syz C ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/16 17:54 upstream 63d1cb53e26a f54a5c09 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in magicmouse_remove
2021/05/14 18:15 upstream 315d99318179 8bdd5343 .config console log report info ci-upstream-kasan-gce general protection fault in magicmouse_remove
2021/05/14 16:23 upstream 315d99318179 8bdd5343 .config console log report info ci-upstream-kasan-gce general protection fault in magicmouse_remove
2021/05/10 18:17 upstream 6efb943b8616 ca873091 .config console log report info ci-upstream-kasan-gce-root general protection fault in magicmouse_remove
2021/05/10 18:10 upstream 6efb943b8616 ca873091 .config console log report info ci-upstream-kasan-gce-smack-root general protection fault in magicmouse_remove
2021/05/09 15:58 upstream b741596468b0 bc5434be .config console log report info ci-upstream-kasan-gce general protection fault in magicmouse_remove
2021/05/09 07:57 upstream ab159ac569fd bc5434be .config console log report info ci-upstream-kasan-gce general protection fault in magicmouse_remove
2021/05/08 21:31 upstream ab159ac569fd bc5434be .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in magicmouse_remove
2021/05/08 20:07 upstream ab159ac569fd bc5434be .config console log report info ci-upstream-kasan-gce general protection fault in magicmouse_remove
2021/05/08 19:35 upstream ab159ac569fd bc5434be .config console log report info ci-upstream-kasan-gce general protection fault in magicmouse_remove
2021/05/08 19:04 upstream ab159ac569fd bc5434be .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in magicmouse_remove
2021/05/08 18:31 upstream ab159ac569fd bc5434be .config console log report info ci-upstream-kasan-gce-root general protection fault in magicmouse_remove
2021/05/14 18:28 upstream 315d99318179 8bdd5343 .config console log report info ci-upstream-kasan-gce-386 general protection fault in magicmouse_remove
2021/05/14 18:15 upstream 315d99318179 8bdd5343 .config console log report info ci-qemu-upstream-386 general protection fault in magicmouse_remove
2021/05/10 18:09 upstream 6efb943b8616 ca873091 .config console log report info ci-upstream-kasan-gce-386 general protection fault in magicmouse_remove
2021/05/09 16:24 upstream b741596468b0 bc5434be .config console log report info ci-upstream-kasan-gce-386 general protection fault in magicmouse_remove
2021/05/08 21:06 upstream ab159ac569fd bc5434be .config console log report info ci-upstream-kasan-gce-386 general protection fault in magicmouse_remove
2021/06/12 22:14 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 12f739798470 1ba81399 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/06/11 05:56 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 12f739798470 1ba81399 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/06/10 03:39 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing e89bb4288378 1ba81399 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/06/09 09:54 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 60dfe484cef4 5c2fe346 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/06/08 00:52 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 87191ca9f902 b718257f .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/18 02:36 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 9fbf82c76414 a343ba6b .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/17 02:00 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 216e0e563d81 f54a5c09 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/16 19:14 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 216e0e563d81 f54a5c09 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/16 09:15 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 216e0e563d81 f54a5c09 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/14 18:21 linux-next cd557f1c605f 8bdd5343 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in magicmouse_remove
2021/05/13 17:27 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 216e0e563d81 ecb594cb .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/11 12:58 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 4676be28a46e ca873091 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/10 18:09 linux-next e6f67ebd93ef ca873091 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in magicmouse_remove
2021/05/10 18:06 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing f91e5d097f12 ca873091 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/10 05:50 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 31a8503589c4 bc5434be .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/09 16:10 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 31a8503589c4 bc5434be .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/09 16:03 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 31a8503589c4 bc5434be .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/09 15:06 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 31a8503589c4 bc5434be .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/09 09:48 linux-next 869a85b925fc bc5434be .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in magicmouse_remove
2021/05/09 08:15 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 31a8503589c4 bc5434be .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/09 07:11 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 31a8503589c4 bc5434be .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/07 12:38 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 83a9d2a05296 f6da8120 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/07 06:37 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 83a9d2a05296 06585184 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/06 14:25 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 8404c9fbc84b 06c27ff5 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/06 09:54 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d665ea6ea86c 06c27ff5 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/05 15:17 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d665ea6ea86c 06c27ff5 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/05 09:16 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d665ea6ea86c 06c27ff5 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/05 07:45 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d665ea6ea86c 06c27ff5 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
2021/05/05 07:40 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing d665ea6ea86c 06c27ff5 .config console log report info ci2-upstream-usb general protection fault in magicmouse_remove
* Struck through repros no longer work on HEAD.