[ext4?] kernel panic: EXT4-fs (device loop0): panic forced after error

18 views
Skip to first unread message

syzbot

unread,
Dec 24, 2022, 3:12:51 PM12/24/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 003c389455eb Merge 5.10.160 into android12-5.10-lts
git tree: android12-5.10-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=171a4d28480000
kernel config: https://syzkaller.appspot.com/x/.config?x=ce128396c79a61d9
dashboard link: https://syzkaller.appspot.com/bug?extid=9a3867e6af15bf0d031c
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1187deac480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1621e4a8480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/722a669278a6/disk-003c3894.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f7a09169d423/vmlinux-003c3894.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4c5efdf62a59/bzImage-003c3894.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/2c2e12df224e/mount_0.gz

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

EXT4-fs error (device loop0): ext4_map_blocks:594: inode #2: block 2: comm syz-executor283: lblock 0 mapped to illegal pblock 2 (length 1)
Kernel panic - not syncing: EXT4-fs (device loop0): panic forced after error
CPU: 1 PID: 376 Comm: syz-executor283 Not tainted 5.10.160-syzkaller-01321-g003c389455eb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
dump_stack+0x15/0x17 lib/dump_stack.c:135
panic+0x2a0/0x7d7 kernel/panic.c:231
ext4_handle_error+0x30e/0x310 fs/ext4/super.c:688
__ext4_error_inode+0x2c7/0x580 fs/ext4/super.c:750
ext4_map_blocks+0x1313/0x1ee0 fs/ext4/inode.c:410
ext4_getblk+0x19c/0x650 fs/ext4/inode.c:849
ext4_bread+0x2f/0x1b0 fs/ext4/inode.c:901
__ext4_read_dirblock+0xa0/0x8e0 fs/ext4/namei.c:138
dx_probe+0xcd/0x15a0 fs/ext4/namei.c:793
ext4_dx_find_entry fs/ext4/namei.c:1758 [inline]
__ext4_find_entry+0x5b9/0x1b90 fs/ext4/namei.c:1601
ext4_lookup_entry fs/ext4/namei.c:1739 [inline]
ext4_lookup+0x3e1/0xb20 fs/ext4/namei.c:1809
__lookup_slow+0x2b3/0x400 fs/namei.c:1630
lookup_slow fs/namei.c:1647 [inline]
lookup_one_len_unlocked+0x458/0x680 fs/namei.c:2673
lookup_positive_unlocked+0x25/0xb0 fs/namei.c:2689
dquot_quota_on_mount+0x5a/0xe0 fs/quota/dquot.c:2507
ext4_quota_on_mount fs/ext4/super.c:6276 [inline]
ext4_orphan_cleanup+0x3f2/0xdb0 fs/ext4/super.c:3073
ext4_fill_super+0x8880/0x9150 fs/ext4/super.c:5087
mount_bdev+0x25f/0x370 fs/super.c:1420
ext4_mount+0x34/0x40 fs/ext4/super.c:6606
legacy_get_tree+0xf0/0x190 fs/fs_context.c:592
vfs_get_tree+0x88/0x290 fs/super.c:1550
do_new_mount+0x289/0xad0 fs/namespace.c:2899
path_mount+0x58d/0xce0 fs/namespace.c:3229
do_mount fs/namespace.c:3242 [inline]
__do_sys_mount fs/namespace.c:3450 [inline]
__se_sys_mount+0x2d2/0x3c0 fs/namespace.c:3427
__x64_sys_mount+0xbf/0xd0 fs/namespace.c:3427
do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7fef9239bbca
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffff0a3d988 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fef9239bbca
RDX: 0000000020000440 RSI: 0000000020000480 RDI: 00007ffff0a3d9a0
RBP: 00007ffff0a3d9a0 R08: 00007ffff0a3d9e0 R09: 0000000000000474
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000004
R13: 0000555555bfd2c0 R14: 0000000000000000 R15: 00007ffff0a3d9e0
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
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 can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Dec 24, 2022, 3:27:53 PM12/24/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c73b4619ad86 ANDROID: abi preservation for fscrypt change ..
git tree: android13-5.15-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=138ec250480000
kernel config: https://syzkaller.appspot.com/x/.config?x=d7c9bd3bb9661aad
dashboard link: https://syzkaller.appspot.com/bug?extid=b6a73f0870315c7942c8
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14e0d8ff880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1673dc40480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d4a785f6c196/disk-c73b4619.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e2fba875c9ab/vmlinux-c73b4619.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a870e2543ec9/bzImage-c73b4619.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/24e647f2a879/mount_0.gz

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

