From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33DD4C4321E for ; Mon, 28 Nov 2022 07:50:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbiK1Hus (ORCPT ); Mon, 28 Nov 2022 02:50:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229868AbiK1Hup (ORCPT ); Mon, 28 Nov 2022 02:50:45 -0500 Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44ACB15818 for ; Sun, 27 Nov 2022 23:50:44 -0800 (PST) Received: by mail-il1-f198.google.com with SMTP id x10-20020a056e021bca00b00302b6c0a683so8318811ilv.23 for ; Sun, 27 Nov 2022 23:50:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Ivh2xXELoiAfJgRZzdEP1NE6OlZmZZPsfCq/KWACjZk=; b=l8zBl3Jo3rvPjYKWqXwmKpIJWd04hpxAXLjNEsZGE057GpM89RVtvNWxdN0uGCh2UM HiHxTXyTdb717JGpkp49yd9khPb3kC5ImMwKgft7SZJRrYyHpDHTR0srH/FCcbuDLhyp KFnpZ4qetLX+8+0yZbWQs7jgQ71ZfvPi4Me7f95xJYs6lYd2T8trRpgolSyalak2w0lX +Cc0YU+viazXfHYYf84WYkAqSzg8xzAjGedNYk2Njka8Gsf5iiCP/CJcfV2FTLKwKZNx A1AjwzX3wmQo6NIDPGQPpmz2DePi9FwJQDwPybEacyKA3vDDOhlm4q1dealPNP4YFKD6 TfuA== X-Gm-Message-State: ANoB5pkrfAaDtJq5Lt1FIcNFPNfh7HzG5k71htrMG4CIey/w1kW0UEym Y+s3wGJzDjnNAHwFFnG59U/ESdVHzbi20g4Hf1fRac0pd9Ac X-Google-Smtp-Source: AA0mqf7XO1UhY7apncf+gy5RWPiK1zPHeMRgkZNshk66IA5+t7lUsHrHhJW0pnwUEdvYtm6GPOMotUdiXoR8rKagGCBThsx/FAle MIME-Version: 1.0 X-Received: by 2002:a92:3209:0:b0:303:814:f79c with SMTP id z9-20020a923209000000b003030814f79cmr3345750ile.50.1669621843598; Sun, 27 Nov 2022 23:50:43 -0800 (PST) Date: Sun, 27 Nov 2022 23:50:43 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000e5a65c05ee832054@google.com> Subject: [syzbot] memory leak in add_tree_block From: syzbot To: clm@fb.com, dsterba@suse.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: 4312098baf37 Merge tag 'spi-fix-v6.1-rc6' of git://git.ker.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1642d68d880000 kernel config: https://syzkaller.appspot.com/x/.config?x=522dbc1ab43c9303 dashboard link: https://syzkaller.appspot.com/bug?extid=be14ed7728594dc8bd42 compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15bfbac3880000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=120cff21880000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/76a03ca3d4a9/disk-4312098b.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/5de00a38b596/vmlinux-4312098b.xz kernel image: https://storage.googleapis.com/syzbot-assets/9499f7779db5/bzImage-4312098b.xz mounted in repro: https://storage.googleapis.com/syzbot-assets/42f50e809c7e/mount_0.gz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+be14ed7728594dc8bd42@syzkaller.appspotmail.com BUG: memory leak unreferenced object 0xffff88810f8ea480 (size 64): comm "syz-executor193", pid 3787, jiffies 4294971495 (age 12.820s) hex dump (first 32 bytes): 03 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: [] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045 [] kmalloc include/linux/slab.h:553 [inline] [] add_tree_block+0x3a/0x210 fs/btrfs/ref-verify.c:316 [] btrfs_build_ref_tree+0x50c/0x750 fs/btrfs/ref-verify.c:471 [] open_ctree+0x19af/0x1fcb fs/btrfs/disk-io.c:3767 [] btrfs_fill_super fs/btrfs/super.c:1461 [inline] [] btrfs_mount_root.cold+0x13/0xf5 fs/btrfs/super.c:1829 [] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610 [] vfs_get_tree+0x28/0x100 fs/super.c:1531 [] fc_mount fs/namespace.c:1043 [inline] [] vfs_kern_mount.part.0+0xd1/0x120 fs/namespace.c:1073 [] vfs_kern_mount+0x3c/0x60 fs/namespace.c:1060 [] btrfs_mount+0x199/0x590 fs/btrfs/super.c:1889 [] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610 [] vfs_get_tree+0x28/0x100 fs/super.c:1531 [] do_new_mount fs/namespace.c:3040 [inline] [] path_mount+0xc37/0x10d0 fs/namespace.c:3370 [] do_mount fs/namespace.c:3383 [inline] [] __do_sys_mount fs/namespace.c:3591 [inline] [] __se_sys_mount fs/namespace.c:3568 [inline] [] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568 [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 [] entry_SYSCALL_64_after_hwframe+0x63/0xcd BUG: memory leak unreferenced object 0xffff88810c91f040 (size 64): comm "syz-executor193", pid 3787, jiffies 4294971495 (age 12.820s) hex dump (first 32 bytes): 03 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045 [] kmalloc include/linux/slab.h:553 [inline] [] kzalloc include/linux/slab.h:689 [inline] [] add_block_entry+0x35/0x320 fs/btrfs/ref-verify.c:267 [] add_tree_block+0x9e/0x210 fs/btrfs/ref-verify.c:329 [] btrfs_build_ref_tree+0x50c/0x750 fs/btrfs/ref-verify.c:471 [] open_ctree+0x19af/0x1fcb fs/btrfs/disk-io.c:3767 [] btrfs_fill_super fs/btrfs/super.c:1461 [inline] [] btrfs_mount_root.cold+0x13/0xf5 fs/btrfs/super.c:1829 [] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610 [] vfs_get_tree+0x28/0x100 fs/super.c:1531 [] fc_mount fs/namespace.c:1043 [inline] [] vfs_kern_mount.part.0+0xd1/0x120 fs/namespace.c:1073 [] vfs_kern_mount+0x3c/0x60 fs/namespace.c:1060 [] btrfs_mount+0x199/0x590 fs/btrfs/super.c:1889 [] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610 [] vfs_get_tree+0x28/0x100 fs/super.c:1531 [] do_new_mount fs/namespace.c:3040 [inline] [] path_mount+0xc37/0x10d0 fs/namespace.c:3370 [] do_mount fs/namespace.c:3383 [inline] [] __do_sys_mount fs/namespace.c:3591 [inline] [] __se_sys_mount fs/namespace.c:3568 [inline] [] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568 [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 BUG: memory leak unreferenced object 0xffff88810caab580 (size 96): comm "syz-executor193", pid 3787, jiffies 4294971495 (age 12.820s) hex dump (first 32 bytes): 00 10 10 00 00 00 00 00 00 10 00 00 00 00 00 00 ................ 01 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 ................ backtrace: [] kmalloc_trace+0x20/0x90 mm/slab_common.c:1045 [] kmalloc include/linux/slab.h:553 [inline] [] kzalloc include/linux/slab.h:689 [inline] [] add_block_entry+0x4e/0x320 fs/btrfs/ref-verify.c:268 [] add_tree_block+0x9e/0x210 fs/btrfs/ref-verify.c:329 [] btrfs_build_ref_tree+0x50c/0x750 fs/btrfs/ref-verify.c:471 [] open_ctree+0x19af/0x1fcb fs/btrfs/disk-io.c:3767 [] btrfs_fill_super fs/btrfs/super.c:1461 [inline] [] btrfs_mount_root.cold+0x13/0xf5 fs/btrfs/super.c:1829 [] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610 [] vfs_get_tree+0x28/0x100 fs/super.c:1531 [] fc_mount fs/namespace.c:1043 [inline] [] vfs_kern_mount.part.0+0xd1/0x120 fs/namespace.c:1073 [] vfs_kern_mount+0x3c/0x60 fs/namespace.c:1060 [] btrfs_mount+0x199/0x590 fs/btrfs/super.c:1889 [] legacy_get_tree+0x2b/0x90 fs/fs_context.c:610 [] vfs_get_tree+0x28/0x100 fs/super.c:1531 [] do_new_mount fs/namespace.c:3040 [inline] [] path_mount+0xc37/0x10d0 fs/namespace.c:3370 [] do_mount fs/namespace.c:3383 [inline] [] __do_sys_mount fs/namespace.c:3591 [inline] [] __se_sys_mount fs/namespace.c:3568 [inline] [] __x64_sys_mount+0x18e/0x1d0 fs/namespace.c:3568 [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 --- 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. syzbot can test patches for this issue, for details see: https://goo.gl/tpsmEJ#testing-patches