syzbot


memory leak in kobject_set_name_vargs (4)

Status: fixed on 2021/11/10 00:51
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+859119106243eb95085b@syzkaller.appspotmail.com
Fix commit: 8fd0c1b0647a nilfs2: fix memory leak in nilfs_sysfs_delete_device_group
First crash: 1478d, last: 1187d
Discussions (1)
Title Replies (including bot) Last reply
memory leak in kobject_set_name_vargs (4) 0 (1) 2020/11/20 16:15
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in kobject_set_name_vargs kernel C 12 1982d 2015d 12/28 fixed on 2019/07/10 21:40
upstream memory leak in kobject_set_name_vargs (3) nilfs C 19 1479d 1535d 15/28 fixed on 2020/11/16 12:12
upstream memory leak in kobject_set_name_vargs (5) nilfs C 4 793d 895d 22/28 fixed on 2023/02/24 13:51
upstream memory leak in kobject_set_name_vargs (2) C done 47 1776d 1960d 15/28 fixed on 2020/02/18 14:31

Sample crash report:
BUG: memory leak
unreferenced object 0xffff8881157689e0 (size 32):
  comm "kworker/u4:0", pid 8, jiffies 4294942320 (age 15.600s)
  hex dump (first 32 bytes):
    31 3a 30 3a 30 3a 30 00 00 00 00 00 00 00 00 00  1:0:0:0.........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff8147f036>] kstrdup+0x36/0x70 mm/util.c:60
    [<ffffffff8147f0c3>] kstrdup_const+0x53/0x80 mm/util.c:83
    [<ffffffff8228e402>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<ffffffff8235057b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:289
    [<ffffffff8264d273>] dev_set_name+0x63/0x90 drivers/base/core.c:3143
    [<ffffffff8224f871>] bsg_register_queue+0xe1/0x1d0 block/bsg.c:201
    [<ffffffff8272b7bf>] scsi_sysfs_add_sdev+0x13f/0x380 drivers/scsi/scsi_sysfs.c:1376
    [<ffffffff82729009>] scsi_sysfs_add_devices drivers/scsi/scsi_scan.c:1727 [inline]
    [<ffffffff82729009>] scsi_finish_async_scan drivers/scsi/scsi_scan.c:1812 [inline]
    [<ffffffff82729009>] do_scan_async+0x109/0x200 drivers/scsi/scsi_scan.c:1855
    [<ffffffff812750f4>] async_run_entry_fn+0x24/0xf0 kernel/async.c:127
    [<ffffffff81263b8f>] process_one_work+0x2cf/0x620 kernel/workqueue.c:2297
    [<ffffffff81264499>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2444
    [<ffffffff8126d998>] kthread+0x188/0x1d0 kernel/kthread.c:319
    [<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff88810ab26800 (size 256):
  comm "kworker/u4:0", pid 8, jiffies 4294942320 (age 15.600s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 08 68 b2 0a 81 88 ff ff  .........h......
    08 68 b2 0a 81 88 ff ff 10 d3 64 82 ff ff ff ff  .h........d.....
  backtrace:
    [<ffffffff82652c2b>] kmalloc include/linux/slab.h:591 [inline]
    [<ffffffff82652c2b>] kzalloc include/linux/slab.h:721 [inline]
    [<ffffffff82652c2b>] device_private_init drivers/base/core.c:3199 [inline]
    [<ffffffff82652c2b>] device_add+0x89b/0xdf0 drivers/base/core.c:3249
    [<ffffffff815764e4>] cdev_device_add+0x84/0xe0 fs/char_dev.c:549
    [<ffffffff8224f89f>] bsg_register_queue+0x10f/0x1d0 block/bsg.c:206
    [<ffffffff8272b7bf>] scsi_sysfs_add_sdev+0x13f/0x380 drivers/scsi/scsi_sysfs.c:1376
    [<ffffffff82729009>] scsi_sysfs_add_devices drivers/scsi/scsi_scan.c:1727 [inline]
    [<ffffffff82729009>] scsi_finish_async_scan drivers/scsi/scsi_scan.c:1812 [inline]
    [<ffffffff82729009>] do_scan_async+0x109/0x200 drivers/scsi/scsi_scan.c:1855
    [<ffffffff812750f4>] async_run_entry_fn+0x24/0xf0 kernel/async.c:127
    [<ffffffff81263b8f>] process_one_work+0x2cf/0x620 kernel/workqueue.c:2297
    [<ffffffff81264499>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2444
    [<ffffffff8126d998>] kthread+0x188/0x1d0 kernel/kthread.c:319
    [<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff8881157687a0 (size 32):
  comm "kworker/u4:0", pid 8, jiffies 4294942321 (age 15.590s)
  hex dump (first 32 bytes):
    31 3a 30 3a 30 3a 31 00 00 00 00 00 00 00 00 00  1:0:0:1.........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff8147f036>] kstrdup+0x36/0x70 mm/util.c:60
    [<ffffffff8147f0c3>] kstrdup_const+0x53/0x80 mm/util.c:83
    [<ffffffff8228e402>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<ffffffff8235057b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:289
    [<ffffffff8264d273>] dev_set_name+0x63/0x90 drivers/base/core.c:3143
    [<ffffffff8224f871>] bsg_register_queue+0xe1/0x1d0 block/bsg.c:201
    [<ffffffff8272b7bf>] scsi_sysfs_add_sdev+0x13f/0x380 drivers/scsi/scsi_sysfs.c:1376
    [<ffffffff82729009>] scsi_sysfs_add_devices drivers/scsi/scsi_scan.c:1727 [inline]
    [<ffffffff82729009>] scsi_finish_async_scan drivers/scsi/scsi_scan.c:1812 [inline]
    [<ffffffff82729009>] do_scan_async+0x109/0x200 drivers/scsi/scsi_scan.c:1855
    [<ffffffff812750f4>] async_run_entry_fn+0x24/0xf0 kernel/async.c:127
    [<ffffffff81263b8f>] process_one_work+0x2cf/0x620 kernel/workqueue.c:2297
    [<ffffffff81264499>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2444
    [<ffffffff8126d998>] kthread+0x188/0x1d0 kernel/kthread.c:319
    [<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff888117484b00 (size 256):
  comm "kworker/u4:0", pid 8, jiffies 4294942321 (age 15.590s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 08 4b 48 17 81 88 ff ff  .........KH.....
    08 4b 48 17 81 88 ff ff 10 d3 64 82 ff ff ff ff  .KH.......d.....
  backtrace:
    [<ffffffff82652c2b>] kmalloc include/linux/slab.h:591 [inline]
    [<ffffffff82652c2b>] kzalloc include/linux/slab.h:721 [inline]
    [<ffffffff82652c2b>] device_private_init drivers/base/core.c:3199 [inline]
    [<ffffffff82652c2b>] device_add+0x89b/0xdf0 drivers/base/core.c:3249
    [<ffffffff815764e4>] cdev_device_add+0x84/0xe0 fs/char_dev.c:549
    [<ffffffff8224f89f>] bsg_register_queue+0x10f/0x1d0 block/bsg.c:206
    [<ffffffff8272b7bf>] scsi_sysfs_add_sdev+0x13f/0x380 drivers/scsi/scsi_sysfs.c:1376
    [<ffffffff82729009>] scsi_sysfs_add_devices drivers/scsi/scsi_scan.c:1727 [inline]
    [<ffffffff82729009>] scsi_finish_async_scan drivers/scsi/scsi_scan.c:1812 [inline]
    [<ffffffff82729009>] do_scan_async+0x109/0x200 drivers/scsi/scsi_scan.c:1855
    [<ffffffff812750f4>] async_run_entry_fn+0x24/0xf0 kernel/async.c:127
    [<ffffffff81263b8f>] process_one_work+0x2cf/0x620 kernel/workqueue.c:2297
    [<ffffffff81264499>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2444
    [<ffffffff8126d998>] kthread+0x188/0x1d0 kernel/kthread.c:319
    [<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295


Crashes (171):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/03 17:57 upstream a9c9a6f741cd f62a5829 .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/08 12:15 upstream 614124bea77e b718257f .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/31 02:34 upstream b90e90f40b4f 325a8dab .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/22 09:46 upstream 45af60e7ced0 3c7fef33 .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/20 05:49 upstream c3d0e3fd41b7 a343ba6b .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/17 19:50 upstream d07f6ca923ea a2eb125d .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/16 17:02 upstream 63d1cb53e26a f54a5c09 .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/15 18:33 upstream 25a1298726e9 93f844de .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/09 14:51 upstream b741596468b0 bc5434be .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/07 11:57 upstream e48661230cc3 f6da8120 .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/06 21:03 upstream 322a3b843d7f 06585184 .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/06 20:19 upstream 322a3b843d7f 06585184 .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/05 15:45 upstream d665ea6ea86c 06c27ff5 .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/05 14:24 upstream d665ea6ea86c 06c27ff5 .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/01/16 18:40 upstream 1d94330a437a 65a7a854 .config console log report syz C ci-upstream-gce-leak
2020/11/19 13:21 upstream c2e7554e1b85 0767f13f .config console log report syz C ci-upstream-gce-leak
2020/11/16 16:07 upstream 09162bc32c88 1bf9a662 .config console log report syz C ci-upstream-gce-leak
2021/08/14 18:29 upstream dfa377c35d70 2489ab88 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/21 23:28 upstream 13311e74253f aba2b2fb .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/20 07:13 upstream 9ed13a17e38e aba2b2fb .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/20 03:45 upstream 9ed13a17e38e aba2b2fb .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/18 12:43 upstream fd0aa1a4567d aba2b2fb .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/17 20:54 upstream 70585216fe77 aba2b2fb .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/16 17:31 upstream 94f0b2d4a1d0 c06f97ad .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/14 02:53 upstream e4e453434a19 1ba81399 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/13 16:12 upstream 8ecfa36cd4db 1ba81399 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/12 03:25 upstream f21b807c3cf8 1ba81399 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/11 05:41 upstream f09eacca59d2 1ba81399 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/08 03:43 upstream 614124bea77e e59537be .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/06 11:23 upstream f5b6eb1e0182 500c2339 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/06 08:15 upstream 9d32fa5d74b1 500c2339 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/05 13:28 upstream 16f0596fc1d7 500c2339 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/06/01 09:17 upstream c2131f7e73c9 032639db .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/31 00:02 upstream b90e90f40b4f 325a8dab .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/29 09:02 upstream 5ff2756afde0 858ea628 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/26 17:27 upstream ad9f25d33860 54f0bcf1 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/25 18:27 upstream a050a6d2b7e8 93d3a9f6 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/23 20:54 upstream 4d7620341eda 3c7fef33 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/22 16:41 upstream 45af60e7ced0 3c7fef33 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/20 23:48 upstream f01da525b3de c560a65d .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/20 22:49 upstream f01da525b3de c560a65d .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/19 05:46 upstream 8ac91e6c6033 a343ba6b .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/15 06:54 upstream bd3c9cdb21a2 8bdd5343 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/08 17:14 upstream dd860052c99b bc5434be .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2021/05/05 19:18 upstream d665ea6ea86c 06c27ff5 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
* Struck through repros no longer work on HEAD.