syzbot


memory leak in kobject_set_name_vargs (5)

Status: fixed on 2023/02/24 13:51
Subsystems: nilfs
[Documentation on labels]
Reported-by: syzbot+7381dc4ad60658ca4c05@syzkaller.appspotmail.com
Fix commit: d0d51a97063d nilfs2: fix leak of nilfs_root in case of writer thread creation failure
First crash: 669d, last: 562d
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
memory leak in nilfs_sysfs_create_device_group nilfs syz 2 553d 560d 0/26 closed as dup on 2022/10/11 10:32
Discussions (10)
Title Replies (including bot) Last reply
[PATCH 4.19 000/229] 4.19.262-rc1 review 242 (242) 2022/11/01 13:44
[PATCH 4.9 000/159] 4.9.331-rc1 review 165 (165) 2022/10/25 17:41
[PATCH 4.14 000/210] 4.14.296-rc1 review 213 (213) 2022/10/25 17:38
[PATCH 5.4 00/38] 5.4.218-rc1 review 45 (45) 2022/10/17 01:35
[PATCH 5.10 00/54] 5.10.148-rc1 review 64 (64) 2022/10/17 01:33
[PATCH 6.0 00/34] 6.0.2-rc1 review 49 (49) 2022/10/15 01:33
[PATCH 5.19 00/33] 5.19.16-rc1 review 44 (44) 2022/10/14 23:08
[PATCH 5.15 00/27] 5.15.74-rc1 review 31 (31) 2022/10/14 16:33
[PATCH] nilfs2: fix leak of nilfs_root in case of writer thread creation failure 1 (1) 2022/10/07 08:52
[syzbot] memory leak in kobject_set_name_vargs (5) 0 (2) 2022/08/04 22:00
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 1751d 1785d 12/26 fixed on 2019/07/10 21:40
upstream memory leak in kobject_set_name_vargs (3) nilfs C 19 1248d 1304d 15/26 fixed on 2020/11/16 12:12
upstream memory leak in kobject_set_name_vargs (2) C done 47 1545d 1730d 15/26 fixed on 2020/02/18 14:31
upstream memory leak in kobject_set_name_vargs (4) kernel C 171 957d 1244d 20/26 fixed on 2021/11/10 00:51

