[syzbot] [btrfs?] memory leak in __btrfs_add_free_space

8 views
Skip to first unread message

syzbot

unread,
Nov 20, 2023, 3:05:25 AM11/20/23
to c...@fb.com, dst...@suse.com, jo...@toxicpanda.com, linux...@vger.kernel.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c42d9eeef8e5 Merge tag 'hardening-v6.7-rc2' of git://git.k..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10d5cc04e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=e71d284dd6560ca8
dashboard link: https://syzkaller.appspot.com/bug?extid=349f1f9eb382f477ce50
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=112a3b0f680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/026cc0fc446f/disk-c42d9eee.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c4b4d6d092c1/vmlinux-c42d9eee.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1865f885e9d6/bzImage-c42d9eee.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/513e1afbe9d7/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+349f1f...@syzkaller.appspotmail.com

BUG: memory leak
unreferenced object 0xffff888123c87618 (size 104):
comm "syz-executor.6", pid 10287, jiffies 4294957667 (age 18.250s)
hex dump (first 32 bytes):
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81630c48>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
[<ffffffff81630c48>] slab_post_alloc_hook mm/slab.h:766 [inline]
[<ffffffff81630c48>] slab_alloc_node mm/slub.c:3478 [inline]
[<ffffffff81630c48>] slab_alloc mm/slub.c:3486 [inline]
[<ffffffff81630c48>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
[<ffffffff81630c48>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
[<ffffffff8212c5a9>] kmem_cache_zalloc include/linux/slab.h:711 [inline]
[<ffffffff8212c5a9>] __btrfs_add_free_space+0x69/0x780 fs/btrfs/free-space-cache.c:2636
[<ffffffff8212ce5a>] do_trimming+0x19a/0x2d0 fs/btrfs/free-space-cache.c:3687
[<ffffffff8212d334>] trim_no_bitmap+0x3a4/0x650 fs/btrfs/free-space-cache.c:3797
[<ffffffff8212fc9c>] btrfs_trim_block_group+0xbc/0x1a0 fs/btrfs/free-space-cache.c:4037
[<ffffffff8208cbd2>] btrfs_trim_fs+0x1c2/0x6b0 fs/btrfs/extent-tree.c:6297
[<ffffffff82108c53>] btrfs_ioctl_fitrim+0x1d3/0x270 fs/btrfs/ioctl.c:535
[<ffffffff82112fd0>] btrfs_ioctl+0x2200/0x33e0 fs/btrfs/ioctl.c:4573
[<ffffffff816be4d2>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff816be4d2>] __do_sys_ioctl fs/ioctl.c:871 [inline]
[<ffffffff816be4d2>] __se_sys_ioctl fs/ioctl.c:857 [inline]
[<ffffffff816be4d2>] __x64_sys_ioctl+0xf2/0x140 fs/ioctl.c:857
[<ffffffff84b6ad8f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
[<ffffffff84b6ad8f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
[<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b



---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Apr 14, 2024, 12:09:14 PM (13 days ago) Apr 14
to syzkall...@googlegroups.com
Auto-closing this bug as obsolete.
No recent activity, existing reproducers are no longer triggering the issue.
Reply all
Reply to author
Forward
0 new messages