[v5.15] WARNING in lookup_inline_extent_backref

0 views
Skip to first unread message

syzbot

unread,
Apr 1, 2023, 4:16:52 AM4/1/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c957cbb87315 Linux 5.15.105
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1709be21c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=6f83fab0469f5de7
dashboard link: https://syzkaller.appspot.com/bug?extid=cf54c2ca42468689e803
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/35817fda76e5/disk-c957cbb8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/80f96399b8d4/vmlinux-c957cbb8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4336a6ad59ec/bzImage-c957cbb8.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+cf54c2...@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 0 PID: 9183 at fs/btrfs/extent-tree.c:862 lookup_inline_extent_backref+0x8ba/0x1370
Modules linked in:
CPU: 1 PID: 9183 Comm: syz-executor.4 Not tainted 5.15.105-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:lookup_inline_extent_backref+0x8ba/0x1370 fs/btrfs/extent-tree.c:862
Code: 8b 64 24 30 0f 87 c7 0a 00 00 e8 e1 e5 26 fe 4c 8b 74 24 20 eb 4e 83 7d 28 00 4c 8b 74 24 20 0f 84 bf 04 00 00 e8 c6 e5 26 fe <0f> 0b 41 bd fb ff ff ff e9 38 06 00 00 e8 b4 e5 26 fe 4c 8b 64 24
RSP: 0018:ffffc9000525eee0 EFLAGS: 00010283
RAX: ffffffff8358d4fa RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc900068e4000 RSI: 0000000000018761 RDI: 0000000000018762
RBP: ffffc9000525f090 R08: ffffffff8358d068 R09: ffffc9000525ec80
R10: ffffffffffffffff R11: dffffc0000000001 R12: ffffc9000525f000
R13: dffffc0000000000 R14: ffff88802478e630 R15: 1ffff92000a4be01
FS: 00007ff691d0b700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2eb51000 CR3: 0000000079a8f000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
insert_inline_extent_backref+0xe2/0x250 fs/btrfs/extent-tree.c:1145
__btrfs_inc_extent_ref+0x11f/0x610 fs/btrfs/extent-tree.c:1468
run_delayed_tree_ref fs/btrfs/extent-tree.c:1683 [inline]
run_one_delayed_ref fs/btrfs/extent-tree.c:1710 [inline]
btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:1956 [inline]
__btrfs_run_delayed_refs+0x1153/0x4160 fs/btrfs/extent-tree.c:2019
btrfs_run_delayed_refs+0x2fa/0x490 fs/btrfs/extent-tree.c:2150
qgroup_account_snapshot fs/btrfs/transaction.c:1535 [inline]
create_pending_snapshot+0x1215/0x3110 fs/btrfs/transaction.c:1805
create_pending_snapshots+0x195/0x1d0 fs/btrfs/transaction.c:1873
btrfs_commit_transaction+0x1247/0x3800 fs/btrfs/transaction.c:2317
create_snapshot+0x407/0x700 fs/btrfs/ioctl.c:782
btrfs_mksubvol+0x633/0x770 fs/btrfs/ioctl.c:932
btrfs_mksnapshot+0xb5/0xf0 fs/btrfs/ioctl.c:978
__btrfs_ioctl_snap_create+0x338/0x450 fs/btrfs/ioctl.c:1859
btrfs_ioctl_snap_create+0x136/0x190 fs/btrfs/ioctl.c:1886
btrfs_ioctl+0x216/0xb10
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7ff6937990f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff691d0b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ff6938b8f80 RCX: 00007ff6937990f9
RDX: 0000000020002180 RSI: 0000000050009401 RDI: 000000000000000b
RBP: 00007ff6937f4b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc77b322cf R14: 00007ff691d0b300 R15: 0000000000022000
</TASK>


