kernel BUG at fs/ext4/inline.c:LINE!

24 views
Skip to first unread message

syzbot

unread,
Oct 14, 2020, 8:01:25 AM10/14/20
to adilger...@dilger.ca, linux...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, ty...@mit.edu
Hello,

syzbot found the following issue on:

HEAD commit: 6f2f486d Merge tag 'spi-fix-v5.9-rc8' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13a89478500000
kernel config: https://syzkaller.appspot.com/x/.config?x=de7f697da23057c7
dashboard link: https://syzkaller.appspot.com/bug?extid=4faa160fa96bfba639f8
compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=113a0a8b900000

Bisection is inconclusive: the issue happens on the oldest tested release.

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=119be2ab900000
final oops: https://syzkaller.appspot.com/x/report.txt?x=139be2ab900000
console output: https://syzkaller.appspot.com/x/log.txt?x=159be2ab900000

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

------------[ cut here ]------------
kernel BUG at fs/ext4/inline.c:751!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 23920 Comm: syz-executor.3 Not tainted 5.9.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ext4_write_inline_data_end+0x847/0x880 fs/ext4/ext4.h:3341
Code: 38 c1 0f 8c 06 fc ff ff 4c 89 e7 e8 d3 ac b2 ff e9 f9 fb ff ff 48 ff cd 48 89 eb e9 69 fe ff ff e8 4e a5 49 06 e8 e9 c7 72 ff <0f> 0b e8 e2 c7 72 ff 0f 0b e8 db c7 72 ff 0f 0b e8 d4 c7 72 ff 0f
RSP: 0018:ffffc90005077940 EFLAGS: 00010293
RAX: ffffffff82023607 RBX: 0000000c00000000 RCX: ffff8880a6718140
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff82022f07 R09: ffffed100ead147b
R10: ffffed100ead147b R11: 0000000000000000 R12: 0000000000000000
R13: ffff88807568a5b8 R14: 0000000000000001 R15: dffffc0000000000
FS: 00007faa624ff700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6db9e8bdb8 CR3: 000000009d643000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ext4_write_end+0x225/0xef0 fs/ext4/inode.c:1274
generic_perform_write+0x344/0x4e0 mm/filemap.c:3516
ext4_buffered_write_iter+0x44d/0x5d0 fs/ext4/file.c:269
ext4_file_write_iter+0x891/0x19b0 include/linux/fs.h:784
do_iter_readv_writev+0x4f9/0x6c0 include/linux/fs.h:1876
do_iter_write+0x164/0x610 fs/read_write.c:1026
vfs_writev fs/read_write.c:1099 [inline]
do_pwritev+0x234/0x430 fs/read_write.c:1196
do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45de59
Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007faa624fec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000128
RAX: ffffffffffffffda RBX: 0000000000026400 RCX: 000000000045de59
RDX: 0000000000000001 RSI: 00000000200014c0 RDI: 0000000000000006
RBP: 000000000118c018 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bfd4
R13: 00007ffc849922ef R14: 00007faa624ff9c0 R15: 000000000118bfd4
Modules linked in:
---[ end trace 636f601b36ee58e9 ]---
RIP: 0010:ext4_write_inline_data_end+0x847/0x880 fs/ext4/ext4.h:3341
Code: 38 c1 0f 8c 06 fc ff ff 4c 89 e7 e8 d3 ac b2 ff e9 f9 fb ff ff 48 ff cd 48 89 eb e9 69 fe ff ff e8 4e a5 49 06 e8 e9 c7 72 ff <0f> 0b e8 e2 c7 72 ff 0f 0b e8 db c7 72 ff 0f 0b e8 d4 c7 72 ff 0f
RSP: 0018:ffffc90005077940 EFLAGS: 00010293
RAX: ffffffff82023607 RBX: 0000000c00000000 RCX: ffff8880a6718140
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff82022f07 R09: ffffed100ead147b
R10: ffffed100ead147b R11: 0000000000000000 R12: 0000000000000000
R13: ffff88807568a5b8 R14: 0000000000000001 R15: dffffc0000000000
FS: 00007faa624ff700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000118c000 CR3: 000000009d643000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


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

syzbot

unread,
Dec 13, 2021, 2:01:29 PM12/13/21
to adilger...@dilger.ca, linux...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, ty...@mit.edu
syzbot has found a reproducer for the following issue on:

HEAD commit: 2585cf9dfaad Linux 5.16-rc5
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1034be69b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=44af4fa322f7642f
dashboard link: https://syzkaller.appspot.com/bug?extid=4faa160fa96bfba639f8
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=148458d1b00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=110f6169b00000

Bisection is inconclusive: the issue happens on the oldest tested release.

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=119be2ab900000
final oops: https://syzkaller.appspot.com/x/report.txt?x=139be2ab900000
console output: https://syzkaller.appspot.com/x/log.txt?x=159be2ab900000

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

