syzbot


linux-next boot error: WARNING: refcount bug in dvb_register_device

Status: fixed on 2023/02/24 13:50
Subsystems: media
[Documentation on labels]
Reported-by: syzbot+fce48a3dd3368645bd6c@syzkaller.appspotmail.com
Fix commit: 3a664569b71b media: dvbdev: fix refcnt bug
First crash: 509d, last: 501d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH v0] media: dvbdev: fix refcnt bug 1 (1) 2022/11/28 16:21
[syzbot] linux-next boot error: WARNING: refcount bug in dvb_register_device 0 (1) 2022/11/28 10:23

Sample crash report:
usbcore: registered new interface driver sonixj
usbcore: registered new interface driver spca500
usbcore: registered new interface driver spca501
usbcore: registered new interface driver spca505
usbcore: registered new interface driver spca506
usbcore: registered new interface driver spca508
usbcore: registered new interface driver spca561
usbcore: registered new interface driver spca1528
usbcore: registered new interface driver sq905
usbcore: registered new interface driver sq905c
usbcore: registered new interface driver sq930x
usbcore: registered new interface driver sunplus
usbcore: registered new interface driver stk014
usbcore: registered new interface driver stk1135
usbcore: registered new interface driver stv0680
usbcore: registered new interface driver t613
usbcore: registered new interface driver gspca_topro
usbcore: registered new interface driver touptek
usbcore: registered new interface driver tv8532
usbcore: registered new interface driver vc032x
usbcore: registered new interface driver vicam
usbcore: registered new interface driver xirlink-cit
usbcore: registered new interface driver gspca_zc3xx
usbcore: registered new interface driver ALi m5602
usbcore: registered new interface driver STV06xx
usbcore: registered new interface driver gspca_gl860
usbcore: registered new interface driver hackrf
usbcore: registered new interface driver msi2500
usbcore: registered new interface driver Philips webcam
usbcore: registered new interface driver uvcvideo
au0828: au0828 driver loaded
usbcore: registered new interface driver au0828
usbcore: registered new interface driver cx231xx
usbcore: registered new interface driver em28xx
em28xx: Registered (Em28xx v4l2 Extension) extension
em28xx: Registered (Em28xx Audio Extension) extension
em28xx: Registered (Em28xx dvb Extension) extension
em28xx: Registered (Em28xx Input Extension) extension
usbcore: registered new interface driver go7007
usbcore: registered new interface driver go7007-loader
usbcore: registered new interface driver hdpvr
usbcore: registered new interface driver pvrusb2
pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner
pvrusb2: Debug mask is 31 (0x1f)
usbcore: registered new interface driver stk1160
usbcore: registered new interface driver usbtv
dvbdev: DVB: registering new adapter (dvb_vidtv_bridge)
i2c i2c-0: DVB: registering adapter 0 frontend 0 (Dummy demod for DVB-T/T2/C/S/S2)...
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 0 PID: 1 at lib/refcount.c:25 refcount_warn_saturate+0x17c/0x1f0 lib/refcount.c:25
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc8-next-20221206-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:refcount_warn_saturate+0x17c/0x1f0 lib/refcount.c:25
Code: 0a 31 ff 89 de e8 14 88 75 fd 84 db 0f 85 2e ff ff ff e8 97 8b 75 fd 48 c7 c7 40 6d a6 8a c6 05 94 2e 51 0a 01 e8 f1 86 b4 05 <0f> 0b e9 0f ff ff ff e8 78 8b 75 fd 0f b6 1d 7e 2e 51 0a 31 ff 89
RSP: 0000:ffffc900000678d0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88813ff58000 RSI: ffffffff8166b52c RDI: fffff5200000cf0c
RBP: ffff8881474aa210 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff88823ffff000 CR3: 000000000c48e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __refcount_add include/linux/refcount.h:199 [inline]
 __refcount_inc include/linux/refcount.h:250 [inline]
 refcount_inc include/linux/refcount.h:267 [inline]
 kref_get include/linux/kref.h:45 [inline]
 dvb_device_get drivers/media/dvb-core/dvbdev.c:585 [inline]
 dvb_register_device+0xe83/0x16e0 drivers/media/dvb-core/dvbdev.c:517
 dvb_register_frontend+0x58f/0x8c0 drivers/media/dvb-core/dvb_frontend.c:3044
 vidtv_bridge_dvb_init drivers/media/test-drivers/vidtv/vidtv_bridge.c:430 [inline]
 vidtv_bridge_probe+0x450/0x9f0 drivers/media/test-drivers/vidtv/vidtv_bridge.c:502
 platform_probe+0x100/0x1f0 drivers/base/platform.c:1400
 call_driver_probe drivers/base/dd.c:560 [inline]
 really_probe+0x249/0xb90 drivers/base/dd.c:639
 __driver_probe_device+0x1df/0x4d0 drivers/base/dd.c:778
 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:808
 __driver_attach+0x271/0x570 drivers/base/dd.c:1194
 bus_for_each_dev+0x14b/0x1d0 drivers/base/bus.c:301
 bus_add_driver+0x4cd/0x640 drivers/base/bus.c:618
 driver_register+0x224/0x3a0 drivers/base/driver.c:246
 vidtv_bridge_init+0x3b/0x68 drivers/media/test-drivers/vidtv/vidtv_bridge.c:594
 do_one_initcall+0x141/0x790 init/main.c:1306
 do_initcall_level init/main.c:1379 [inline]
 do_initcalls init/main.c:1395 [inline]
 do_basic_setup init/main.c:1414 [inline]
 kernel_init_freeable+0x6f9/0x782 init/main.c:1634
 kernel_init+0x1e/0x1d0 init/main.c:1522
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

