syzbot


KASAN: vmalloc-out-of-bounds Write in find_lock_entries

Status: upstream: reported C repro on 2022/08/17 23:02
Reported-by: syzbot+e498ebacfd2fd78cf7b2@syzkaller.appspotmail.com
First crash: 47d, last: 21h57m

Cause bisection: introduced by (bisect log) :
commit 39ad84e911c5c0e1593f3652325d279692817188
Author: Ming Qian <ming.qian@nxp.com>
Date: Wed Apr 27 09:25:58 2022 +0000

  media: imx-jpeg: Don't fill the description field in struct v4l2_fmtdesc

Crash: kernel panic: stack is corrupted in __lock_acquire (log)
Repro: C syz .config

Sample crash report:
loop0: detected capacity change from 0 to 4096
ntfs3: loop0: Different NTFS' sector size (1024) and media sector size (512)
==================================================================
BUG: KASAN: vmalloc-out-of-bounds in find_lock_entries+0xb75/0xc50 mm/filemap.c:2114
Write of size 8 at addr ffffc90004a50160 by task syz-executor408/4895

CPU: 1 PID: 4895 Comm: syz-executor408 Not tainted 6.0.0-rc7-syzkaller-00081-gc3e0e1e23c70 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:317 [inline]
 print_report.cold+0x59/0x719 mm/kasan/report.c:433
 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495
 find_lock_entries+0xb75/0xc50 mm/filemap.c:2114
 truncate_inode_pages_range+0x185/0x1510 mm/truncate.c:364
 ntfs_evict_inode+0x16/0xa0 fs/ntfs3/inode.c:1741
 evict+0x2ed/0x6b0 fs/inode.c:665
 iput_final fs/inode.c:1748 [inline]
 iput.part.0+0x55d/0x810 fs/inode.c:1774
 iput+0x58/0x70 fs/inode.c:1764
 ntfs_fill_super+0x2e89/0x37f0 fs/ntfs3/super.c:1190
 get_tree_bdev+0x440/0x760 fs/super.c:1323
 vfs_get_tree+0x89/0x2f0 fs/super.c:1530
 do_new_mount fs/namespace.c:3040 [inline]
 path_mount+0x1326/0x1e20 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount fs/namespace.c:3568 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568
 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+0x63/0xcd
RIP: 0033:0x7fb2c57d89aa
Code: 48 c7 c2 c0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 a8 00 00 00 0f 1f 84 00 00 00 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:00007ffdbb712628 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fb2c57d89aa
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffdbb712640
RBP: 00007ffdbb712640 R08: 00007ffdbb712680 R09: 00005555557132c0
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000000000004
R13: 00007ffdbb712680 R14: 0000000000000110 R15: 0000000020001b80
 </TASK>

The buggy address belongs to the virtual mapping at
 [ffffc90004a48000, ffffc90004a51000) created by:
 kernel_clone+0xe7/0xab0 kernel/fork.c:2671

Memory state around the buggy address:
 ffffc90004a50000: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc90004a50080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc90004a50100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
                                                       ^
 ffffc90004a50180: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
 ffffc90004a50200: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
==================================================================

Crashes (41):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/09/29 15:16 upstream c3e0e1e23c70 1d385642 .config log report syz C KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/28 23:48 upstream 49c13ed0316d e2556bc3 .config log report syz C KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/09/28 08:04 upstream 46452d3786a8 75c78242 .config log report syz C KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/26 18:18 upstream f76349cf4145 d59ba983 .config log report syz C KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/26 13:11 upstream f76349cf4145 d59ba983 .config log report syz C KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/25 19:59 upstream 105a36f3694e 0042f2b4 .config log report syz C KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-linux-next-kasan-gce-root 2022/08/15 22:56 linux-next 6c8f479764eb 8dfcaa3d .config log report syz C KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/13 16:35 upstream e839a756012b a08652b0 .config log report syz KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-linux-next-kasan-gce-root 2022/08/13 22:59 linux-next 6c8f479764eb 8dfcaa3d .config log report syz KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/29 15:07 upstream c3e0e1e23c70 1d385642 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/09/27 12:01 upstream a1375562c0a8 87840e00 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/27 07:16 upstream 3800a713b607 10323ddf .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/27 07:10 upstream 3800a713b607 10323ddf .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-qemu-upstream 2022/09/26 21:26 upstream f76349cf4145 10323ddf .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/09/26 00:46 upstream 105a36f3694e 0042f2b4 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/25 19:12 upstream 105a36f3694e 0042f2b4 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/09/25 18:47 upstream 105a36f3694e 0042f2b4 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/25 13:18 upstream 105a36f3694e 0042f2b4 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/09/23 08:35 upstream bf682942cd26 0042f2b4 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/21 06:27 upstream 60891ec99e14 c4b8ccfd .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/18 10:23 upstream a335366bad13 dd9a85ff .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/09/18 04:46 upstream a335366bad13 dd9a85ff .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-qemu-upstream 2022/09/16 23:14 upstream 6879c2d3b960 dd9a85ff .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/09/16 22:20 upstream 6879c2d3b960 dd9a85ff .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/16 21:00 upstream 6879c2d3b960 dd9a85ff .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/09/15 13:58 upstream 3245cb65fd91 dd9a85ff .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/14 19:48 upstream 3245cb65fd91 b884348d .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/14 13:41 upstream 3245cb65fd91 b884348d .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/11 21:39 upstream 4ed9c1e971b1 356d8217 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/09/10 03:06 upstream 9b4509495418 356d8217 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/06 08:03 upstream 53e99dcff61e 9dcd38fc .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/09/04 22:44 upstream 7e18e42e4b28 28811d0a .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/08/24 16:16 upstream c40e8341e3b3 514514f6 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/08/23 09:17 upstream 072e51356cd5 26a13b38 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-selinux-root 2022/08/17 21:40 upstream 7ebfc85e2cd7 4e72d229 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-kasan-gce-root 2022/08/17 04:07 upstream 7ebfc85e2cd7 4e72d229 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-qemu-upstream-386 2022/09/05 06:59 upstream 7e18e42e4b28 28811d0a .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-qemu-upstream-386 2022/08/18 07:42 upstream 3b06a2755758 d58e263f .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-linux-next-kasan-gce-root 2022/09/20 00:46 linux-next e47eb90a0a9a dd9a85ff .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-linux-next-kasan-gce-root 2022/08/31 11:59 linux-next 7fd22855300e 51e54e30 .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
ci-upstream-linux-next-kasan-gce-root 2022/08/15 13:28 linux-next 6c8f479764eb 8dfcaa3d .config log report info KASAN: vmalloc-out-of-bounds Write in find_lock_entries
* Struck through repros no longer work on HEAD.