syzbot


BUG: corrupted list in btrfs_alloc_compr_folio

Status: moderation: reported on 2026/03/20 11:23
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+e9032cb4c04d772305b3@syzkaller.appspotmail.com
First crash: 22d, last: 9d02h

Sample crash report:
 non-paged memory
list_del corruption. next->prev should be ffffea00010c2488, but was ffffea0001013488. (next=ffffea0001013488)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:67!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 1056 Comm: kworker/u4:8 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: btrfs-delalloc btrfs_work_helper
RIP: 0010:__list_del_entry_valid_or_report+0x18a/0x190 lib/list_debug.c:65
Code: ac bf 53 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 9d b7 76 fd 49 8b 56 08 48 c7 c7 40 eb 27 8c 48 89 de 4c 89 f1 e8 f7 d8 6c fc 90 <0f> 0b cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000546f5f8 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffffea00010c2488 RCX: 967b5659fd00b300
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000005 R08: ffff88801fc247d3 R09: 1ffff11003f848fa
R10: dffffc0000000000 R11: ffffed1003f848fb R12: 1ffffd4000202692
R13: dffffc0000000000 R14: ffffea0001013488 R15: ffffea0001013490
FS:  0000000000000000(0000) GS:ffff88808ca4c000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788064c684 CR3: 0000000044821000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:132 [inline]
 __list_del_entry include/linux/list.h:223 [inline]
 list_del_init include/linux/list.h:295 [inline]
 btrfs_alloc_compr_folio+0xa6/0x200 fs/btrfs/compression.c:194
 zlib_compress_bio+0x115e/0x2050 fs/btrfs/zlib.c:261
 btrfs_compress_bio+0x2c5/0x6b0 fs/btrfs/compression.c:1028
 compress_file_range+0x8df/0x19b0 fs/btrfs/inode.c:1023
 btrfs_work_helper+0x38c/0xc80 fs/btrfs/async-thread.c:312
 process_one_work kernel/workqueue.c:3276 [inline]
 process_scheduled_works+0xb6e/0x18c0 kernel/workqueue.c:3359
 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3440
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x18a/0x190 lib/list_debug.c:65
Code: ac bf 53 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 9d b7 76 fd 49 8b 56 08 48 c7 c7 40 eb 27 8c 48 89 de 4c 89 f1 e8 f7 d8 6c fc 90 <0f> 0b cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000546f5f8 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffffea00010c2488 RCX: 967b5659fd00b300
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000005 R08: ffff88801fc247d3 R09: 1ffff11003f848fa
R10: dffffc0000000000 R11: ffffed1003f848fb R12: 1ffffd4000202692
R13: dffffc0000000000 R14: ffffea0001013488 R15: ffffea0001013490
FS:  0000000000000000(0000) GS:ffff88808ca4c000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f788064c684 CR3: 0000000044821000 CR4: 0000000000352ef0

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/29 16:16 upstream cbfffcca2bf0 dcaebc52 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root BUG: corrupted list in btrfs_alloc_compr_folio
2026/03/16 11:19 upstream f338e7738378 64e21424 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root BUG: corrupted list in btrfs_alloc_compr_folio
* Struck through repros no longer work on HEAD.