Sample crash report:
BUG: memory leak
unreferenced object 0xffff88810c35db80 (size 32):
  comm "syz-executor261", pid 3645, jiffies 4294950822 (age 25.990s)
  hex dump (first 32 bytes):
    6c 6f 6f 70 37 00 00 00 00 00 00 00 00 00 00 00  loop7...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814bf836>] kstrdup+0x36/0x70 mm/util.c:61
    [<ffffffff814bf8c3>] kstrdup_const+0x53/0x80 mm/util.c:84
    [<ffffffff8239c002>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<ffffffff82492b6b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:257
    [<ffffffff82492fed>] kobject_add_varg lib/kobject.c:352 [inline]
    [<ffffffff82492fed>] kobject_init_and_add+0x6d/0xc0 lib/kobject.c:441
    [<ffffffff81e10e8a>] nilfs_sysfs_create_device_group+0x9a/0x3d0 fs/nilfs2/sysfs.c:991
    [<ffffffff81df964c>] init_nilfs+0x51c/0x680 fs/nilfs2/the_nilfs.c:637
    [<ffffffff81de57ab>] nilfs_fill_super fs/nilfs2/super.c:1047 [inline]
    [<ffffffff81de57ab>] nilfs_mount+0x51b/0x890 fs/nilfs2/super.c:1317
    [<ffffffff8164981b>] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610
    [<ffffffff815e2c68>] vfs_get_tree+0x28/0x100 fs/super.c:1497
    [<ffffffff81626e27>] do_new_mount fs/namespace.c:3040 [inline]
    [<ffffffff81626e27>] path_mount+0xc37/0x1120 fs/namespace.c:3370
    [<ffffffff81627a5e>] do_mount fs/namespace.c:3383 [inline]
    [<ffffffff81627a5e>] __do_sys_mount fs/namespace.c:3591 [inline]
    [<ffffffff81627a5e>] __se_sys_mount fs/namespace.c:3568 [inline]
    [<ffffffff81627a5e>] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568
    [<ffffffff845cad15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845cad15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810c35db80 (size 32):
  comm "syz-executor261", pid 3645, jiffies 4294950822 (age 27.260s)
  hex dump (first 32 bytes):
    6c 6f 6f 70 37 00 00 00 00 00 00 00 00 00 00 00  loop7...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814bf836>] kstrdup+0x36/0x70 mm/util.c:61
    [<ffffffff814bf8c3>] kstrdup_const+0x53/0x80 mm/util.c:84
    [<ffffffff8239c002>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<ffffffff82492b6b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:257
    [<ffffffff82492fed>] kobject_add_varg lib/kobject.c:352 [inline]
    [<ffffffff82492fed>] kobject_init_and_add+0x6d/0xc0 lib/kobject.c:441
    [<ffffffff81e10e8a>] nilfs_sysfs_create_device_group+0x9a/0x3d0 fs/nilfs2/sysfs.c:991
    [<ffffffff81df964c>] init_nilfs+0x51c/0x680 fs/nilfs2/the_nilfs.c:637
    [<ffffffff81de57ab>] nilfs_fill_super fs/nilfs2/super.c:1047 [inline]
    [<ffffffff81de57ab>] nilfs_mount+0x51b/0x890 fs/nilfs2/super.c:1317
    [<ffffffff8164981b>] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610
    [<ffffffff815e2c68>] vfs_get_tree+0x28/0x100 fs/super.c:1497
    [<ffffffff81626e27>] do_new_mount fs/namespace.c:3040 [inline]
    [<ffffffff81626e27>] path_mount+0xc37/0x1120 fs/namespace.c:3370
    [<ffffffff81627a5e>] do_mount fs/namespace.c:3383 [inline]
    [<ffffffff81627a5e>] __do_sys_mount fs/namespace.c:3591 [inline]
    [<ffffffff81627a5e>] __se_sys_mount fs/namespace.c:3568 [inline]
    [<ffffffff81627a5e>] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568
    [<ffffffff845cad15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845cad15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810c35db80 (size 32):
  comm "syz-executor261", pid 3645, jiffies 4294950822 (age 28.520s)
  hex dump (first 32 bytes):
    6c 6f 6f 70 37 00 00 00 00 00 00 00 00 00 00 00  loop7...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814bf836>] kstrdup+0x36/0x70 mm/util.c:61
    [<ffffffff814bf8c3>] kstrdup_const+0x53/0x80 mm/util.c:84
    [<ffffffff8239c002>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<ffffffff82492b6b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:257
    [<ffffffff82492fed>] kobject_add_varg lib/kobject.c:352 [inline]
    [<ffffffff82492fed>] kobject_init_and_add+0x6d/0xc0 lib/kobject.c:441
    [<ffffffff81e10e8a>] nilfs_sysfs_create_device_group+0x9a/0x3d0 fs/nilfs2/sysfs.c:991
    [<ffffffff81df964c>] init_nilfs+0x51c/0x680 fs/nilfs2/the_nilfs.c:637
    [<ffffffff81de57ab>] nilfs_fill_super fs/nilfs2/super.c:1047 [inline]
    [<ffffffff81de57ab>] nilfs_mount+0x51b/0x890 fs/nilfs2/super.c:1317
    [<ffffffff8164981b>] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610
    [<ffffffff815e2c68>] vfs_get_tree+0x28/0x100 fs/super.c:1497
    [<ffffffff81626e27>] do_new_mount fs/namespace.c:3040 [inline]
    [<ffffffff81626e27>] path_mount+0xc37/0x1120 fs/namespace.c:3370
    [<ffffffff81627a5e>] do_mount fs/namespace.c:3383 [inline]
    [<ffffffff81627a5e>] __do_sys_mount fs/namespace.c:3591 [inline]
    [<ffffffff81627a5e>] __se_sys_mount fs/namespace.c:3568 [inline]
    [<ffffffff81627a5e>] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568
    [<ffffffff845cad15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845cad15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810c35db80 (size 32):
  comm "syz-executor261", pid 3645, jiffies 4294950822 (age 31.000s)
  hex dump (first 32 bytes):
    6c 6f 6f 70 37 00 00 00 00 00 00 00 00 00 00 00  loop7...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814bf836>] kstrdup+0x36/0x70 mm/util.c:61
    [<ffffffff814bf8c3>] kstrdup_const+0x53/0x80 mm/util.c:84
    [<ffffffff8239c002>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<ffffffff82492b6b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:257
    [<ffffffff82492fed>] kobject_add_varg lib/kobject.c:352 [inline]
    [<ffffffff82492fed>] kobject_init_and_add+0x6d/0xc0 lib/kobject.c:441
    [<ffffffff81e10e8a>] nilfs_sysfs_create_device_group+0x9a/0x3d0 fs/nilfs2/sysfs.c:991
    [<ffffffff81df964c>] init_nilfs+0x51c/0x680 fs/nilfs2/the_nilfs.c:637
    [<ffffffff81de57ab>] nilfs_fill_super fs/nilfs2/super.c:1047 [inline]
    [<ffffffff81de57ab>] nilfs_mount+0x51b/0x890 fs/nilfs2/super.c:1317
    [<ffffffff8164981b>] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610
    [<ffffffff815e2c68>] vfs_get_tree+0x28/0x100 fs/super.c:1497
    [<ffffffff81626e27>] do_new_mount fs/namespace.c:3040 [inline]
    [<ffffffff81626e27>] path_mount+0xc37/0x1120 fs/namespace.c:3370
    [<ffffffff81627a5e>] do_mount fs/namespace.c:3383 [inline]
    [<ffffffff81627a5e>] __do_sys_mount fs/namespace.c:3591 [inline]
    [<ffffffff81627a5e>] __se_sys_mount fs/namespace.c:3568 [inline]
    [<ffffffff81627a5e>] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568
    [<ffffffff845cad15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845cad15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810c35db80 (size 32):
  comm "syz-executor261", pid 3645, jiffies 4294950822 (age 31.040s)
  hex dump (first 32 bytes):
    6c 6f 6f 70 37 00 00 00 00 00 00 00 00 00 00 00  loop7...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814bf836>] kstrdup+0x36/0x70 mm/util.c:61
    [<ffffffff814bf8c3>] kstrdup_const+0x53/0x80 mm/util.c:84
    [<ffffffff8239c002>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<ffffffff82492b6b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:257
    [<ffffffff82492fed>] kobject_add_varg lib/kobject.c:352 [inline]
    [<ffffffff82492fed>] kobject_init_and_add+0x6d/0xc0 lib/kobject.c:441
    [<ffffffff81e10e8a>] nilfs_sysfs_create_device_group+0x9a/0x3d0 fs/nilfs2/sysfs.c:991
    [<ffffffff81df964c>] init_nilfs+0x51c/0x680 fs/nilfs2/the_nilfs.c:637
    [<ffffffff81de57ab>] nilfs_fill_super fs/nilfs2/super.c:1047 [inline]
    [<ffffffff81de57ab>] nilfs_mount+0x51b/0x890 fs/nilfs2/super.c:1317
    [<ffffffff8164981b>] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610
    [<ffffffff815e2c68>] vfs_get_tree+0x28/0x100 fs/super.c:1497
    [<ffffffff81626e27>] do_new_mount fs/namespace.c:3040 [inline]
    [<ffffffff81626e27>] path_mount+0xc37/0x1120 fs/namespace.c:3370
    [<ffffffff81627a5e>] do_mount fs/namespace.c:3383 [inline]
    [<ffffffff81627a5e>] __do_sys_mount fs/namespace.c:3591 [inline]
    [<ffffffff81627a5e>] __se_sys_mount fs/namespace.c:3568 [inline]
    [<ffffffff81627a5e>] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568
    [<ffffffff845cad15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845cad15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

BUG: memory leak
unreferenced object 0xffff88810c35db80 (size 32):
  comm "syz-executor261", pid 3645, jiffies 4294950822 (age 31.080s)
  hex dump (first 32 bytes):
    6c 6f 6f 70 37 00 00 00 00 00 00 00 00 00 00 00  loop7...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff814bf836>] kstrdup+0x36/0x70 mm/util.c:61
    [<ffffffff814bf8c3>] kstrdup_const+0x53/0x80 mm/util.c:84
    [<ffffffff8239c002>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<ffffffff82492b6b>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:257
    [<ffffffff82492fed>] kobject_add_varg lib/kobject.c:352 [inline]
    [<ffffffff82492fed>] kobject_init_and_add+0x6d/0xc0 lib/kobject.c:441
    [<ffffffff81e10e8a>] nilfs_sysfs_create_device_group+0x9a/0x3d0 fs/nilfs2/sysfs.c:991
    [<ffffffff81df964c>] init_nilfs+0x51c/0x680 fs/nilfs2/the_nilfs.c:637
    [<ffffffff81de57ab>] nilfs_fill_super fs/nilfs2/super.c:1047 [inline]
    [<ffffffff81de57ab>] nilfs_mount+0x51b/0x890 fs/nilfs2/super.c:1317
    [<ffffffff8164981b>] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610
    [<ffffffff815e2c68>] vfs_get_tree+0x28/0x100 fs/super.c:1497
    [<ffffffff81626e27>] do_new_mount fs/namespace.c:3040 [inline]
    [<ffffffff81626e27>] path_mount+0xc37/0x1120 fs/namespace.c:3370
    [<ffffffff81627a5e>] do_mount fs/namespace.c:3383 [inline]
    [<ffffffff81627a5e>] __do_sys_mount fs/namespace.c:3591 [inline]
    [<ffffffff81627a5e>] __se_sys_mount fs/namespace.c:3568 [inline]
    [<ffffffff81627a5e>] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568
    [<ffffffff845cad15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff845cad15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
executing program
write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
executing program
write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/04 22:00 upstream b44f2fd87919 1c9013ac .config console log report syz C ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2022/10/03 04:22 upstream a962b54e162c feb56351 .config console log report syz [disk image] [vmlinux] ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2022/10/03 01:32 upstream a962b54e162c feb56351 .config console log report syz [disk image] [vmlinux] ci-upstream-gce-leak memory leak in kobject_set_name_vargs
2022/06/18 23:11 upstream 4b35035bcf80 8f633d84 .config console log report syz ci-upstream-gce-leak memory leak in kobject_set_name_vargs
* Struck through repros no longer work on HEAD.