[v5.15] WARNING in btrfs_rename2

0 views
Skip to first unread message

syzbot

unread,
Apr 10, 2023, 9:44:00 AM4/10/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d86dfc4d95cd Linux 5.15.106
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16622c3dc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=639d55ab480652c5
dashboard link: https://syzkaller.appspot.com/bug?extid=cbe7d68e31e00d4e309a
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b2a94107dd69/disk-d86dfc4d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/398f8d288cb9/vmlinux-d86dfc4d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9b790c7e7c8c/Image-d86dfc4d.gz.xz

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

el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
------------[ cut here ]------------
WARNING: CPU: 0 PID: 15722 at fs/btrfs/inode.c:9870 btrfs_rename fs/btrfs/inode.c:9870 [inline]
WARNING: CPU: 0 PID: 15722 at fs/btrfs/inode.c:9870 btrfs_rename2+0x2e90/0x3f80 fs/btrfs/inode.c:9966
Modules linked in:
CPU: 0 PID: 15722 Comm: syz-executor.1 Not tainted 5.15.106-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : btrfs_rename fs/btrfs/inode.c:9870 [inline]
pc : btrfs_rename2+0x2e90/0x3f80 fs/btrfs/inode.c:9966
lr : btrfs_rename fs/btrfs/inode.c:9870 [inline]
lr : btrfs_rename2+0x2e90/0x3f80 fs/btrfs/inode.c:9966
sp : ffff800025d77600
x29: ffff800025d77820 x28: ffff000127c881c8 x27: ffff000127e1a230
x26: dfff800000000000 x25: ffff700004baeee8 x24: 0000000000000000
x23: 0000000000000001 x22: 1fffe0001b87e781 x21: ffff0000dbdfd9d0
x20: ffff0000dc3f3c08 x19: 00000000fffffff4 x18: 0000000000000001
x17: ff80800008333ebc x16: ffff800011940934 x15: ffff800008333ebc
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000040000
x11: 000000000000e40b x10: ffff80001dbc9000 x9 : 102fca3db1dcd400
x8 : 102fca3db1dcd400 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff800025d76d78 x4 : ffff8000149af940 x3 : ffff80000854a334
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026
Call trace:
btrfs_rename fs/btrfs/inode.c:9870 [inline]
btrfs_rename2+0x2e90/0x3f80 fs/btrfs/inode.c:9966
vfs_rename+0x9e0/0xe80 fs/namei.c:4736
do_renameat2+0x980/0x1040 fs/namei.c:4887
__do_sys_renameat2 fs/namei.c:4920 [inline]
__se_sys_renameat2 fs/namei.c:4917 [inline]
__arm64_sys_renameat2+0xe0/0xfc fs/namei.c:4917
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
irq event stamp: 82796
hardirqs last enabled at (82795): [<ffff800008329afc>] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257
hardirqs last disabled at (82796): [<ffff80001193bfc8>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:387
softirqs last enabled at (82772): [<ffff800008020ccc>] softirq_handle_end kernel/softirq.c:401 [inline]
softirqs last enabled at (82772): [<ffff800008020ccc>] __do_softirq+0xb5c/0xe20 kernel/softirq.c:587
softirqs last disabled at (82695): [<ffff8000081b56e0>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (82695): [<ffff8000081b56e0>] invoke_softirq kernel/softirq.c:439 [inline]
softirqs last disabled at (82695): [<ffff8000081b56e0>] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:636
---[ end trace e44d135fa4aa8991 ]---
BTRFS: error (device loop1) in btrfs_rename:9870: errno=-12 Out of memory
BTRFS info (device loop1): forced readonly


---
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,
Jul 8, 2023, 12:21:46 PM7/8/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: d54cfc420586 Linux 5.15.120
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13e6205ca80000
kernel config: https://syzkaller.appspot.com/x/.config?x=61785ceccc6bdf75
dashboard link: https://syzkaller.appspot.com/bug?extid=cbe7d68e31e00d4e309a
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12a009b4a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1530d164a80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/df6c88d1a764/disk-d54cfc42.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/787a9f4e718c/vmlinux-d54cfc42.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4a60832537ff/Image-d54cfc42.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/6e7d75c9a2f8/mount_0.gz

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

el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
------------[ cut here ]------------
WARNING: CPU: 0 PID: 4057 at fs/btrfs/inode.c:9870 btrfs_rename fs/btrfs/inode.c:9870 [inline]
WARNING: CPU: 0 PID: 4057 at fs/btrfs/inode.c:9870 btrfs_rename2+0x2e90/0x3f80 fs/btrfs/inode.c:9966
Modules linked in:
CPU: 0 PID: 4057 Comm: syz-executor741 Not tainted 5.15.120-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : btrfs_rename fs/btrfs/inode.c:9870 [inline]
pc : btrfs_rename2+0x2e90/0x3f80 fs/btrfs/inode.c:9966
lr : btrfs_rename fs/btrfs/inode.c:9870 [inline]
lr : btrfs_rename2+0x2e90/0x3f80 fs/btrfs/inode.c:9966
sp : ffff80001ce27600
x29: ffff80001ce27820 x28: ffff0000d9615948 x27: ffff0000df8cfa80
x26: dfff800000000000 x25: ffff7000039c4ee8 x24: 0000000000000000
x23: 0000000000000001 x22: 1fffe0001bf00b13 x21: ffff0000cb6f59d0
x20: ffff0000df805898 x19: 00000000fffffff4 x18: 0000000000000001
x17: ff80800008335ea8 x16: 0000000000000000 x15: ffff800008335ea8
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000000000
x11: ff8080000832d950 x10: 0000000000000000 x9 : 0428addfefce4200
x8 : 0428addfefce4200 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001ce26d78 x4 : ffff8000149cfca0 x3 : ffff800008335ff4
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026
Call trace:
btrfs_rename fs/btrfs/inode.c:9870 [inline]
btrfs_rename2+0x2e90/0x3f80 fs/btrfs/inode.c:9966
vfs_rename+0x9e0/0xe80 fs/namei.c:4736
do_renameat2+0x980/0x1040 fs/namei.c:4887
__do_sys_renameat2 fs/namei.c:4920 [inline]
__se_sys_renameat2 fs/namei.c:4917 [inline]
__arm64_sys_renameat2+0xe0/0xfc fs/namei.c:4917
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
irq event stamp: 72504
hardirqs last enabled at (72503): [<ffff80000832bae8>] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:257
hardirqs last disabled at (72504): [<ffff800011957088>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:387
softirqs last enabled at (72484): [<ffff800008020ccc>] softirq_handle_end kernel/softirq.c:401 [inline]
softirqs last enabled at (72484): [<ffff800008020ccc>] __do_softirq+0xb5c/0xe20 kernel/softirq.c:587
softirqs last disabled at (72435): [<ffff8000081b573c>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
softirqs last disabled at (72435): [<ffff8000081b573c>] invoke_softirq kernel/softirq.c:439 [inline]
softirqs last disabled at (72435): [<ffff8000081b573c>] __irq_exit_rcu+0x28c/0x534 kernel/softirq.c:636
---[ end trace 14ea487444ea1fe2 ]---
BTRFS: error (device loop0) in btrfs_rename:9870: errno=-12 Out of memory
BTRFS info (device loop0): forced readonly


---
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.
Reply all
Reply to author
Forward
0 new messages