syzbot


memory leak in btrfs_ref_tree_mod

Status: fixed on 2024/01/20 21:18
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+d66de4cbf532749df35f@syzkaller.appspotmail.com
Fix commit: f91192cd6859 btrfs: ref-verify: fix memory leaks in btrfs_ref_tree_mod()
First crash: 484d, last: 484d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH v2] btrfs: ref-verify: fix memory leaks 2 (2) 2023/11/21 13:03
[syzbot] [btrfs?] memory leak in btrfs_ref_tree_mod 1 (9) 2023/11/16 09:42
[PATCH] btrfs: ref-verify: fix memory leaks 3 (3) 2023/11/13 13:49
Last patch testing requests (9)
Created Duration User Patch Repo Result
2023/11/16 09:42 23m bragathemanick0908@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 25aa0bebba72b318e71fe205bfd1236550cc9534 report log
2023/11/13 09:44 13m jose.pekkarinen@foxhound.fi patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5a6a09e97199d6600d31383055f9d43fbbcbe86f report log
2023/11/12 13:08 19m bragathemanick0908@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 25aa0bebba72b318e71fe205bfd1236550cc9534 OK log
2023/11/12 11:04 28m bragathemanick0908@gmail.com patch git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 25aa0bebba72b318e71fe205bfd1236550cc9534 report log
2023/11/12 10:16 4m bragathemanick0908@gmail.com patch upstream error
2023/11/12 09:33 0m bragathemanick0908@gmail.com patch upstream error
2023/11/12 09:17 1m bragathemanick0908@gmail.com patch upstream error
2023/11/07 10:20 11m retest repro upstream report log
2023/08/29 00:48 20m retest repro upstream report log

Sample crash report:
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


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/11 09:06 upstream 25aa0bebba72 da3c3ef8 .config console log report syz [mounted in repro] ci-upstream-gce-leak memory leak in btrfs_ref_tree_mod
* Struck through repros no longer work on HEAD.