linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WARNING in btrfs_destroy_inode
@ 2021-09-14  2:18 Hao Sun
  0 siblings, 0 replies; 2+ messages in thread
From: Hao Sun @ 2021-09-14  2:18 UTC (permalink / raw)
  To: clm, dsterba, josef, linux-btrfs; +Cc: linux-kernel

Hello,

When using Healer to fuzz the latest Linux kernel, the following crash
was triggered.

HEAD commit: 6880fa6c5660 Linux 5.15-rc1
git tree: upstream
console output:
https://drive.google.com/file/d/1EkNxlN6n1-wDS9noBR1g9RaPemdvLbS7/view?usp=sharing
kernel config: https://drive.google.com/file/d/1rUzyMbe5vcs6khA3tL9EHTLJvsUdWcgB/view?usp=sharing
C reproducer: https://drive.google.com/file/d/1iLdo-E88rP9jbMhZl4rqkGzXuZv-PuK-/view?usp=sharing
Syzlang reproducer:
https://drive.google.com/file/d/1VIpdHD0TOXhg_AMkgWvgBKZ4rInXaCvW/view?usp=sharing

If you fix this issue, please add the following tag to the commit:
Reported-by: Hao Sun <sunhao.th@gmail.com>

loop0: detected capacity change from 0 to 32768
BTRFS info (device loop0): disk space caching is enabled
BTRFS info (device loop0): has skinny extents
BTRFS info (device loop0): enabling ssd optimizations
FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 0, space 0, times 0
CPU: 3 PID: 8658 Comm: syz-executor Not tainted 5.15.0-rc1 #16
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x8d/0xcf lib/dump_stack.c:106
 fail_dump lib/fault-inject.c:52 [inline]
 should_fail+0x13c/0x160 lib/fault-inject.c:146
 should_failslab+0x5/0x10 mm/slab_common.c:1328
 slab_pre_alloc_hook.constprop.99+0x4e/0xc0 mm/slab.h:494
 slab_alloc_node mm/slub.c:3120 [inline]
 slab_alloc mm/slub.c:3214 [inline]
 kmem_cache_alloc+0x44/0x280 mm/slub.c:3219
 kmem_cache_zalloc include/linux/slab.h:711 [inline]
 lsm_inode_alloc security/security.c:593 [inline]
 security_inode_alloc+0x2c/0xb0 security/security.c:1018
 inode_init_always+0x116/0x2d0 fs/inode.c:170
 alloc_inode+0x44/0xd0 fs/inode.c:242
 new_inode_pseudo+0x12/0x70 fs/inode.c:936
 new_inode+0x18/0x40 fs/inode.c:965
 btrfs_new_inode+0xee/0xa60 fs/btrfs/inode.c:6448
 btrfs_create+0x12b/0x270 fs/btrfs/inode.c:6783
 lookup_open+0x660/0x780 fs/namei.c:3282
 open_last_lookups fs/namei.c:3352 [inline]
 path_openat+0x465/0xe20 fs/namei.c:3557
 do_filp_open+0xe3/0x170 fs/namei.c:3588
 do_sys_openat2+0x357/0x4a0 fs/open.c:1200
 do_sys_open+0x87/0xd0 fs/open.c:1216
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x34/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x46ae99
Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa3990f1c48 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 000000000078c0a0 RCX: 000000000046ae99
RDX: 0000000000000000 RSI: 00000000000000a1 RDI: 0000000020005800
RBP: 00007fa3990f1c80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000c
R13: 0000000000000000 R14: 000000000078c0a0 R15: 00007ffcee8291d0
------------[ cut here ]------------
WARNING: CPU: 3 PID: 8658 at fs/btrfs/inode.c:9150
btrfs_destroy_inode+0x207/0x340 fs/btrfs/inode.c:9150
Modules linked in:
CPU: 3 PID: 8658 Comm: syz-executor Not tainted 5.15.0-rc1 #16
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
RIP: 0010:btrfs_destroy_inode+0x207/0x340 fs/btrfs/inode.c:9150
Code: 00 00 4c 89 ef e8 19 a4 38 02 4d 85 f6 0f 85 4e ff ff ff e8 8b
5a 4a ff 4c 89 e7 e8 a3 39 fe ff e9 3c ff ff ff e8 79 5a 4a ff <0f> 0b
e8 72 5a 4a ff 48 83 bb d0 03 00 00 00 0f 84 22 fe ff ff e8
RSP: 0018:ffffc9000ce039d0 EFLAGS: 00010216
RAX: 0000000000024829 RBX: ffff888108670e18 RCX: ffffc90001239000
RDX: 0000000000040000 RSI: ffffffff81ed3787 RDI: ffff888108670e18
RBP: ffffffff81ed3580 R08: 0000000000000020 R09: 0000000000000001
R10: ffffc9000ce038b8 R11: 0000000000000003 R12: 0000000000000000
R13: ffff8881011dd9a0 R14: ffff88800d9f01a8 R15: 0000000000000000
FS:  00007fa3990f2700(0000) GS:ffff88813dd00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001b74c48 CR3: 0000000109fec000 CR4: 0000000000750ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace:
 alloc_inode+0x6e/0xd0 fs/inode.c:244
 new_inode_pseudo+0x12/0x70 fs/inode.c:936
 new_inode+0x18/0x40 fs/inode.c:965
 btrfs_new_inode+0xee/0xa60 fs/btrfs/inode.c:6448
 btrfs_create+0x12b/0x270 fs/btrfs/inode.c:6783
 lookup_open+0x660/0x780 fs/namei.c:3282
 open_last_lookups fs/namei.c:3352 [inline]
 path_openat+0x465/0xe20 fs/namei.c:3557
 do_filp_open+0xe3/0x170 fs/namei.c:3588
 do_sys_openat2+0x357/0x4a0 fs/open.c:1200
 do_sys_open+0x87/0xd0 fs/open.c:1216
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x34/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x46ae99
Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa3990f1c48 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 000000000078c0a0 RCX: 000000000046ae99
RDX: 0000000000000000 RSI: 00000000000000a1 RDI: 0000000020005800
RBP: 00007fa3990f1c80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000c
R13: 0000000000000000 R14: 000000000078c0a0 R15: 00007ffcee8291d0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* WARNING in btrfs_destroy_inode
@ 2018-06-24 20:54 shankarapailoor
  0 siblings, 0 replies; 2+ messages in thread
