syzbot


memory leak in kobject_set_name_vargs (3)

Status: fixed on 2020/11/16 12:12
Reported-by: syzbot+9f864abad79fae7c17e1@syzkaller.appspotmail.com
Fix commit: cb8d53d2c973 ext4: fix leaking sysfs kobject after failed mount
First crash: 689d, last: 632d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in kobject_set_name_vargs C 12 1135d 1169d 13/23 fixed on 2019/07/10 21:40
upstream memory leak in kobject_set_name_vargs (5) C 2 6d01h 49d 0/23 upstream: reported C repro on 2022/06/22 23:13
upstream memory leak in kobject_set_name_vargs (2) C done 47 929d 1114d 16/23 fixed on 2020/02/18 14:31
upstream memory leak in kobject_set_name_vargs (4) C 171 341d 628d 22/23 fixed on 2021/11/10 00:51

Sample crash report:
BUG: memory leak
unreferenced object 0xffff888110099d60 (size 32):
  comm "syz-executor039", pid 8471, jiffies 4294941625 (age 13.130s)
  hex dump (first 32 bytes):
    6c 6f 6f 70 30 00 00 00 00 00 00 00 00 00 00 00  loop0...........
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<000000000d91ef28>] kstrdup+0x36/0x70 mm/util.c:60
    [<00000000374f3354>] kstrdup_const+0x53/0x80 mm/util.c:83
    [<0000000019cab445>] kvasprintf_const+0xc2/0x110 lib/kasprintf.c:48
    [<000000004bc23da4>] kobject_set_name_vargs+0x3b/0xe0 lib/kobject.c:289
    [<0000000071d5c2f9>] kobject_add_varg lib/kobject.c:384 [inline]
    [<0000000071d5c2f9>] kobject_init_and_add+0x6d/0xc0 lib/kobject.c:473
    [<0000000074a17ad4>] nilfs_sysfs_create_device_group+0x98/0x3a0 fs/nilfs2/sysfs.c:999
    [<000000005e8eb26c>] init_nilfs+0x523/0x680 fs/nilfs2/the_nilfs.c:637
    [<000000007e3569de>] nilfs_fill_super fs/nilfs2/super.c:1046 [inline]
    [<000000007e3569de>] nilfs_mount+0x51b/0x890 fs/nilfs2/super.c:1316
    [<000000008bb9b08a>] legacy_get_tree+0x2b/0x90 fs/fs_context.c:592
    [<00000000e6acc6d2>] vfs_get_tree+0x28/0x100 fs/super.c:1549
    [<000000008b4f9896>] do_new_mount fs/namespace.c:2875 [inline]
    [<000000008b4f9896>] path_mount+0xc5e/0x1170 fs/namespace.c:3205
    [<000000005c9be66c>] do_mount fs/namespace.c:3218 [inline]
    [<000000005c9be66c>] __do_sys_mount fs/namespace.c:3426 [inline]
    [<000000005c9be66c>] __se_sys_mount fs/namespace.c:3403 [inline]
    [<000000005c9be66c>] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3403
    [<0000000087200211>] do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
    [<00000000cff0d38e>] entry_SYSCALL_64_after_hwframe+0x44/0xa9


Crashes (19):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-gce-leak 2020/11/16 02:39 upstream 0062442ecfef 1bf9a662 .config log report syz C
ci-upstream-gce-leak 2020/11/16 02:16 upstream 0062442ecfef 1bf9a662 .config log report syz C
ci-upstream-gce-leak 2020/11/15 13:12 upstream e28c0d7c92c8 1bf9a662 .config log report syz C
ci-upstream-gce-leak 2020/11/13 06:45 upstream af5043c89a8e 16fca0c8 .config log report syz C
ci-upstream-gce-leak 2020/11/13 05:01 upstream af5043c89a8e 16fca0c8 .config log report syz C
ci-upstream-gce-leak 2020/11/13 02:37 upstream af5043c89a8e 16fca0c8 .config log report syz C
ci-upstream-gce-leak 2020/11/11 09:32 upstream eccc87672492 cca87986 .config log report syz C
ci-upstream-gce-leak 2020/11/11 03:22 upstream e2f0c565ec70 cca87986 .config log report syz C
ci-upstream-gce-leak 2020/11/10 17:11 upstream 407ab579637c cca87986 .config log report syz C
ci-upstream-gce-leak 2020/11/10 06:11 upstream 407ab579637c 64069d48 .config log report syz C
ci-upstream-gce-leak 2020/11/09 18:37 upstream f8394f232b1e 64069d48 .config log report syz C
ci-upstream-gce-leak 2020/11/08 16:43 upstream 4429f14aeea9 64069d48 .config log report syz C
ci-upstream-gce-leak 2020/11/07 21:26 upstream 659caaf65dc9 64069d48 .config log report syz C
ci-upstream-gce-leak 2020/11/03 04:41 upstream 495023e4e49e cba33199 .config log report syz C
ci-upstream-gce-leak 2020/10/25 23:53 upstream 672f88712615 a1839e81 .config log report syz C
ci-upstream-gce-leak 2020/10/22 12:00 upstream f804b3159482 be6b1582 .config log report syz C
ci-upstream-gce-leak 2020/09/22 05:53 upstream 98477740630f 9e1fa68e .config log report syz C
ci-upstream-gce-leak 2020/09/21 01:29 upstream bdcf11de8f77 9564d2e9 .config log report syz C
ci-upstream-gce-leak 2020/09/20 15:37 upstream 325d0eab4f31 9564d2e9 .config log report syz C