syzbot


WARNING in wnd_init

Status: fixed on 2023/02/24 13:50
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+fa4648a5446460b7b963@syzkaller.appspotmail.com
Fix commit: 0d0f659bf713 fs/ntfs3: Use __GFP_NOWARN allocation at wnd_init() 019d22eb0eb7 fs/ntfs3: Validate attribute data and valid sizes
First crash: 604d, last: 520d
Cause bisection: introduced by (bisect log) :
commit fa3cacf544636b2dc48cfb2f277a2071f14d66a2
Author: Kari Argillander <kari.argillander@gmail.com>
Date: Thu Aug 26 08:56:29 2021 +0000

  fs/ntfs3: Use kernel ALIGN macros over driver specific

Crash: WARNING in wnd_init (log)
Repro: C syz .config
  
Discussions (6)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 6.1 01/28] fs/ntfs3: Validate BOOT record_size 29 (29) 2023/01/23 18:39
[PATCH AUTOSEL 5.15 01/22] fs/ntfs3: Validate BOOT record_size 22 (22) 2022/12/27 20:34
[PATCH AUTOSEL 6.0 01/27] fs/ntfs3: Validate BOOT record_size 27 (27) 2022/12/27 20:33
[PATCH v2] fs/ntfs3: Validate attribute data and valid sizes 2 (2) 2022/12/26 15:32
[PATCH] fs/ntfs3: Validate attribute data and valid sizes 2 (2) 2022/11/12 18:09
[syzbot] WARNING in wnd_init 1 (3) 2022/10/02 21:52
Last patch testing requests (2)
Created Duration User Patch Repo Result
2022/10/03 16:44 16m abdun.nihaal@gmail.com patch upstream OK log
2022/10/02 11:35 16m kari.argillander@gmail.com patch https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux master OK log

Sample crash report:
WARNING: The mand mount option has been deprecated and
         and is ignored by this kernel. Remove the mand
         option from the mount to silence this warning.
=======================================================
ntfs3: loop0: Different NTFS' sector size (4096) and media sector size (512)
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5075 at mm/page_alloc.c:5525 __alloc_pages+0x30a/0x560 mm/page_alloc.c:5525
Modules linked in:
CPU: 1 PID: 5075 Comm: syz-executor128 Not tainted 6.1.0-syzkaller-13031-g77856d911a8c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__alloc_pages+0x30a/0x560 mm/page_alloc.c:5525
Code: 5c 24 04 0f 85 f3 00 00 00 44 89 e1 81 e1 7f ff ff ff a9 00 00 04 00 41 0f 44 cc 41 89 cc e9 e3 00 00 00 c6 05 a4 5d ad 0c 01 <0f> 0b 83 fb 0a 0f 86 c8 fd ff ff 31 db 48 c7 44 24 20 0e 36 e0 45
RSP: 0018:ffffc900039df8c0 EFLAGS: 00010246
RAX: ffffc900039df920 RBX: 0000000000000019 RCX: 0000000000000000
RDX: 0000000000000028 RSI: 0000000000000000 RDI: ffffc900039df948
RBP: ffffc900039df9d8 R08: dffffc0000000000 R09: ffffc900039df920
R10: fffff5200073bf29 R11: 1ffff9200073bf24 R12: 0000000000040d40
R13: 1ffff9200073bf20 R14: dffffc0000000000 R15: 1ffff9200073bf1c
FS:  000055555670a300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f301c512a70 CR3: 00000000208b1000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __alloc_pages_node include/linux/gfp.h:237 [inline]
 alloc_pages_node include/linux/gfp.h:260 [inline]
 __kmalloc_large_node+0x95/0x1e0 mm/slab_common.c:1113
 __do_kmalloc_node mm/slab_common.c:956 [inline]
 __kmalloc+0xfe/0x190 mm/slab_common.c:981
 kmalloc_array include/linux/slab.h:636 [inline]
 kcalloc include/linux/slab.h:667 [inline]
 wnd_init+0x1db/0x310 fs/ntfs3/bitmap.c:664
 ntfs_fill_super+0x2974/0x4370 fs/ntfs3/super.c:1058
 get_tree_bdev+0x400/0x620 fs/super.c:1282
 vfs_get_tree+0x88/0x270 fs/super.c:1489
 do_new_mount+0x289/0xad0 fs/namespace.c:3145
 do_mount fs/namespace.c:3488 [inline]
 __do_sys_mount fs/namespace.c:3697 [inline]
 __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3674
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f3af0377ada
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:00007ffdfb8f8ef8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f3af0377ada
RDX: 000000002001f180 RSI: 0000000020000080 RDI: 00007ffdfb8f8f10
RBP: 00007ffdfb8f8f10 R08: 00007ffdfb8f8f50 R09: 000000000001f19b
R10: 000000000200404e R11: 0000000000000286 R12: 0000000000000004
R13: 000055555670a2c0 R14: 000000000200404e R15: 00007ffdfb8f8f50
 </TASK>

Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/18 01:23 upstream 77856d911a8c 05494336 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING in wnd_init
2022/12/12 13:56 upstream 830b3c68c1fb 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root WARNING in wnd_init
2022/11/26 17:56 upstream 644e9524388a f4470a7b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING in wnd_init
2022/10/01 16:23 upstream ffb4d94b4314 feb56351 .config strace log report syz C [disk image] [vmlinux] ci-upstream-kasan-gce-root WARNING in wnd_init
2022/09/29 06:37 upstream 49c13ed0316d a41a2080 .config strace log report syz C [disk image] [vmlinux] ci2-upstream-fs WARNING in wnd_init
2022/10/27 22:07 linux-next 4d48f589d294 86777b7f .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci-upstream-linux-next-kasan-gce-root WARNING in wnd_init
2022/12/18 05:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 05494336 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 WARNING in wnd_init
2022/11/27 07:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6d464646530f 74a66371 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 WARNING in wnd_init
2022/09/27 16:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 87840e00 .config console log report syz C [disk image] [vmlinux] ci-upstream-gce-arm64 WARNING in wnd_init
2022/12/20 07:08 upstream aeba12b26c79 c52b2efb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_init
2022/11/21 07:36 upstream eb7081409f94 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_init
2022/11/21 05:25 upstream eb7081409f94 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_init
2022/11/19 06:05 upstream ab290eaddc4c 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_init
2022/11/15 06:56 upstream e01d50cbd6ee 97de9cfc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_init
2022/11/11 11:36 upstream 4bbf3422df78 f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_init
2022/11/04 20:52 upstream ee6050c8af96 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_init
2022/11/03 19:18 upstream b229b6ca5abb 7a2ebf95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_init
2022/10/31 09:16 upstream b229b6ca5abb 2a71366b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_init
2022/10/17 14:01 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] ci2-upstream-fs WARNING in wnd_init
2022/10/16 15:26 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] ci2-upstream-fs WARNING in wnd_init
2022/10/15 13:39 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] ci2-upstream-fs WARNING in wnd_init
2022/10/13 08:54 upstream 493ffd6605b2 3f6b40a1 .config console log report info [disk image] [vmlinux] ci2-upstream-fs WARNING in wnd_init
2022/10/03 09:13 upstream a962b54e162c feb56351 .config console log report info [disk image] [vmlinux] ci2-upstream-fs WARNING in wnd_init
* Struck through repros no longer work on HEAD.