------------[ cut here ]------------
kernel BUG at fs/ext4/inline.c:755!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3633 Comm: syz-executor843 Not tainted 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ext4_write_inline_data_end+0xa11/0x1120 fs/ext4/inline.c:755
Code: 01 44 89 f6 e8 40 dc 67 ff 41 83 fe 01 0f 87 2a fb ff ff e8 11 da 67 ff 4c 89 e7 e8 79 fe 90 ff e9 9e fb ff ff e8 ff d9 67 ff <0f> 0b e8 f8 d9 67 ff 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1
RSP: 0018:ffffc9000281f3a8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff888076750000 RSI: ffffffff820fd161 RDI: 0000000000000003
RBP: ffff8880737a5c58 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff820fc907 R11: 0000000000000000 R12: ffffea0001f0d640
R13: 0000000000000001 R14: ffff8880737a5a08 R15: ffffc9000281f400
FS: 00007f57f9ace700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055c0556fbf48 CR3: 000000007a16f000 CR4: 0000000000350ef0
Call Trace:
<TASK>
ext4_write_end+0x200/0xcf0 fs/ext4/inode.c:1292
ext4_da_write_end+0x375/0x990 fs/ext4/inode.c:3026
generic_perform_write+0x2c6/0x510 mm/filemap.c:3765
ext4_buffered_write_iter+0x1ac/0x3b0 fs/ext4/file.c:269
ext4_file_write_iter+0x423/0x14e0 fs/ext4/file.c:681
call_write_iter include/linux/fs.h:2162 [inline]
do_iter_readv_writev+0x472/0x750 fs/read_write.c:725
do_iter_write+0x188/0x710 fs/read_write.c:851
vfs_iter_write+0x70/0xa0 fs/read_write.c:892
iter_file_splice_write+0x723/0xc70 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0x110/0x180 fs/splice.c:936
splice_direct_to_actor+0x34b/0x8c0 fs/splice.c:891
do_splice_direct+0x1b3/0x280 fs/splice.c:979
do_sendfile+0xaf2/0x1250 fs/read_write.c:1245
__do_sys_sendfile64 fs/read_write.c:1310 [inline]
__se_sys_sendfile64 fs/read_write.c:1296 [inline]
__x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1296
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f57f9b21de9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f57f9ace2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f57f9ba74c0 RCX: 00007f57f9b21de9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000003
RBP: 00007f57f9b740cc R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000010000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 00007f57f9b730c8 R14: 0000000300000002 R15: 00007f57f9ba74c8
</TASK>
Modules linked in:
---[ end trace e6a45f74f6d725ce ]---
RIP: 0010:ext4_write_inline_data_end+0xa11/0x1120 fs/ext4/inline.c:755
Code: 01 44 89 f6 e8 40 dc 67 ff 41 83 fe 01 0f 87 2a fb ff ff e8 11 da 67 ff 4c 89 e7 e8 79 fe 90 ff e9 9e fb ff ff e8 ff d9 67 ff <0f> 0b e8 f8 d9 67 ff 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1
RSP: 0018:ffffc9000281f3a8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff888076750000 RSI: ffffffff820fd161 RDI: 0000000000000003
RBP: ffff8880737a5c58 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff820fc907 R11: 0000000000000000 R12: ffffea0001f0d640
R13: 0000000000000001 R14: ffff8880737a5a08 R15: ffffc9000281f400
FS: 00007f57f9ace700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f57f9aad718 CR3: 000000007a16f000 CR4: 0000000000350ef0

syzbot

unread,
Aug 29, 2022, 8:17:14 AM8/29/22
to adilger...@dilger.ca, gre...@linuxfoundation.org, h...@lst.de, linux...@vger.kernel.org, linux-...@vger.kernel.org, pau...@kernel.org, ph...@philpotter.co.uk, syzkall...@googlegroups.com, ty...@mit.edu
syzbot suspects this issue was fixed by commit:

commit 1045a06724f322ed61f1ffb994427c7bdbe64647
Author: Christoph Hellwig <h...@lst.de>
Date: Wed Jun 29 15:01:02 2022 +0000

remove CONFIG_ANDROID

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16ab0893080000
start commit: a8ad9a2434dc Merge tag 'efi-urgent-for-v5.16-2' of git://g..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=2ebd4b29568807bc
dashboard link: https://syzkaller.appspot.com/bug?extid=4faa160fa96bfba639f8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=114ae045b00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1785e92bb00000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: remove CONFIG_ANDROID

Greg KH

unread,
Aug 29, 2022, 10:19:55 AM8/29/22
to syzbot, adilger...@dilger.ca, h...@lst.de, linux...@vger.kernel.org, linux-...@vger.kernel.org, pau...@kernel.org, ph...@philpotter.co.uk, syzkall...@googlegroups.com, ty...@mit.edu
I really doubt that ext4 has anything to do with the removal of
CONFIG_ANDROID unless the problem here was some of the other crazy RCU
delay issues around this config option. Glad it's gone...

Dmitry Vyukov

unread,
Aug 30, 2022, 3:46:17 AM8/30/22
to Greg KH, syzbot, adilger...@dilger.ca, h...@lst.de, linux...@vger.kernel.org, linux-...@vger.kernel.org, pau...@kernel.org, ph...@philpotter.co.uk, syzkall...@googlegroups.com, ty...@mit.edu
Agree.

Looking at:
$ git log --oneline fs/ext4/inline.c

The following recent commit fixes a very similar failure mode:

#syz fix: ext4: fix bug_on in ext4_writepages
Reply all
Reply to author
Forward
0 new messages