From: shankarapailoor @ 2018-06-24 20:54 UTC (permalink / raw)
  To: Chris Mason, jbacik, dsterba; +Cc: linux-btrfs, linux-fsdevel, LKML

Hi,

I'm using Syzkaller to fuzz linux 4.18.0-rc1 with btrfs and found the
following WARNING crash. I have a C program that reproduces it here:
https://pastebin.com/bBzmrGFH

WARNING: CPU: 1 PID: 12788 at fs/btrfs/inode.c:9288
btrfs_destroy_inode+0x545/0x720  fs/btrfs/inode.c:9288

Kernel panic - not syncing: panic_on_warn set ...CPU: 1 PID: 12788
Comm: syz-executor5 Not tainted 4.18.0-rc1+ #35
Hardware name: Google Google Compute Engine/Google Compute Engine,
BIOS Google 01/01/2011
Call Trace:
   __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x148/0x1b5
lib/dump_stack.c:113
   panic+0x200/0x42c kernel/panic.c:184
   __warn+0x1ea/0x200 kernel/panic.c:536
   report_bug+0x1f4/0x2b0 lib/bug.c:186
   fixup_bug.part.10+0x37/0x80 arch/x86/kernel/traps.c:178
   fixup_bug arch/x86/kernel/traps.c:248 [inline]
   do_error_trap+0x288/0x2e0 arch/x86/kernel/traps.c:296
   do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
    invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:992
RIP: 0010:btrfs_destroy_inode+0x545/0x720 fs/btrfs/inode.c:9288
Code: ff e8 4f 6c 52 ff 0f 0b e9 ed fb ff ff e8 43 6c 52 ff 0f 0b e9
c8 fc ff ff e8 37 6c 52 ff 0f 0b e9 f2 fc ff ff e8 2b 6c 52 ff <0f> 0b
e9 93 fb ff ff e8 1f 6c 52 ff 0f 0b e9 38 fc ff ff e8 13 6c
RSP: 0018:ffff880091287c68 EFLAGS: 00010293
RAX: ffff88009d0a8340 RBX: ffff8800a65c36a8 RCX: ffffffff820ef895
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff8800a65c3598
RBP: ffff880091287cb0 R08: ffffed00169d02bf R09: 0000000000000001
R10: ffffed00169d02be R11: ffff8800b4e815f7 R12: ffff8800a65c3240
R13: ffff8800b448c1c0 R14: ffff8800a65c3878 R15: ffffffff855cbc40
    destroy_inode+0xc3/0x120 fs/inode.c:267
    evict+0x3d4/0x620 fs/inode.c:575
    iput_final fs/inode.c:1506 [inline]
    iput+0x4e8/0x760 fs/inode.c:1532
    do_unlinkat+0x398/0x670 fs/namei.c:4079
    __do_sys_unlink fs/namei.c:4120 [inline]
    __se_sys_unlink fs/namei.c:4118 [inline]
    __x64_sys_unlink+0x42/0x50 fs/namei.c:4118
    do_syscall_64+0xda/0x560 arch/x86/entry/common.c:290
    entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x455757
Code: 0f 1f 00 b8 58 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 bd bc fb
ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 57 00 00 00 0f 05 <48> 3d
01 f0 ff ff 0f 83 9d bc fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffe629f058 EFLAGS: 00000202 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000455757
RDX: 0000000002980a13 RSI: 00007fffe629f0f0 RDI: 00007fffe629f0f0
RBP: 00007fffe62a0e00 R08: 0000000000000000 R09: 000000000000000a
R10: 0000000000000005 R11: 0000000000000202 R12: 0000000002980940
R13: 0000000000000000 R14: 0000000000000117 R15: 000000000008e36d


My kernel configs: https://pastebin.com/KFcaLxhj

Please let me know if I can provide more information.

-- 
Regards,
Shankara Pailoor

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-14  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14  2:18 WARNING in btrfs_destroy_inode Hao Sun
  -- strict thread matches above, loose matches on Subject: below --
2018-06-24 20:54 shankarapailoor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).