syzbot


memory leak in mcba_usb_probe

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+57281c762a3922e14dfe@syzkaller.appspotmail.com
Fix commit: 91c02557174b can: mcba_usb: fix memory leak in mcba_usb
First crash: 717d, last: 536d
Patch testing requests:
Created Duration User Patch Repo Result
2021/06/09 21:10 16m paskripkin@gmail.com patch upstream OK
2021/04/13 19:30 16m paskripkin@gmail.com https://linux.googlesource.com/linux/kernel/git/torvalds/linux refs/changes/77/10177/1 OK
2021/01/23 08:46 13m minhquangbui99@gmail.com https://github.com/minhbq-99/linux.git 3e120345e6348326a35cc6db91e4ad36eedae01d report log
2021/01/10 11:19 13m minhquangbui99@gmail.com https://github.com/minhbq-99/linux.git b61f738a34ebddc47b4d0af9bdab1964b6287ec7 report log
2021/01/10 08:54 13m minhquangbui99@gmail.com https://github.com/minhbq-99/linux.git 080e743dff190ee8ebec63a13ac33fe8b7e4fc9e report log

Sample crash report:
BUG: memory leak
unreferenced object 0xffff888111e20c40 (size 64):
  comm "kworker/1:1", pid 34, jiffies 4294942163 (age 8.260s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000b9d0f7bf>] kmalloc include/linux/slab.h:557 [inline]
    [<00000000b9d0f7bf>] hcd_buffer_alloc+0x149/0x190 drivers/usb/core/buffer.c:134
    [<0000000020259e3e>] usb_alloc_coherent+0x42/0x60 drivers/usb/core/usb.c:897
    [<0000000080c9ec3a>] mcba_usb_start drivers/net/can/usb/mcba_usb.c:644 [inline]
    [<0000000080c9ec3a>] mcba_usb_probe+0x27b/0x430 drivers/net/can/usb/mcba_usb.c:846
    [<00000000ae23245f>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
    [<000000004bac937f>] really_probe+0x159/0x4a0 drivers/base/dd.c:554
    [<000000007c9531c8>] driver_probe_device+0x84/0x100 drivers/base/dd.c:740
    [<00000000798ee113>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:846
    [<00000000ffc72da5>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
    [<000000002b833a31>] __device_attach+0x122/0x250 drivers/base/dd.c:914
    [<000000005d19b5ce>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491
    [<0000000018a5392b>] device_add+0x5be/0xc30 drivers/base/core.c:3109
    [<0000000092191d7a>] usb_set_configuration+0x9d9/0xb90 drivers/usb/core/message.c:2164
    [<000000003d9502cd>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238
    [<000000008c2f1b81>] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293
    [<000000004bac937f>] really_probe+0x159/0x4a0 drivers/base/dd.c:554
    [<000000007c9531c8>] driver_probe_device+0x84/0x100 drivers/base/dd.c:740

BUG: memory leak
unreferenced object 0xffff888111e20c00 (size 64):
  comm "kworker/1:1", pid 34, jiffies 4294942163 (age 8.260s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000b9d0f7bf>] kmalloc include/linux/slab.h:557 [inline]
    [<00000000b9d0f7bf>] hcd_buffer_alloc+0x149/0x190 drivers/usb/core/buffer.c:134
    [<0000000020259e3e>] usb_alloc_coherent+0x42/0x60 drivers/usb/core/usb.c:897
    [<0000000080c9ec3a>] mcba_usb_start drivers/net/can/usb/mcba_usb.c:644 [inline]
    [<0000000080c9ec3a>] mcba_usb_probe+0x27b/0x430 drivers/net/can/usb/mcba_usb.c:846
    [<00000000ae23245f>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
    [<000000004bac937f>] really_probe+0x159/0x4a0 drivers/base/dd.c:554
    [<000000007c9531c8>] driver_probe_device+0x84/0x100 drivers/base/dd.c:740
    [<00000000798ee113>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:846
    [<00000000ffc72da5>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
    [<000000002b833a31>] __device_attach+0x122/0x250 drivers/base/dd.c:914
    [<000000005d19b5ce>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491
    [<0000000018a5392b>] device_add+0x5be/0xc30 drivers/base/core.c:3109
    [<0000000092191d7a>] usb_set_configuration+0x9d9/0xb90 drivers/usb/core/message.c:2164
    [<000000003d9502cd>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238
    [<000000008c2f1b81>] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293
    [<000000004bac937f>] really_probe+0x159/0x4a0 drivers/base/dd.c:554
    [<000000007c9531c8>] driver_probe_device+0x84/0x100 drivers/base/dd.c:740

BUG: memory leak
unreferenced object 0xffff888111e20bc0 (size 64):
  comm "kworker/1:1", pid 34, jiffies 4294942163 (age 8.260s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000b9d0f7bf>] kmalloc include/linux/slab.h:557 [inline]
    [<00000000b9d0f7bf>] hcd_buffer_alloc+0x149/0x190 drivers/usb/core/buffer.c:134
    [<0000000020259e3e>] usb_alloc_coherent+0x42/0x60 drivers/usb/core/usb.c:897
    [<0000000080c9ec3a>] mcba_usb_start drivers/net/can/usb/mcba_usb.c:644 [inline]
    [<0000000080c9ec3a>] mcba_usb_probe+0x27b/0x430 drivers/net/can/usb/mcba_usb.c:846
    [<00000000ae23245f>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
    [<000000004bac937f>] really_probe+0x159/0x4a0 drivers/base/dd.c:554
    [<000000007c9531c8>] driver_probe_device+0x84/0x100 drivers/base/dd.c:740
    [<00000000798ee113>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:846
    [<00000000ffc72da5>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
    [<000000002b833a31>] __device_attach+0x122/0x250 drivers/base/dd.c:914
    [<000000005d19b5ce>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491
    [<0000000018a5392b>] device_add+0x5be/0xc30 drivers/base/core.c:3109
    [<0000000092191d7a>] usb_set_configuration+0x9d9/0xb90 drivers/usb/core/message.c:2164
    [<000000003d9502cd>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238
    [<000000008c2f1b81>] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293
    [<000000004bac937f>] really_probe+0x159/0x4a0 drivers/base/dd.c:554
    [<000000007c9531c8>] driver_probe_device+0x84/0x100 drivers/base/dd.c:740


Crashes (34):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-gce-leak 2021/02/19 23:57 upstream f40ddce88593 f689d40a .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/18 08:49 upstream f40ddce88593 14052202 .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/17 09:04 upstream f40ddce88593 052f8d9f .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/15 06:13 upstream f40ddce88593 98682e5e .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/14 22:04 upstream 358feceebbf6 98682e5e .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/14 00:58 upstream ac30d8ce28d6 98682e5e .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/13 02:18 upstream dcc0b49040c7 98682e5e .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/11 03:07 upstream 291009f656e8 a52ee10a .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/10 10:58 upstream e0756cfc7d7c 2bd9619f .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/09 02:44 upstream e0756cfc7d7c 2bd9619f .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/08 12:50 upstream 92bf22614b21 2ce644fc .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/08 07:48 upstream b75dba7f472c 2ce644fc .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/08 07:15 upstream b75dba7f472c 2ce644fc .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/07 13:29 upstream 825b5991a46e 2ce644fc .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/07 06:01 upstream 964d069f93c4 0655e081 .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/06 06:27 upstream 1e0d27fce010 23a562df .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/05 17:54 upstream dd86e7fa07a3 23a562df .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/04 14:57 upstream 61556703b610 42b90a7c .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/03 23:34 upstream 3afe9076a7c1 624dad51 .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/02/03 03:52 upstream 3aaf0a27ffc2 624dad51 .config log report syz C memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/01/10 03:09 upstream 996e435fd401 2c1f2513 .config log report syz C
ci-upstream-gce-leak 2021/01/09 06:19 upstream 6279d812eab6 c104d4a3 .config log report syz C
ci-upstream-gce-leak 2021/01/06 18:04 upstream 9f1abbe97c08 c104d4a3 .config log report syz C
ci-upstream-gce-leak 2021/01/06 17:11 upstream 9f1abbe97c08 c104d4a3 .config log report syz C
ci-upstream-gce-leak 2020/12/26 10:04 upstream 5814bc2d4cc2 821e0b09 .config log report syz C
ci-upstream-gce-leak 2020/12/23 19:26 upstream 614cb5894306 c2c1d1dd .config log report syz C
ci-upstream-gce-leak 2020/12/23 02:05 upstream 614cb5894306 04201c06 .config log report syz C
ci-upstream-gce-leak 2020/12/20 17:29 upstream 467f8165a2b0 04201c06 .config log report syz C
ci-upstream-gce-leak 2020/12/19 08:06 upstream a409ed156a90 04201c06 .config log report syz C
ci-upstream-gce-leak 2020/12/17 16:09 upstream accefff5b547 04201c06 .config log report syz C
ci-upstream-gce-leak 2020/12/17 08:43 upstream 5e60366d56c6 04201c06 .config log report syz C
ci-upstream-gce-leak 2021/06/16 05:20 upstream 94f0b2d4a1d0 990d3cbe .config log report syz memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/06/13 10:06 upstream 8ecfa36cd4db 1ba81399 .config log report syz memory leak in mcba_usb_probe
ci-upstream-gce-leak 2021/06/10 00:04 upstream 368094df48e6 84fe5d96 .config log report syz memory leak in mcba_usb_probe
* Struck through repros no longer work on HEAD.