---
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jun 20, 2023, 10:31:45 AM6/20/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 471e639e59d1 Linux 5.15.117
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=167e040f280000
kernel config: https://syzkaller.appspot.com/x/.config?x=6390289bcc1381aa
dashboard link: https://syzkaller.appspot.com/bug?extid=cf54c2ca42468689e803
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17d59e2f280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17dbc013280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/145b7f137d72/disk-471e639e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b5bd2fcb945c/vmlinux-471e639e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/794584032e0f/bzImage-471e639e.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/25c6d90e32e6/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+cf54c2...@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 0 PID: 3565 at fs/btrfs/extent-tree.c:862 lookup_inline_extent_backref+0x8ba/0x1370
Modules linked in:
CPU: 0 PID: 3565 Comm: syz-executor300 Not tainted 5.15.117-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:lookup_inline_extent_backref+0x8ba/0x1370 fs/btrfs/extent-tree.c:862
Code: 8b 64 24 30 0f 87 c7 0a 00 00 e8 41 ac 26 fe 4c 8b 74 24 20 eb 4e 83 7d 28 00 4c 8b 74 24 20 0f 84 bf 04 00 00 e8 26 ac 26 fe <0f> 0b 41 bd fb ff ff ff e9 38 06 00 00 e8 14 ac 26 fe 4c 8b 64 24
RSP: 0018:ffffc90002f0eee0 EFLAGS: 00010293
RAX: ffffffff83594d2a RBX: 0000000000000000 RCX: ffff888014f9bb80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90002f0f090 R08: ffffffff83594898 R09: ffffc90002f0ec80
R10: ffffffffffffffff R11: dffffc0000000001 R12: ffffc90002f0f000
R13: dffffc0000000000 R14: ffff88807d76f000 R15: 1ffff920005e1e01
FS: 00007fe3f9399700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055f38f8ed0e8 CR3: 0000000071d12000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
insert_inline_extent_backref+0xe2/0x250 fs/btrfs/extent-tree.c:1145
__btrfs_inc_extent_ref+0x11f/0x610 fs/btrfs/extent-tree.c:1468
run_delayed_tree_ref fs/btrfs/extent-tree.c:1683 [inline]
run_one_delayed_ref fs/btrfs/extent-tree.c:1710 [inline]
btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:1956 [inline]
__btrfs_run_delayed_refs+0x1153/0x4160 fs/btrfs/extent-tree.c:2019
btrfs_run_delayed_refs+0x141/0x490 fs/btrfs/extent-tree.c:2150
qgroup_account_snapshot fs/btrfs/transaction.c:1535 [inline]
create_pending_snapshot+0x1215/0x3110 fs/btrfs/transaction.c:1805
create_pending_snapshots+0x195/0x1d0 fs/btrfs/transaction.c:1873
btrfs_commit_transaction+0x1247/0x3800 fs/btrfs/transaction.c:2317
create_snapshot+0x407/0x700 fs/btrfs/ioctl.c:782
btrfs_mksubvol+0x633/0x770 fs/btrfs/ioctl.c:932
btrfs_mksnapshot+0xb5/0xf0 fs/btrfs/ioctl.c:978
__btrfs_ioctl_snap_create+0x338/0x450 fs/btrfs/ioctl.c:1859
btrfs_ioctl_snap_create+0x136/0x190 fs/btrfs/ioctl.c:1886
btrfs_ioctl+0x216/0xb10
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fe40080eb39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe3f93992f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe4008997f0 RCX: 00007fe40080eb39
RDX: 0000000020002180 RSI: 0000000050009401 RDI: 0000000000000007
RBP: 00007fe40086668c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 00007fe400865690 R14: 2a63d28a7f685400 R15: 00007fe4008997f8
</TASK>


---
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.

syzbot

unread,
Sep 22, 2023, 10:09:29 AM9/22/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 398646011e3ce53409afda64bc2024d967e83880
git tree: upstream
Author: Nikolay Borisov <nbor...@suse.com>
Date: Wed Mar 30 09:14:06 2022 +0000

btrfs: remove checks for arg argument in btrfs_ioctl_balance

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=178315d4680000
Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages