[<prev] [next>] [day] [month] [year] [list]
Message-ID: <000000000000285ae8060a07cd78@google.com>
Date: Mon, 13 Nov 2023 04:28:03 -0800
From: syzbot <syzbot+d66de4cbf532749df35f@...kaller.appspotmail.com>
To: jose.pekkarinen@...hound.fi, linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in add_block_entry
BUG: memory leak
unreferenced object 0xffff888122f9fe40 (size 64):
comm "syz-executor.1", pid 5844, jiffies 4294945528 (age 11.970s)
hex dump (first 32 bytes):
03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81578015>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
[<ffffffff821ae165>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff821ae165>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff821ae165>] add_block_entry+0x35/0x320 fs/btrfs/ref-verify.c:270
[<ffffffff821ae806>] add_tree_block+0x96/0x240 fs/btrfs/ref-verify.c:332
[<ffffffff821afdf6>] process_extent_item fs/btrfs/ref-verify.c:474 [inline]
[<ffffffff821afdf6>] process_leaf fs/btrfs/ref-verify.c:524 [inline]
[<ffffffff821afdf6>] walk_down_tree fs/btrfs/ref-verify.c:576 [inline]
[<ffffffff821afdf6>] btrfs_build_ref_tree+0x566/0x8c0 fs/btrfs/ref-verify.c:1013
[<ffffffff82095365>] open_ctree+0x18c5/0x2370 fs/btrfs/disk-io.c:3523
[<ffffffff8205ab21>] btrfs_fill_super fs/btrfs/super.c:1117 [inline]
[<ffffffff8205ab21>] btrfs_mount_root+0x5a1/0x750 fs/btrfs/super.c:1478
[<ffffffff816fd5a9>] legacy_get_tree+0x29/0x80 fs/fs_context.c:662
[<ffffffff81692d2a>] vfs_get_tree+0x2a/0x130 fs/super.c:1768
[<ffffffff816d06db>] fc_mount fs/namespace.c:1114 [inline]
[<ffffffff816d06db>] vfs_kern_mount.part.0+0xcb/0x110 fs/namespace.c:1144
[<ffffffff816d075f>] vfs_kern_mount+0x3f/0x60 fs/namespace.c:1131
[<ffffffff8205eb82>] btrfs_mount+0x1e2/0x660 fs/btrfs/super.c:1538
[<ffffffff816fd5a9>] legacy_get_tree+0x29/0x80 fs/fs_context.c:662
[<ffffffff81692d2a>] vfs_get_tree+0x2a/0x130 fs/super.c:1768
[<ffffffff816d882f>] do_new_mount fs/namespace.c:3337 [inline]
[<ffffffff816d882f>] path_mount+0xc8f/0x10d0 fs/namespace.c:3664
[<ffffffff816d9421>] do_mount fs/namespace.c:3677 [inline]
[<ffffffff816d9421>] __do_sys_mount fs/namespace.c:3886 [inline]
[<ffffffff816d9421>] __se_sys_mount fs/namespace.c:3863 [inline]
[<ffffffff816d9421>] __x64_sys_mount+0x1a1/0x1f0 fs/namespace.c:3863
[<ffffffff84b4945f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
[<ffffffff84b4945f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
BUG: memory leak
unreferenced object 0xffff8881216a7ba0 (size 96):
comm "syz-executor.1", pid 5844, jiffies 4294945528 (age 11.970s)
hex dump (first 32 bytes):
00 10 10 00 00 00 00 00 00 10 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 ................
backtrace:
[<ffffffff81578015>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
[<ffffffff821ae17e>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff821ae17e>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff821ae17e>] add_block_entry+0x4e/0x320 fs/btrfs/ref-verify.c:271
[<ffffffff821ae806>] add_tree_block+0x96/0x240 fs/btrfs/ref-verify.c:332
[<ffffffff821afdf6>] process_extent_item fs/btrfs/ref-verify.c:474 [inline]
[<ffffffff821afdf6>] process_leaf fs/btrfs/ref-verify.c:524 [inline]
[<ffffffff821afdf6>] walk_down_tree fs/btrfs/ref-verify.c:576 [inline]
[<ffffffff821afdf6>] btrfs_build_ref_tree+0x566/0x8c0 fs/btrfs/ref-verify.c:1013
[<ffffffff82095365>] open_ctree+0x18c5/0x2370 fs/btrfs/disk-io.c:3523
[<ffffffff8205ab21>] btrfs_fill_super fs/btrfs/super.c:1117 [inline]
[<ffffffff8205ab21>] btrfs_mount_root+0x5a1/0x750 fs/btrfs/super.c:1478
[<ffffffff816fd5a9>] legacy_get_tree+0x29/0x80 fs/fs_context.c:662
[<ffffffff81692d2a>] vfs_get_tree+0x2a/0x130 fs/super.c:1768
[<ffffffff816d06db>] fc_mount fs/namespace.c:1114 [inline]
[<ffffffff816d06db>] vfs_kern_mount.part.0+0xcb/0x110 fs/namespace.c:1144
[<ffffffff816d075f>] vfs_kern_mount+0x3f/0x60 fs/namespace.c:1131
[<ffffffff8205eb82>] btrfs_mount+0x1e2/0x660 fs/btrfs/super.c:1538
[<ffffffff816fd5a9>] legacy_get_tree+0x29/0x80 fs/fs_context.c:662
[<ffffffff81692d2a>] vfs_get_tree+0x2a/0x130 fs/super.c:1768
[<ffffffff816d882f>] do_new_mount fs/namespace.c:3337 [inline]
[<ffffffff816d882f>] path_mount+0xc8f/0x10d0 fs/namespace.c:3664
[<ffffffff816d9421>] do_mount fs/namespace.c:3677 [inline]
[<ffffffff816d9421>] __do_sys_mount fs/namespace.c:3886 [inline]
[<ffffffff816d9421>] __se_sys_mount fs/namespace.c:3863 [inline]
[<ffffffff816d9421>] __x64_sys_mount+0x1a1/0x1f0 fs/namespace.c:3863
[<ffffffff84b4945f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
[<ffffffff84b4945f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
BUG: memory leak
unreferenced object 0xffff888122f9fec0 (size 64):
comm "syz-executor.1", pid 5844, jiffies 4294945528 (age 11.970s)
hex dump (first 32 bytes):
05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81578015>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1098
[<ffffffff821ae165>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff821ae165>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff821ae165>] add_block_entry+0x35/0x320 fs/btrfs/ref-verify.c:270
[<ffffffff821ae806>] add_tree_block+0x96/0x240 fs/btrfs/ref-verify.c:332
[<ffffffff821afdf6>] process_extent_item fs/btrfs/ref-verify.c:474 [inline]
[<ffffffff821afdf6>] process_leaf fs/btrfs/ref-verify.c:524 [inline]
[<ffffffff821afdf6>] walk_down_tree fs/btrfs/ref-verify.c:576 [inline]
[<ffffffff821afdf6>] btrfs_build_ref_tree+0x566/0x8c0 fs/btrfs/ref-verify.c:1013
[<ffffffff82095365>] open_ctree+0x18c5/0x2370 fs/btrfs/disk-io.c:3523
[<ffffffff8205ab21>] btrfs_fill_super fs/btrfs/super.c:1117 [inline]
[<ffffffff8205ab21>] btrfs_mount_root+0x5a1/0x750 fs/btrfs/super.c:1478
[<ffffffff816fd5a9>] legacy_get_tree+0x29/0x80 fs/fs_context.c:662
[<ffffffff81692d2a>] vfs_get_tree+0x2a/0x130 fs/super.c:1768
[<ffffffff816d06db>] fc_mount fs/namespace.c:1114 [inline]
[<ffffffff816d06db>] vfs_kern_mount.part.0+0xcb/0x110 fs/namespace.c:1144
[<ffffffff816d075f>] vfs_kern_mount+0x3f/0x60 fs/namespace.c:1131
[<ffffffff8205eb82>] btrfs_mount+0x1e2/0x660 fs/btrfs/super.c:1538
[<ffffffff816fd5a9>] legacy_get_tree+0x29/0x80 fs/fs_context.c:662
[<ffffffff81692d2a>] vfs_get_tree+0x2a/0x130 fs/super.c:1768
[<ffffffff816d882f>] do_new_mount fs/namespace.c:3337 [inline]
[<ffffffff816d882f>] path_mount+0xc8f/0x10d0 fs/namespace.c:3664
[<ffffffff816d9421>] do_mount fs/namespace.c:3677 [inline]
[<ffffffff816d9421>] __do_sys_mount fs/namespace.c:3886 [inline]
[<ffffffff816d9421>] __se_sys_mount fs/namespace.c:3863 [inline]
[<ffffffff816d9421>] __x64_sys_mount+0x1a1/0x1f0 fs/namespace.c:3863
[<ffffffff84b4945f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
[<ffffffff84b4945f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
Tested on:
commit: 5a6a09e9 Merge tag 'cgroup-for-6.7' of git://git.kerne..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=12ab8f5b680000
kernel config: https://syzkaller.appspot.com/x/.config?x=492c9379bc08e464
dashboard link: https://syzkaller.appspot.com/bug?extid=d66de4cbf532749df35f
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=17406848e80000
Powered by blists - more mailing lists