EXT4-fs error (device loop0): ext4_map_blocks:596: inode #2: block 2: comm syz-executor592: lblock 0 mapped to illegal pblock 2 (length 1)
Kernel panic - not syncing: EXT4-fs (device loop0): panic forced after error
CPU: 1 PID: 421 Comm: syz-executor592 Not tainted 5.15.78-syzkaller-00911-gc73b4619ad86 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x17 lib/dump_stack.c:113
panic+0x258/0x727 kernel/panic.c:232
ext4_handle_error+0x772/0x780 fs/ext4/super.c:667
__ext4_error_inode+0x236/0x4d0 fs/ext4/super.c:786
ext4_map_blocks+0x1214/0x1e20
ext4_getblk+0x19c/0x6f0 fs/ext4/inode.c:851
ext4_bread+0x2f/0x180 fs/ext4/inode.c:904
__ext4_read_dirblock+0xd7/0x8d0 fs/ext4/namei.c:144
dx_probe+0xcd/0x15a0 fs/ext4/namei.c:818
ext4_dx_find_entry fs/ext4/namei.c:1771 [inline]
__ext4_find_entry+0x571/0x1b90 fs/ext4/namei.c:1616
ext4_lookup_entry fs/ext4/namei.c:1752 [inline]
ext4_lookup+0x3de/0xb20 fs/ext4/namei.c:1820
__lookup_slow+0x2b3/0x400 fs/namei.c:1659
lookup_slow fs/namei.c:1676 [inline]
lookup_one_unlocked+0x452/0x690 fs/namei.c:2749
lookup_one_positive_unlocked fs/namei.c:2778 [inline]
lookup_positive_unlocked+0x2c/0xb0 fs/namei.c:2818
dquot_quota_on_mount+0x5a/0xe0 fs/quota/dquot.c:2505
ext4_quota_on_mount fs/ext4/orphan.c:316 [inline]
ext4_orphan_cleanup+0x56b/0x10b0 fs/ext4/orphan.c:444
ext4_fill_super+0x8cde/0x9650 fs/ext4/super.c:4961
mount_bdev+0x280/0x3b0 fs/super.c:1369
ext4_mount+0x34/0x40 fs/ext4/super.c:6540
legacy_get_tree+0xf0/0x190 fs/fs_context.c:610
vfs_get_tree+0x88/0x290 fs/super.c:1499
do_new_mount+0x289/0xad0 fs/namespace.c:2994
path_mount+0x60b/0x1050 fs/namespace.c:3324
do_mount fs/namespace.c:3337 [inline]
__do_sys_mount fs/namespace.c:3545 [inline]
__se_sys_mount+0x2d2/0x3c0 fs/namespace.c:3522
__x64_sys_mount+0xbf/0xd0 fs/namespace.c:3522
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f6fe3ac1bca
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe72713208 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f6fe3ac1bca
RDX: 0000000020000440 RSI: 0000000020000480 RDI: 00007ffe72713220
RBP: 00007ffe72713220 R08: 00007ffe72713260 R09: 0000000000000474
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000004
R13: 00005555574b92c0 R14: 0000000000000000 R15: 00007ffe72713260
</TASK>

Tudor Ambarus

unread,
Dec 26, 2022, 9:01:18 AM12/26/22
to syzbot+b6a73f...@syzkaller.appspotmail.com, jone...@google.com, syzkaller-a...@googlegroups.com
#syz invalid

Similar to
https://groups.google.com/g/syzkaller-bugs/c/3HhbJtXngdI/m/YOUH8mXSBAAJ

Seems that syzbot creates a corrupted fs, but at the same time keeps the
EXT4_ERRORS_PANIC flag which treats error as panic. At
__check_block_validity() time we determine that this is a corrupted FS
and panic - which is consistent with the EXT4_ERRORS_PANIC flag.

Tudor Ambarus

unread,
Dec 26, 2022, 9:10:23 AM12/26/22
to syzbot+9a3867...@syzkaller.appspotmail.com, jone...@google.com, syzkaller-a...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages