syzbot


BUG: unable to handle kernel paging request in media_gobj_destroy

Status: auto-closed as invalid on 2022/07/19 12:05
Subsystems: media
[Documentation on labels]
Reported-by: syzbot+d323fc68bef311c1495c@syzkaller.appspotmail.com
First crash: 779d, last: 730d

Sample crash report:
BUG: unable to handle page fault for address: ffffed11631d73ab
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 23ffed067 P4D 23ffed067 PUD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 69 Comm: kworker/1:2 Not tainted 5.17.0-rc6-syzkaller-00087-gca9400ef7f67 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
RIP: 0010:media_gobj_destroy+0x21/0x240 drivers/media/mc/mc-entity.c:161
Code: 60 fd e9 91 fe ff ff 66 90 41 56 41 55 41 54 55 53 48 89 fb e8 40 a1 31 fd 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 91 01 00 00 48 83 3b 00 0f 84 7a 01 00 00 e8 16
RSP: 0018:ffffc90000e3f4d8 EFLAGS: 00010a02
RAX: dffffc0000000000 RBX: ffff888b18eb9d5a RCX: ffffc900071bc000
RDX: 1ffff111631d73ab RSI: ffffffff84125ef0 RDI: ffff888b18eb9d5a
RBP: ffffed102654c867 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff84118546 R11: 0000000000000000 R12: ffffed102654c869
R13: ffff888132a64338 R14: ffff888132a64300 R15: ffff88810cba9118
FS:  0000000000000000(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed11631d73ab CR3: 00000001314fe000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __media_device_unregister_entity+0x200/0x300 drivers/media/mc/mc-device.c:601
 media_device_unregister_entity+0x49/0x70 drivers/media/mc/mc-device.c:689
 dvb_media_device_free+0x1d5/0x680 drivers/media/dvb-core/dvbdev.c:216
 dvb_remove_device.part.0+0x9c/0x260 drivers/media/dvb-core/dvbdev.c:558
 dvb_remove_device drivers/media/dvb-core/dvbdev.c:551 [inline]
 dvb_unregister_device+0x1b/0x60 drivers/media/dvb-core/dvbdev.c:580
 dvb_dmxdev_release+0x1a0/0x630 drivers/media/dvb-core/dmxdev.c:1461
 dvb_usb_adapter_dvb_exit+0x93/0x230 drivers/media/usb/dvb-usb/dvb-usb-dvb.c:224
 dvb_usb_adapter_exit drivers/media/usb/dvb-usb/dvb-usb-init.c:126 [inline]
 dvb_usb_exit drivers/media/usb/dvb-usb/dvb-usb-init.c:141 [inline]
 dvb_usb_device_exit+0x20a/0x510 drivers/media/usb/dvb-usb/dvb-usb-init.c:336
 usb_unbind_interface+0x1d8/0x8e0 drivers/usb/core/driver.c:458
 __device_release_driver+0x627/0x760 drivers/base/dd.c:1209
 device_release_driver_internal drivers/base/dd.c:1242 [inline]
 device_release_driver+0x26/0x40 drivers/base/dd.c:1265
 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:529
 device_del+0x4f3/0xc80 drivers/base/core.c:3592
 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1419
 usb_disconnect.cold+0x27a/0x78e drivers/usb/core/hub.c:2228
 hub_port_connect drivers/usb/core/hub.c:5207 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5507 [inline]
 port_event drivers/usb/core/hub.c:5665 [inline]
 hub_event+0x1e39/0x44d0 drivers/usb/core/hub.c:5747
 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307
 worker_thread+0x657/0x1110 kernel/workqueue.c:2454
 kthread+0x2ef/0x3a0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Modules linked in:
CR2: ffffed11631d73ab
---[ end trace 0000000000000000 ]---
RIP: 0010:media_gobj_destroy+0x21/0x240 drivers/media/mc/mc-entity.c:161
Code: 60 fd e9 91 fe ff ff 66 90 41 56 41 55 41 54 55 53 48 89 fb e8 40 a1 31 fd 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 91 01 00 00 48 83 3b 00 0f 84 7a 01 00 00 e8 16
RSP: 0018:ffffc90000e3f4d8 EFLAGS: 00010a02
RAX: dffffc0000000000 RBX: ffff888b18eb9d5a RCX: ffffc900071bc000
RDX: 1ffff111631d73ab RSI: ffffffff84125ef0 RDI: ffff888b18eb9d5a
RBP: ffffed102654c867 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff84118546 R11: 0000000000000000 R12: ffffed102654c869
R13: ffff888132a64338 R14: ffff888132a64300 R15: ffff88810cba9118
FS:  0000000000000000(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed11631d73ab CR3: 00000001314fe000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	fd                   	std
   1:	e9 91 fe ff ff       	jmpq   0xfffffe97
   6:	66 90                	xchg   %ax,%ax
   8:	41 56                	push   %r14
   a:	41 55                	push   %r13
   c:	41 54                	push   %r12
   e:	55                   	push   %rbp
   f:	53                   	push   %rbx
  10:	48 89 fb             	mov    %rdi,%rbx
  13:	e8 40 a1 31 fd       	callq  0xfd31a158
  18:	48 89 da             	mov    %rbx,%rdx
  1b:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  22:	fc ff df
  25:	48 c1 ea 03          	shr    $0x3,%rdx
* 29:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2d:	0f 85 91 01 00 00    	jne    0x1c4
  33:	48 83 3b 00          	cmpq   $0x0,(%rbx)
  37:	0f 84 7a 01 00 00    	je     0x1b7
  3d:	e8                   	.byte 0xe8
  3e:	16                   	(bad)

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/01 23:41 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing ca9400ef7f67 45a13a73 .config console log report info ci2-upstream-usb BUG: unable to handle kernel paging request in media_gobj_destroy
2022/04/20 12:05 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 312310928417 7d7bc738 .config console log report info ci2-upstream-usb general protection fault in media_gobj_destroy
* Struck through repros no longer work on HEAD.