syzbot


memory leak in kobject_set_name_vargs (3)

Status: fixed on 2020/11/16 12:12
Subsystems: nilfs
[Documentation on labels]
Reported-by: syzbot+9f864abad79fae7c17e1@syzkaller.appspotmail.com
Fix commit: cb8d53d2c973 ext4: fix leaking sysfs kobject after failed mount
First crash: 1525d, last: 1468d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 4.19 000/191] 4.19.155-rc1 review 218 (218) 2020/11/18 18:02
[PATCH 4.9 00/78] 4.9.244-rc1 review 82 (82) 2020/11/18 15:22
[PATCH 4.4 00/64] 4.4.244-rc1 review 68 (68) 2020/11/18 15:22
[PATCH 5.9 000/391] 5.9.4-rc1 review 406 (406) 2020/11/05 16:26
[PATCH 5.4 000/214] 5.4.75-rc1 review 219 (219) 2020/11/04 17:50
[PATCH 4.14 000/125] 4.14.204-rc1 review 129 (129) 2020/11/04 17:49
[PATCH] ext4: fix leaking sysfs kobject after failed mount 3 (3) 2020/10/03 04:56
memory leak in kobject_set_name_vargs (3) 0 (1) 2020/09/21 10:02
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 1971d 2005d 12/28 fixed on 2019/07/10 21:40
upstream memory leak in kobject_set_name_vargs (5) nilfs C 4 782d 884d 22/28 fixed on 2023/02/24 13:51
upstream memory leak in kobject_set_name_vargs (2) C done 47 1765d 1949d 15/28 fixed on 2020/02/18 14:31
upstream memory leak in kobject_set_name_vargs (4) kernel C 171 1177d 1464d 20/28 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):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/11/16 02:39 upstream 0062442ecfef 1bf9a662 .config console log report syz C ci-upstream-gce-leak
2020/11/16 02:16 upstream 0062442ecfef 1bf9a662 .config console log report syz C ci-upstream-gce-leak
2020/11/15 13:12 upstream e28c0d7c92c8 1bf9a662 .config console log report syz C ci-upstream-gce-leak
2020/11/13 06:45 upstream af5043c89a8e 16fca0c8 .config console log report syz C ci-upstream-gce-leak
2020/11/13 05:01 upstream af5043c89a8e 16fca0c8 .config console log report syz C ci-upstream-gce-leak
2020/11/13 02:37 upstream af5043c89a8e 16fca0c8 .config console log report syz C ci-upstream-gce-leak
2020/11/11 09:32 upstream eccc87672492 cca87986 .config console log report syz C ci-upstream-gce-leak
2020/11/11 03:22 upstream e2f0c565ec70 cca87986 .config console log report syz C ci-upstream-gce-leak
2020/11/10 17:11 upstream 407ab579637c cca87986 .config console log report syz C ci-upstream-gce-leak
2020/11/10 06:11 upstream 407ab579637c 64069d48 .config console log report syz C ci-upstream-gce-leak
2020/11/09 18:37 upstream f8394f232b1e 64069d48 .config console log report syz C ci-upstream-gce-leak
2020/11/08 16:43 upstream 4429f14aeea9 64069d48 .config console log report syz C ci-upstream-gce-leak
2020/11/07 21:26 upstream 659caaf65dc9 64069d48 .config console log report syz C ci-upstream-gce-leak
2020/11/03 04:41 upstream 495023e4e49e cba33199 .config console log report syz C ci-upstream-gce-leak
2020/10/25 23:53 upstream 672f88712615 a1839e81 .config console log report syz C ci-upstream-gce-leak
2020/10/22 12:00 upstream f804b3159482 be6b1582 .config console log report syz C ci-upstream-gce-leak
2020/09/22 05:53 upstream 98477740630f 9e1fa68e .config console log report syz C ci-upstream-gce-leak
2020/09/21 01:29 upstream bdcf11de8f77 9564d2e9 .config console log report syz C ci-upstream-gce-leak
2020/09/20 15:37 upstream 325d0eab4f31 9564d2e9 .config console log report syz C ci-upstream-gce-leak
* Struck through repros no longer work on HEAD.