kernel BUG in fat_get_block

4 views
Skip to first unread message

syzbot

unread,
Nov 26, 2022, 1:21:38 AM11/26/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 179ef7fe8677 Linux 4.14.300
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1455e8a1880000
kernel config: https://syzkaller.appspot.com/x/.config?x=aa85f51ec321d5a9
dashboard link: https://syzkaller.appspot.com/bug?extid=82fe408cc2ae86b43c0e
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d311ef57b59a/disk-179ef7fe.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/25bf5d729f69/vmlinux-179ef7fe.xz
kernel image: https://storage.googleapis.com/syzbot-assets/db9b96571e69/bzImage-179ef7fe.xz

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

------------[ cut here ]------------
kernel BUG at fs/fat/inode.c:161!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 10568 Comm: syz-executor.2 Not tainted 4.14.300-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
task: ffff888090dee480 task.stack: ffff88808c530000
RIP: 0010:__fat_get_block fs/fat/inode.c:161 [inline]
RIP: 0010:fat_get_block+0x647/0x750 fs/fat/inode.c:176
RSP: 0018:ffff88808c5376d8 EFLAGS: 00010212
RAX: 0000000000040000 RBX: ffff88804b43f498 RCX: ffffc900081f7000
RDX: 0000000000000462 RSI: ffffffff81cffdc7 RDI: ffff88804b440ae8
RBP: ffff88804b440ba0 R08: ffff88808c537770 R09: 0000000000000000
R10: 0000000000000000 R11: ffff888090dee480 R12: ffff88808de68c00
R13: 0000000000000000 R14: 000000000000000b R15: 0000000000000001
FS: 00007f1d2616c700(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa6b14b1988 CR3: 00000000a1f3f000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__block_write_begin_int+0x35c/0x11d0 fs/buffer.c:2038
__block_write_begin fs/buffer.c:2088 [inline]
block_write_begin+0x58/0x270 fs/buffer.c:2147
cont_write_begin+0x4a3/0x740 fs/buffer.c:2497
fat_write_begin+0x89/0x170 fs/fat/inode.c:222
cont_expand_zero fs/buffer.c:2424 [inline]
cont_write_begin+0x296/0x740 fs/buffer.c:2487
fat_write_begin+0x89/0x170 fs/fat/inode.c:222
generic_cont_expand_simple+0xe1/0x130 fs/buffer.c:2388
fat_cont_expand+0x71/0x280 fs/fat/file.c:198
fat_setattr+0x8b8/0xbe0 fs/fat/file.c:477
notify_change+0x56b/0xd10 fs/attr.c:315
do_truncate+0xff/0x1a0 fs/open.c:63
vfs_truncate+0x456/0x680 fs/open.c:120
do_sys_truncate.part.0+0xdc/0xf0 fs/open.c:143
do_sys_truncate fs/open.c:137 [inline]
SYSC_truncate fs/open.c:155 [inline]
SyS_truncate+0x23/0x40 fs/open.c:153
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x5e/0xd3
Code: 17 af ff e9 bd fa ff ff 48 8b 7c 24 20 e8 f2 16 af ff e9 f4 fb ff ff 48 8b 7c 24 38 e8 f3 15 af ff e9 52 fe ff ff e8 f9 59 85 ff <0f> 0b e8 f2 59 85 ff 0f 0b e8 ab 17 af ff e9 b1 fa ff ff 48 8b
RIP: __fat_get_block fs/fat/inode.c:161 [inline] RSP: ffff88808c5376d8
RIP: fat_get_block+0x647/0x750 fs/fat/inode.c:176 RSP: ffff88808c5376d8
---[ end trace 11f23aee8ffb5034 ]---


---
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,
Nov 26, 2022, 1:33:37 AM11/26/22
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 179ef7fe8677 Linux 4.14.300
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=101a45c3880000
kernel config: https://syzkaller.appspot.com/x/.config?x=aa85f51ec321d5a9
dashboard link: https://syzkaller.appspot.com/bug?extid=82fe408cc2ae86b43c0e
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=108b8b55880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=169147ed880000
mounted in repro: https://storage.googleapis.com/syzbot-assets/2df006784a3d/mount_0.gz

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

------------[ cut here ]------------
kernel BUG at fs/fat/inode.c:161!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7987 Comm: syz-executor366 Not tainted 4.14.300-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
task: ffff8880a5ab6000 task.stack: ffff8880b3ff0000
RIP: 0010:__fat_get_block fs/fat/inode.c:161 [inline]
RIP: 0010:fat_get_block+0x647/0x750 fs/fat/inode.c:176
RSP: 0018:ffff8880b3ff76d8 EFLAGS: 00010297
RAX: ffff8880a5ab6000 RBX: ffff88808df1ae70 RCX: ffff8880b3ff7750
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88808df19ae8
RBP: ffff88808df19ba0 R08: ffff8880b3ff7770 R09: 0000000000000000
R10: 0000000000000000 R11: ffff8880a5ab6000 R12: ffff888095a9ccc0
R13: 0000000000000000 R14: 000000000000000b R15: 0000000000000001
FS: 0000555556497300(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f333ddc05a0 CR3: 000000009991e000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__block_write_begin_int+0x35c/0x11d0 fs/buffer.c:2038
__block_write_begin fs/buffer.c:2088 [inline]
block_write_begin+0x58/0x270 fs/buffer.c:2147
cont_write_begin+0x4a3/0x740 fs/buffer.c:2497
fat_write_begin+0x89/0x170 fs/fat/inode.c:222
cont_expand_zero fs/buffer.c:2424 [inline]
cont_write_begin+0x296/0x740 fs/buffer.c:2487
fat_write_begin+0x89/0x170 fs/fat/inode.c:222
generic_cont_expand_simple+0xe1/0x130 fs/buffer.c:2388
fat_cont_expand+0x71/0x280 fs/fat/file.c:198
fat_setattr+0x8b8/0xbe0 fs/fat/file.c:477
notify_change+0x56b/0xd10 fs/attr.c:315
do_truncate+0xff/0x1a0 fs/open.c:63
vfs_truncate+0x456/0x680 fs/open.c:120
do_sys_truncate.part.0+0xdc/0xf0 fs/open.c:143
do_sys_truncate fs/open.c:137 [inline]
SYSC_truncate fs/open.c:155 [inline]
SyS_truncate+0x23/0x40 fs/open.c:153
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x5e/0xd3
Code: 17 af ff e9 bd fa ff ff 48 8b 7c 24 20 e8 f2 16 af ff e9 f4 fb ff ff 48 8b 7c 24 38 e8 f3 15 af ff e9 52 fe ff ff e8 f9 59 85 ff <0f> 0b e8 f2 59 85 ff 0f 0b e8 ab 17 af ff e9 b1 fa ff ff 48 8b
RIP: __fat_get_block fs/fat/inode.c:161 [inline] RSP: ffff8880b3ff76d8
RIP: fat_get_block+0x647/0x750 fs/fat/inode.c:176 RSP: ffff8880b3ff76d8
---[ end trace fb004ccdcae2d1ee ]---

Reply all
Reply to author
Forward
0 new messages