* [syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod @ 2023-08-15 9:15 syzbot 2023-11-12 13:08 ` Bragatheswaran Manickavel 0 siblings, 1 reply; 3+ messages in thread From: syzbot @ 2023-08-15 9:15 UTC (permalink / raw) To: clm, dsterba, josef, linux-btrfs, linux-fsdevel, linux-kernel, syzkaller-bugs Hello, syzbot found the following issue on: HEAD commit: 25aa0bebba72 Merge tag 'net-6.5-rc6' of git://git.kernel.o.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=169577fda80000 kernel config: https://syzkaller.appspot.com/x/.config?x=2bf8962e4f7984f4 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 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=148191c3a80000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/76b0857d2814/disk-25aa0beb.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/a01574755257/vmlinux-25aa0beb.xz kernel image: https://storage.googleapis.com/syzbot-assets/262002db770e/bzImage-25aa0beb.xz mounted in repro: https://storage.googleapis.com/syzbot-assets/b93cffaa6717/mount_0.gz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+d66de4cbf532749df35f@syzkaller.appspotmail.com BUG: memory leak unreferenced object 0xffff888129851240 (size 64): comm "syz-executor.0", pid 5069, jiffies 4294977377 (age 16.480s) 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 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff815545e5>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1076 [<ffffffff821731b1>] kmalloc include/linux/slab.h:582 [inline] [<ffffffff821731b1>] btrfs_ref_tree_mod+0x211/0xb80 fs/btrfs/ref-verify.c:768 [<ffffffff820444f6>] btrfs_free_tree_block+0x116/0x450 fs/btrfs/extent-tree.c:3250 [<ffffffff8202d775>] __btrfs_cow_block+0x6a5/0xa30 fs/btrfs/ctree.c:601 [<ffffffff8202dc54>] btrfs_cow_block+0x154/0x2b0 fs/btrfs/ctree.c:712 [<ffffffff8206013c>] commit_cowonly_roots+0x8c/0x3f0 fs/btrfs/transaction.c:1276 [<ffffffff820647c9>] btrfs_commit_transaction+0x999/0x15c0 fs/btrfs/transaction.c:2410 [<ffffffff8205a516>] btrfs_commit_super+0x86/0xb0 fs/btrfs/disk-io.c:4195 [<ffffffff8205c743>] close_ctree+0x543/0x730 fs/btrfs/disk-io.c:4349 [<ffffffff8166b44e>] generic_shutdown_super+0x9e/0x1c0 fs/super.c:499 [<ffffffff8166b769>] kill_anon_super+0x19/0x30 fs/super.c:1110 [<ffffffff8202357d>] btrfs_kill_super+0x1d/0x30 fs/btrfs/super.c:2138 [<ffffffff8166ca46>] deactivate_locked_super+0x46/0xd0 fs/super.c:330 [<ffffffff8166cb6c>] deactivate_super fs/super.c:361 [inline] [<ffffffff8166cb6c>] deactivate_super+0x9c/0xb0 fs/super.c:357 [<ffffffff816a8931>] cleanup_mnt+0x121/0x210 fs/namespace.c:1254 [<ffffffff812becaf>] task_work_run+0x8f/0xe0 kernel/task_work.c:179 --- 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 syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the bug is already fixed, 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 change bug's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the bug is a duplicate of another bug, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod 2023-08-15 9:15 [syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod syzbot @ 2023-11-12 13:08 ` Bragatheswaran Manickavel 2023-11-12 13:45 ` syzbot 0 siblings, 1 reply; 3+ messages in thread From: Bragatheswaran Manickavel @ 2023-11-12 13:08 UTC (permalink / raw) To: syzbot, clm, dsterba, josef, linux-btrfs, linux-fsdevel, linux-kernel, syzkaller-bugs [-- Attachment #1: Type: text/plain, Size: 3906 bytes --] #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 25aa0bebba72b318e71fe205bfd1236550cc9534 On 15/08/23 14:45, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 25aa0bebba72 Merge tag 'net-6.5-rc6' of git://git.kernel.o.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=169577fda80000 > kernel config: https://syzkaller.appspot.com/x/.config?x=2bf8962e4f7984f4 > 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 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=148191c3a80000 > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/76b0857d2814/disk-25aa0beb.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/a01574755257/vmlinux-25aa0beb.xz > kernel image: https://storage.googleapis.com/syzbot-assets/262002db770e/bzImage-25aa0beb.xz > mounted in repro: https://storage.googleapis.com/syzbot-assets/b93cffaa6717/mount_0.gz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+d66de4cbf532749df35f@syzkaller.appspotmail.com > > BUG: memory leak > unreferenced object 0xffff888129851240 (size 64): > comm "syz-executor.0", pid 5069, jiffies 4294977377 (age 16.480s) > 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 00 00 00 00 00 00 00 00 ................ > backtrace: > [<ffffffff815545e5>] kmalloc_trace+0x25/0x90 mm/slab_common.c:1076 > [<ffffffff821731b1>] kmalloc include/linux/slab.h:582 [inline] > [<ffffffff821731b1>] btrfs_ref_tree_mod+0x211/0xb80 fs/btrfs/ref-verify.c:768 > [<ffffffff820444f6>] btrfs_free_tree_block+0x116/0x450 fs/btrfs/extent-tree.c:3250 > [<ffffffff8202d775>] __btrfs_cow_block+0x6a5/0xa30 fs/btrfs/ctree.c:601 > [<ffffffff8202dc54>] btrfs_cow_block+0x154/0x2b0 fs/btrfs/ctree.c:712 > [<ffffffff8206013c>] commit_cowonly_roots+0x8c/0x3f0 fs/btrfs/transaction.c:1276 > [<ffffffff820647c9>] btrfs_commit_transaction+0x999/0x15c0 fs/btrfs/transaction.c:2410 > [<ffffffff8205a516>] btrfs_commit_super+0x86/0xb0 fs/btrfs/disk-io.c:4195 > [<ffffffff8205c743>] close_ctree+0x543/0x730 fs/btrfs/disk-io.c:4349 > [<ffffffff8166b44e>] generic_shutdown_super+0x9e/0x1c0 fs/super.c:499 > [<ffffffff8166b769>] kill_anon_super+0x19/0x30 fs/super.c:1110 > [<ffffffff8202357d>] btrfs_kill_super+0x1d/0x30 fs/btrfs/super.c:2138 > [<ffffffff8166ca46>] deactivate_locked_super+0x46/0xd0 fs/super.c:330 > [<ffffffff8166cb6c>] deactivate_super fs/super.c:361 [inline] > [<ffffffff8166cb6c>] deactivate_super+0x9c/0xb0 fs/super.c:357 > [<ffffffff816a8931>] cleanup_mnt+0x121/0x210 fs/namespace.c:1254 > [<ffffffff812becaf>] task_work_run+0x8f/0xe0 kernel/task_work.c:179 > > > > --- > 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 syzkaller@googlegroups.com. > > syzbot will keep track of this issue. See: > https://goo.gl/tpsmEJ#status for how to communicate with syzbot. > > If the bug is already fixed, 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 change bug's subsystems, reply with: > #syz set subsystems: new-subsystem > (See the list of subsystem names on the web dashboard) > > If the bug is a duplicate of another bug, reply with: > #syz dup: exact-subject-of-another-report > > If you want to undo deduplication, reply with: > #syz undup > [-- Attachment #2: btrfs.diff --] [-- Type: text/x-patch, Size: 1158 bytes --] diff --git a/fs/btrfs/ref-verify.c b/fs/btrfs/ref-verify.c index 95d28497de7c..50b59b3dc474 100644 --- a/fs/btrfs/ref-verify.c +++ b/fs/btrfs/ref-verify.c @@ -791,6 +791,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, dump_ref_action(fs_info, ra); kfree(ref); kfree(ra); + kfree(re); goto out_unlock; } else if (be->num_refs == 0) { btrfs_err(fs_info, @@ -800,6 +801,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, dump_ref_action(fs_info, ra); kfree(ref); kfree(ra); + kfree(re); goto out_unlock; } @@ -822,6 +824,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, dump_ref_action(fs_info, ra); kfree(ref); kfree(ra); + kfree(re); goto out_unlock; } exist->num_refs--; @@ -838,6 +841,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, dump_ref_action(fs_info, ra); kfree(ref); kfree(ra); + kfree(re); goto out_unlock; } kfree(ref); @@ -849,6 +853,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, dump_ref_action(fs_info, ra); kfree(ref); kfree(ra); + kfree(re); goto out_unlock; } } ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod 2023-11-12 13:08 ` Bragatheswaran Manickavel @ 2023-11-12 13:45 ` syzbot 0 siblings, 0 replies; 3+ messages in thread From: syzbot @ 2023-11-12 13:45 UTC (permalink / raw) To: bragathemanick0908, clm, dsterba, josef, linux-btrfs, linux-fsdevel, linux-kernel, syzkaller-bugs Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-and-tested-by: syzbot+d66de4cbf532749df35f@syzkaller.appspotmail.com Tested on: commit: 25aa0beb Merge tag 'net-6.5-rc6' of git://git.kernel.o.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git console output: https://syzkaller.appspot.com/x/log.txt?x=17c578a8e80000 kernel config: https://syzkaller.appspot.com/x/.config?x=2bf8962e4f7984f4 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=16ce93e0e80000 Note: testing is done by a robot and is best-effort only. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-12 13:45 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-08-15 9:15 [syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod syzbot 2023-11-12 13:08 ` Bragatheswaran Manickavel 2023-11-12 13:45 ` syzbot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).