syzbot


KASAN: null-ptr-deref Read in ida_free

Status: auto-closed as invalid on 2021/04/09 00:32
Subsystems: media
[Documentation on labels]
Reported-by: syzbot+930c00d27e58b0d77fb9@syzkaller.appspotmail.com
First crash: 1171d, last: 1171d
Discussions (1)
Title Replies (including bot) Last reply
KASAN: null-ptr-deref Read in ida_free 0 (1) 2020/12/10 14:29
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: null-ptr-deref Read in ida_free C error 2 265d 335d 2/2 fixed on 2023/06/16 14:10
upstream KASAN: null-ptr-deref Read in ida_free (2) usb C done 3 609d 610d 22/26 fixed on 2023/02/24 13:50
upstream KASAN: null-ptr-deref Read in ida_free (4) bluetooth C done done 29 63d 102d 26/26 fixed on 2024/02/14 16:17
upstream KASAN: null-ptr-deref Read in ida_free (3) fs C error 4 335d 331d 22/26 fixed on 2023/06/08 14:41

Sample crash report:
input: TeVii S662 as /devices/platform/dummy_hcd.3/usb4/4-1/rc/rc0/input610
dvb-usb: schedule remote query interval to 250 msecs.
dw2102: su3000_power_ctrl: 0, initialized 1
dvb-usb: TeVii S662 successfully initialized and connected.
usb 4-1: USB disconnect, device number 114
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:71 [inline]
BUG: KASAN: null-ptr-deref in test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
BUG: KASAN: null-ptr-deref in ida_free+0x186/0x2b0 lib/idr.c:510
Read of size 8 at addr 0000000000000018 by task kworker/1:0/4637

CPU: 1 PID: 4637 Comm: kworker/1:0 Not tainted 5.10.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x107/0x163 lib/dump_stack.c:118
 __kasan_report mm/kasan/report.c:549 [inline]
 kasan_report.cold+0x5/0x37 mm/kasan/report.c:562
 check_memory_region_inline mm/kasan/generic.c:186 [inline]
 check_memory_region+0x13d/0x180 mm/kasan/generic.c:192
 instrument_atomic_read include/linux/instrumented.h:71 [inline]
 test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
 ida_free+0x186/0x2b0 lib/idr.c:510
 __media_device_unregister_entity+0x70/0x300 drivers/media/mc/mc-device.c:586
 media_device_unregister_entity+0x49/0x70 drivers/media/mc/mc-device.c:689
 dvb_media_device_free+0x1d5/0x620 drivers/media/dvb-core/dvbdev.c:226
 dvb_remove_device.part.0+0x9c/0x260 drivers/media/dvb-core/dvbdev.c:561
 dvb_remove_device drivers/media/dvb-core/dvbdev.c:554 [inline]
 dvb_unregister_device+0x1b/0x60 drivers/media/dvb-core/dvbdev.c:583
 dvb_dmxdev_release+0x1a0/0x640 drivers/media/dvb-core/dmxdev.c:1459
 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:114 [inline]
 dvb_usb_exit.isra.0+0xb4/0x310 drivers/media/usb/dvb-usb/dvb-usb-init.c:129
 dvb_usb_device_exit+0x111/0x1a0 drivers/media/usb/dvb-usb/dvb-usb-init.c:306
 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:458
 __device_release_driver+0x3bd/0x6f0 drivers/base/dd.c:1154
 device_release_driver_internal drivers/base/dd.c:1185 [inline]
 device_release_driver+0x26/0x40 drivers/base/dd.c:1208
 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533
 device_del+0x502/0xec0 drivers/base/core.c:3115
 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1413
 usb_disconnect.cold+0x27d/0x780 drivers/usb/core/hub.c:2218
 hub_port_connect drivers/usb/core/hub.c:5074 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5363 [inline]
 port_event drivers/usb/core/hub.c:5509 [inline]
 hub_event+0x1c8a/0x42d0 drivers/usb/core/hub.c:5591
 process_one_work+0x933/0x1520 kernel/workqueue.c:2272
 process_scheduled_works kernel/workqueue.c:2334 [inline]
 worker_thread+0x82b/0x1120 kernel/workqueue.c:2420
 kthread+0x38c/0x460 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/10 00:31 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 8010622c86ca c090b4da .config console log report info ci2-upstream-usb
* Struck through repros no longer work on HEAD.