syzbot


memory leak in em28xx_dvb_init

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+889397c820fa56adf25d@syzkaller.appspotmail.com
Fix commit: 0ae10a7dc899 media: em28xx: fix memory leak
First crash: 560d, last: 560d
Patch testing requests:
Created Duration User Patch Repo Result
2021/03/26 22:40 16m paskripkin@gmail.com https://linux.googlesource.com/linux/kernel/git/torvalds/linux refs/changes/36/9536/1 OK
2021/03/16 23:09 8m paskripkin@gmail.com https://linux.googlesource.com/linux/kernel/git/torvalds/linux refs/changes/36/9236/1 report log

Sample crash report:
BUG: memory leak
unreferenced object 0xffff888110082700 (size 64):
  comm "kworker/1:2", pid 57, jiffies 4294943656 (age 13.350s)
  hex dump (first 32 bytes):
    c0 40 0d 0d 81 88 ff ff 40 4b 0d 0d 81 88 ff ff  .@......@K......
    c0 bc d4 0f 81 88 ff ff 00 b3 d4 0f 81 88 ff ff  ................
  backtrace:
    [<ffffffff8304c141>] kmalloc_array.constprop.0+0x41/0x60 include/linux/slab.h:594
    [<ffffffff8304dba2>] kcalloc include/linux/slab.h:623 [inline]
    [<ffffffff8304dba2>] em28xx_alloc_urbs+0x102/0x550 drivers/media/usb/em28xx/em28xx-core.c:930
    [<ffffffff84279fa7>] em28xx_dvb_init drivers/media/usb/em28xx/em28xx-dvb.c:1517 [inline]
    [<ffffffff84279fa7>] em28xx_dvb_init.cold+0xa3/0x2bb1 drivers/media/usb/em28xx/em28xx-dvb.c:1483
    [<ffffffff8304e33b>] em28xx_init_extension+0x9b/0xe0 drivers/media/usb/em28xx/em28xx-core.c:1126
    [<ffffffff83050143>] request_module_async+0x33/0x40 drivers/media/usb/em28xx/em28xx-cards.c:3406
    [<ffffffff81259229>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2275
    [<ffffffff81259dbb>] process_scheduled_works kernel/workqueue.c:2337 [inline]
    [<ffffffff81259dbb>] worker_thread+0x2fb/0x5d0 kernel/workqueue.c:2426
    [<ffffffff81261228>] kthread+0x178/0x1b0 kernel/kthread.c:292
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff8881100825c0 (size 64):
  comm "kworker/1:2", pid 57, jiffies 4294943656 (age 13.350s)
  hex dump (first 32 bytes):
    00 00 b8 10 81 88 ff ff 00 00 b8 0b 81 88 ff ff  ................
    00 00 b9 0b 81 88 ff ff 00 00 16 13 81 88 ff ff  ................
  backtrace:
    [<ffffffff8304c141>] kmalloc_array.constprop.0+0x41/0x60 include/linux/slab.h:594
    [<ffffffff8304dbbc>] kcalloc include/linux/slab.h:623 [inline]
    [<ffffffff8304dbbc>] em28xx_alloc_urbs+0x11c/0x550 drivers/media/usb/em28xx/em28xx-core.c:934
    [<ffffffff84279fa7>] em28xx_dvb_init drivers/media/usb/em28xx/em28xx-dvb.c:1517 [inline]
    [<ffffffff84279fa7>] em28xx_dvb_init.cold+0xa3/0x2bb1 drivers/media/usb/em28xx/em28xx-dvb.c:1483
    [<ffffffff8304e33b>] em28xx_init_extension+0x9b/0xe0 drivers/media/usb/em28xx/em28xx-core.c:1126
    [<ffffffff83050143>] request_module_async+0x33/0x40 drivers/media/usb/em28xx/em28xx-cards.c:3406
    [<ffffffff81259229>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2275
    [<ffffffff81259dbb>] process_scheduled_works kernel/workqueue.c:2337 [inline]
    [<ffffffff81259dbb>] worker_thread+0x2fb/0x5d0 kernel/workqueue.c:2426
    [<ffffffff81261228>] kthread+0x178/0x1b0 kernel/kthread.c:292
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff88810d0d40c0 (size 192):
  comm "kworker/1:2", pid 57, jiffies 4294943656 (age 13.350s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 d8 40 0d 0d 81 88 ff ff  .........@......
  backtrace:
    [<ffffffff82b9eda6>] kmalloc include/linux/slab.h:559 [inline]
    [<ffffffff82b9eda6>] usb_alloc_urb+0x66/0xe0 drivers/usb/core/urb.c:74
    [<ffffffff8304dd07>] em28xx_alloc_urbs+0x267/0x550 drivers/media/usb/em28xx/em28xx-core.c:952
    [<ffffffff84279fa7>] em28xx_dvb_init drivers/media/usb/em28xx/em28xx-dvb.c:1517 [inline]
    [<ffffffff84279fa7>] em28xx_dvb_init.cold+0xa3/0x2bb1 drivers/media/usb/em28xx/em28xx-dvb.c:1483
    [<ffffffff8304e33b>] em28xx_init_extension+0x9b/0xe0 drivers/media/usb/em28xx/em28xx-core.c:1126
    [<ffffffff83050143>] request_module_async+0x33/0x40 drivers/media/usb/em28xx/em28xx-cards.c:3406
    [<ffffffff81259229>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2275
    [<ffffffff81259dbb>] process_scheduled_works kernel/workqueue.c:2337 [inline]
    [<ffffffff81259dbb>] worker_thread+0x2fb/0x5d0 kernel/workqueue.c:2426
    [<ffffffff81261228>] kthread+0x178/0x1b0 kernel/kthread.c:292
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff88810d0d4b40 (size 192):
  comm "kworker/1:2", pid 57, jiffies 4294943656 (age 13.350s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 58 4b 0d 0d 81 88 ff ff  ........XK......
  backtrace:
    [<ffffffff82b9eda6>] kmalloc include/linux/slab.h:559 [inline]
    [<ffffffff82b9eda6>] usb_alloc_urb+0x66/0xe0 drivers/usb/core/urb.c:74
    [<ffffffff8304dd07>] em28xx_alloc_urbs+0x267/0x550 drivers/media/usb/em28xx/em28xx-core.c:952
    [<ffffffff84279fa7>] em28xx_dvb_init drivers/media/usb/em28xx/em28xx-dvb.c:1517 [inline]
    [<ffffffff84279fa7>] em28xx_dvb_init.cold+0xa3/0x2bb1 drivers/media/usb/em28xx/em28xx-dvb.c:1483
    [<ffffffff8304e33b>] em28xx_init_extension+0x9b/0xe0 drivers/media/usb/em28xx/em28xx-core.c:1126
    [<ffffffff83050143>] request_module_async+0x33/0x40 drivers/media/usb/em28xx/em28xx-cards.c:3406
    [<ffffffff81259229>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2275
    [<ffffffff81259dbb>] process_scheduled_works kernel/workqueue.c:2337 [inline]
    [<ffffffff81259dbb>] worker_thread+0x2fb/0x5d0 kernel/workqueue.c:2426
    [<ffffffff81261228>] kthread+0x178/0x1b0 kernel/kthread.c:292
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff88810fd4bcc0 (size 192):
  comm "kworker/1:2", pid 57, jiffies 4294943656 (age 13.350s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 d8 bc d4 0f 81 88 ff ff  ................
  backtrace:
    [<ffffffff82b9eda6>] kmalloc include/linux/slab.h:559 [inline]
    [<ffffffff82b9eda6>] usb_alloc_urb+0x66/0xe0 drivers/usb/core/urb.c:74
    [<ffffffff8304dd07>] em28xx_alloc_urbs+0x267/0x550 drivers/media/usb/em28xx/em28xx-core.c:952
    [<ffffffff84279fa7>] em28xx_dvb_init drivers/media/usb/em28xx/em28xx-dvb.c:1517 [inline]
    [<ffffffff84279fa7>] em28xx_dvb_init.cold+0xa3/0x2bb1 drivers/media/usb/em28xx/em28xx-dvb.c:1483
    [<ffffffff8304e33b>] em28xx_init_extension+0x9b/0xe0 drivers/media/usb/em28xx/em28xx-core.c:1126
    [<ffffffff83050143>] request_module_async+0x33/0x40 drivers/media/usb/em28xx/em28xx-cards.c:3406
    [<ffffffff81259229>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2275
    [<ffffffff81259dbb>] process_scheduled_works kernel/workqueue.c:2337 [inline]
    [<ffffffff81259dbb>] worker_thread+0x2fb/0x5d0 kernel/workqueue.c:2426
    [<ffffffff81261228>] kthread+0x178/0x1b0 kernel/kthread.c:292
    [<ffffffff8100227f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294


Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-gce-leak 2021/03/16 08:56 upstream 1a4431a5db2b fdb2bb2c .config log report syz C memory leak in em28xx_dvb_init
* Struck through repros no longer work on HEAD.