Crashes (42):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/06 14:58 linux-next 5d562c48a21e d88f3abb .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/06 14:58 linux-next 5d562c48a21e d88f3abb .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/06 06:53 linux-next 5d562c48a21e 045cbb84 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/06 06:53 linux-next 5d562c48a21e 045cbb84 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/06 06:53 linux-next 5d562c48a21e 045cbb84 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/05 15:16 linux-next ee9bda616d36 045cbb84 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/05 15:16 linux-next ee9bda616d36 045cbb84 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/05 15:16 linux-next ee9bda616d36 045cbb84 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/05 12:12 linux-next ee9bda616d36 e080de16 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/05 12:11 linux-next ee9bda616d36 e080de16 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/05 12:11 linux-next ee9bda616d36 e080de16 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/02 11:37 linux-next 5be860bfc734 e080de16 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/02 11:37 linux-next 5be860bfc734 e080de16 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/02 11:37 linux-next 5be860bfc734 e080de16 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/01 14:59 linux-next 2934ceb4e967 e080de16 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/01 14:59 linux-next 2934ceb4e967 e080de16 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/01 14:58 linux-next 2934ceb4e967 e080de16 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/01 05:30 linux-next 2934ceb4e967 4c2a66e8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/01 05:30 linux-next 2934ceb4e967 4c2a66e8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/12/01 05:30 linux-next 2934ceb4e967 4c2a66e8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/30 09:44 linux-next 700e0cd3a5ce 4c2a66e8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/30 09:44 linux-next 700e0cd3a5ce 4c2a66e8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/30 09:44 linux-next 700e0cd3a5ce 4c2a66e8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/30 08:19 linux-next 700e0cd3a5ce 05dc7993 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/30 08:19 linux-next 700e0cd3a5ce 05dc7993 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/30 08:18 linux-next 700e0cd3a5ce 05dc7993 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/29 12:34 linux-next 13ee7ef407cf 05dc7993 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/29 12:33 linux-next 13ee7ef407cf 05dc7993 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/29 12:33 linux-next 13ee7ef407cf 05dc7993 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/29 04:38 linux-next 13ee7ef407cf ca9683b8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/29 04:37 linux-next 13ee7ef407cf ca9683b8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/29 04:37 linux-next 13ee7ef407cf ca9683b8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/29 00:28 linux-next 15f2f20ccbf2 ca9683b8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/29 00:28 linux-next 15f2f20ccbf2 ca9683b8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/29 00:28 linux-next 15f2f20ccbf2 ca9683b8 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/28 12:08 linux-next 15f2f20ccbf2 247de55b .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/28 12:08 linux-next 15f2f20ccbf2 247de55b .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/28 12:08 linux-next 15f2f20ccbf2 247de55b .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/28 10:21 linux-next 15f2f20ccbf2 74a66371 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/28 10:20 linux-next 15f2f20ccbf2 74a66371 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
2022/11/28 10:20 linux-next 15f2f20ccbf2 74a66371 .config console log report ci-upstream-linux-next-kasan-gce-root linux-next boot error: WARNING: refcount bug in dvb_register_device
* Struck through repros no longer work on HEAD.