syzbot


memory leak in __btrfs_add_free_space

Status: auto-obsoleted due to no activity on 2024/04/14 16:09
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+349f1f9eb382f477ce50@syzkaller.appspotmail.com
First crash: 187d, last: 136d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] memory leak in __btrfs_add_free_space 0 (1) 2023/11/20 08:05
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/02/08 09:00 16m retest repro upstream OK log
2024/01/19 17:52 16m retest repro upstream OK log
2023/11/30 08:30 15m retest repro upstream report log

Sample crash report:
BUG: memory leak
unreferenced object 0xffff8881279c7bc8 (size 104):
  comm "syz-executor.1", pid 8124, jiffies 4294976874 (age 10.250s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    30 7c 9c 27 81 88 ff ff 01 00 00 00 00 00 00 00  0|.'............
  backtrace:
    [<ffffffff81631b18>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631b18>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631b18>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631b18>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631b18>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631b18>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff8212e8a9>] kmem_cache_zalloc include/linux/slab.h:711 [inline]
    [<ffffffff8212e8a9>] __btrfs_add_free_space+0x69/0x780 fs/btrfs/free-space-cache.c:2636
    [<ffffffff8212f286>] do_trimming+0x2c6/0x2d0 fs/btrfs/free-space-cache.c:3685
    [<ffffffff8212f634>] trim_no_bitmap+0x3a4/0x650 fs/btrfs/free-space-cache.c:3797
    [<ffffffff82131f9c>] btrfs_trim_block_group+0xbc/0x1a0 fs/btrfs/free-space-cache.c:4037
    [<ffffffff8208ed52>] btrfs_trim_fs+0x1c2/0x6b0 fs/btrfs/extent-tree.c:6317
    [<ffffffff8210af23>] btrfs_ioctl_fitrim+0x1d3/0x270 fs/btrfs/ioctl.c:535
    [<ffffffff821152d0>] btrfs_ioctl+0x2200/0x33e0 fs/btrfs/ioctl.c:4583
    [<ffffffff816bf592>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff816bf592>] __do_sys_ioctl fs/ioctl.c:871 [inline]
    [<ffffffff816bf592>] __se_sys_ioctl fs/ioctl.c:857 [inline]
    [<ffffffff816bf592>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
    [<ffffffff84b71e0f>] do_syscall_x64 arch/x86/entry/common.c:52 [inline]
    [<ffffffff84b71e0f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:83
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff8881279c7c30 (size 104):
  comm "syz-executor.1", pid 8124, jiffies 4294976874 (age 10.250s)
  hex dump (first 32 bytes):
    c8 7b 9c 27 81 88 ff ff 00 00 00 00 00 00 00 00  .{.'............
    00 00 00 00 00 00 00 00 e0 7b 9c 27 81 88 ff ff  .........{.'....
  backtrace:
    [<ffffffff81631b18>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81631b18>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81631b18>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81631b18>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81631b18>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81631b18>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff8212e8a9>] kmem_cache_zalloc include/linux/slab.h:711 [inline]
    [<ffffffff8212e8a9>] __btrfs_add_free_space+0x69/0x780 fs/btrfs/free-space-cache.c:2636
    [<ffffffff8212f15a>] do_trimming+0x19a/0x2d0 fs/btrfs/free-space-cache.c:3687
    [<ffffffff8212f634>] trim_no_bitmap+0x3a4/0x650 fs/btrfs/free-space-cache.c:3797
    [<ffffffff82131f9c>] btrfs_trim_block_group+0xbc/0x1a0 fs/btrfs/free-space-cache.c:4037
    [<ffffffff8208ed52>] btrfs_trim_fs+0x1c2/0x6b0 fs/btrfs/extent-tree.c:6317
    [<ffffffff8210af23>] btrfs_ioctl_fitrim+0x1d3/0x270 fs/btrfs/ioctl.c:535
    [<ffffffff821152d0>] btrfs_ioctl+0x2200/0x33e0 fs/btrfs/ioctl.c:4583
    [<ffffffff816bf592>] vfs_ioctl fs/ioctl.c:51 [inline]
    [<ffffffff816bf592>] __do_sys_ioctl fs/ioctl.c:871 [inline]
    [<ffffffff816bf592>] __se_sys_ioctl fs/ioctl.c:857 [inline]
    [<ffffffff816bf592>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
    [<ffffffff84b71e0f>] do_syscall_x64 arch/x86/entry/common.c:52 [inline]
    [<ffffffff84b71e0f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:83
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b


Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/05 16:09 upstream 1f874787ed9a 28c42cff .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-leak memory leak in __btrfs_add_free_space
2023/11/16 07:59 upstream c42d9eeef8e5 cb976f63 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-leak memory leak in __btrfs_add_free_space
* Struck through repros no longer work on HEAD.