syzbot


memory leak in snd_ctl_led_register

Status: fixed on 2021/11/10 00:50
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+08a7d8b51ea048a74ffb@syzkaller.appspotmail.com
Fix commit: 3ae72f6ab9c1 ALSA: control led: fix memory leak in snd_ctl_led_register
First crash: 1329d, last: 1329d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH v2] ALSA: control led: fix memory leak in snd_ctl_led_register 4 (4) 2021/06/02 06:59
[PATCH] ALSA: control led: fix memory leak in snd_ctl_led_register 27 (27) 2021/06/01 15:52
[syzbot] memory leak in snd_ctl_led_register 0 (1) 2021/05/17 08:52
Last patch testing requests (2)
Created Duration User Patch Repo Result
2021/05/28 10:45 16m mudongliangabcd@gmail.com https://github.com/mudongliang/linux 94201c8f1b3d9efd927a783b8d949b4be0bd4892 OK
2021/05/25 06:06 9m mudongliangabcd@gmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log

Sample crash report:
BUG: memory leak
unreferenced object 0xffff888113a0ca00 (size 256):
  comm "kworker/1:1", pid 35, jiffies 4294942586 (age 13.780s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 08 ca a0 13 81 88 ff ff  ................
    08 ca a0 13 81 88 ff ff a0 5c 60 82 ff ff ff ff  .........\`.....
  backtrace:
    [<ffffffff8260b58c>] kmalloc include/linux/slab.h:556 [inline]
    [<ffffffff8260b58c>] kzalloc include/linux/slab.h:686 [inline]
    [<ffffffff8260b58c>] device_private_init drivers/base/core.c:3161 [inline]
    [<ffffffff8260b58c>] device_add+0x85c/0xd70 drivers/base/core.c:3211
    [<ffffffff8356aaef>] snd_ctl_led_sysfs_add sound/core/control_led.c:670 [inline]
    [<ffffffff8356aaef>] snd_ctl_led_register+0x1af/0x2f0 sound/core/control_led.c:361
    [<ffffffff8355e0a8>] snd_ctl_dev_register+0x78/0xb0 sound/core/control.c:2156
    [<ffffffff83563fab>] __snd_device_register sound/core/device.c:149 [inline]
    [<ffffffff83563fab>] __snd_device_register sound/core/device.c:145 [inline]
    [<ffffffff83563fab>] snd_device_register_all+0x7b/0xd0 sound/core/device.c:197
    [<ffffffff8355ccc0>] snd_card_register+0x90/0x2b0 sound/core/init.c:773
    [<ffffffff83648737>] usX2Y_usb_probe sound/usb/usx2y/usbusx2y.c:382 [inline]
    [<ffffffff83648737>] snd_usX2Y_probe+0x277/0x2f0 sound/usb/usx2y/usbusx2y.c:398
    [<ffffffff82bcf687>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
    [<ffffffff82610359>] really_probe+0x159/0x500 drivers/base/dd.c:576
    [<ffffffff8261078b>] driver_probe_device+0x8b/0x100 drivers/base/dd.c:763
    [<ffffffff82610eb6>] __device_attach_driver+0xf6/0x120 drivers/base/dd.c:870
    [<ffffffff8260d247>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
    [<ffffffff82610a32>] __device_attach+0x122/0x260 drivers/base/dd.c:938
    [<ffffffff8260eee6>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491
    [<ffffffff8260b305>] device_add+0x5d5/0xd70 drivers/base/core.c:3319
    [<ffffffff82bccc29>] usb_set_configuration+0x9d9/0xb90 drivers/usb/core/message.c:2164
    [<ffffffff82bdcfbc>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238

BUG: memory leak
unreferenced object 0xffff888113a0c900 (size 256):
  comm "kworker/1:1", pid 35, jiffies 4294942586 (age 13.780s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 08 c9 a0 13 81 88 ff ff  ................
    08 c9 a0 13 81 88 ff ff a0 5c 60 82 ff ff ff ff  .........\`.....
  backtrace:
    [<ffffffff8260b58c>] kmalloc include/linux/slab.h:556 [inline]
    [<ffffffff8260b58c>] kzalloc include/linux/slab.h:686 [inline]
    [<ffffffff8260b58c>] device_private_init drivers/base/core.c:3161 [inline]
    [<ffffffff8260b58c>] device_add+0x85c/0xd70 drivers/base/core.c:3211
    [<ffffffff8356aaef>] snd_ctl_led_sysfs_add sound/core/control_led.c:670 [inline]
    [<ffffffff8356aaef>] snd_ctl_led_register+0x1af/0x2f0 sound/core/control_led.c:361
    [<ffffffff8355e0a8>] snd_ctl_dev_register+0x78/0xb0 sound/core/control.c:2156
    [<ffffffff83563fab>] __snd_device_register sound/core/device.c:149 [inline]
    [<ffffffff83563fab>] __snd_device_register sound/core/device.c:145 [inline]
    [<ffffffff83563fab>] snd_device_register_all+0x7b/0xd0 sound/core/device.c:197
    [<ffffffff8355ccc0>] snd_card_register+0x90/0x2b0 sound/core/init.c:773
    [<ffffffff83648737>] usX2Y_usb_probe sound/usb/usx2y/usbusx2y.c:382 [inline]
    [<ffffffff83648737>] snd_usX2Y_probe+0x277/0x2f0 sound/usb/usx2y/usbusx2y.c:398
    [<ffffffff82bcf687>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
    [<ffffffff82610359>] really_probe+0x159/0x500 drivers/base/dd.c:576
    [<ffffffff8261078b>] driver_probe_device+0x8b/0x100 drivers/base/dd.c:763
    [<ffffffff82610eb6>] __device_attach_driver+0xf6/0x120 drivers/base/dd.c:870
    [<ffffffff8260d247>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
    [<ffffffff82610a32>] __device_attach+0x122/0x260 drivers/base/dd.c:938
    [<ffffffff8260eee6>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491
    [<ffffffff8260b305>] device_add+0x5d5/0xd70 drivers/base/core.c:3319
    [<ffffffff82bccc29>] usb_set_configuration+0x9d9/0xb90 drivers/usb/core/message.c:2164
    [<ffffffff82bdcfbc>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238

BUG: memory leak
unreferenced object 0xffff888112c771c0 (size 32):
  comm "kworker/1:1", pid 35, jiffies 4294943217 (age 7.470s)
  hex dump (first 32 bytes):
    63 61 72 64 33 00 00 00 00 00 00 00 00 00 00 00  card3...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff82253d3c>] kvasprintf+0x6c/0xf0 lib/kasprintf.c:25
    [<ffffffff82253e18>] kvasprintf_const+0x58/0x110 lib/kasprintf.c:49
    [<ffffffff8231b16b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:289
    [<ffffffff82605c03>] dev_set_name+0x63/0x90 drivers/base/core.c:3105
    [<ffffffff8356aabe>] snd_ctl_led_sysfs_add sound/core/control_led.c:666 [inline]
    [<ffffffff8356aabe>] snd_ctl_led_register+0x17e/0x2f0 sound/core/control_led.c:361
    [<ffffffff8355e0a8>] snd_ctl_dev_register+0x78/0xb0 sound/core/control.c:2156
    [<ffffffff83563fab>] __snd_device_register sound/core/device.c:149 [inline]
    [<ffffffff83563fab>] __snd_device_register sound/core/device.c:145 [inline]
    [<ffffffff83563fab>] snd_device_register_all+0x7b/0xd0 sound/core/device.c:197
    [<ffffffff8355ccc0>] snd_card_register+0x90/0x2b0 sound/core/init.c:773
    [<ffffffff83648737>] usX2Y_usb_probe sound/usb/usx2y/usbusx2y.c:382 [inline]
    [<ffffffff83648737>] snd_usX2Y_probe+0x277/0x2f0 sound/usb/usx2y/usbusx2y.c:398
    [<ffffffff82bcf687>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396
    [<ffffffff82610359>] really_probe+0x159/0x500 drivers/base/dd.c:576
    [<ffffffff8261078b>] driver_probe_device+0x8b/0x100 drivers/base/dd.c:763
    [<ffffffff82610eb6>] __device_attach_driver+0xf6/0x120 drivers/base/dd.c:870
    [<ffffffff8260d247>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431
    [<ffffffff82610a32>] __device_attach+0x122/0x260 drivers/base/dd.c:938
    [<ffffffff8260eee6>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/07 12:22 upstream e48661230cc3 f6da8120 .config console log report syz C ci-upstream-gce-leak memory leak in snd_ctl_led_register
* Struck through repros no longer work on HEAD.