syzbot


KASAN: slab-out-of-bounds Read in ntfs_iget5

Status: upstream: reported C repro on 2022/04/22 13:07
Reported-by: syzbot+b4084c18420f9fad0b4f@syzkaller.appspotmail.com
First crash: 164d, last: 2h30m
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in udf_evict_inode (2) 13 241d 294d 22/24 fixed on 2022/03/08 16:11
upstream KMSAN: uninit-value in ext4_inode_journal_mode (2) 170 38d 269d 0/24 upstream: reported on 2022/01/07 15:40
upstream KMSAN: uninit-value in nf_nat_setup_info (2) C 764 189d 269d 0/24 auto-obsoleted due to no activity on 2022/09/28 07:28
upstream KASAN: use-after-free Read in ntfs_test_inode 80 2h34m 504d 0/24 upstream: reported on 2021/05/17 10:56
upstream KMSAN: uninit-value in native_apic_mem_write 2 665d 692d 0/24 auto-closed as invalid on 2021/03/07 18:48
Patch testing requests:
Created Duration User Patch Repo Result
2022/10/03 09:14 14m kari.argillander@gmail.com https://github.com/Paragon-Software-Group/linux-ntfs3.git master report log

Sample crash report:
ntfs3: loop0: Different NTFS' sector size (1024) and media sector size (512)
ntfs3: loop0: Mark volume as dirty due to NTFS errors
==================================================================
BUG: KASAN: use-after-free in memcmp+0x16f/0x1c0 lib/string.c:757
Read of size 8 at addr ffff8880212a5740 by task syz-executor411/3605

CPU: 0 PID: 3605 Comm: syz-executor411 Not tainted 6.0.0-rc7-syzkaller-00029-g3800a713b607 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/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+0x2ba/0x719 mm/kasan/report.c:433
 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495
 memcmp+0x16f/0x1c0 lib/string.c:757
 memcmp include/linux/fortify-string.h:420 [inline]
 ntfs_read_mft fs/ntfs3/inode.c:253 [inline]
 ntfs_iget5+0x188e/0x3280 fs/ntfs3/inode.c:501
 ntfs_fill_super+0x31c3/0x37f0 fs/ntfs3/super.c:1262
 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:0x7fac965fa83a
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:00007fffdbf6d838 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fffdbf6d890 RCX: 00007fac965fa83a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fffdbf6d850
RBP: 00007fffdbf6d850 R08: 00007fffdbf6d890 R09: 00007fffdbf6d8c0
R10: 0000000000000000 R11: 0000000000000286 R12: 0000000020001b80
R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000110
 </TASK>

Allocated by task 3232:
 kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:437 [inline]
 __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:470
 kasan_slab_alloc include/linux/kasan.h:224 [inline]
 slab_post_alloc_hook mm/slab.h:727 [inline]
 slab_alloc_node mm/slub.c:3248 [inline]
 slab_alloc mm/slub.c:3256 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3263 [inline]
 kmem_cache_alloc+0x267/0x3b0 mm/slub.c:3273
 getname_flags.part.0+0x50/0x4f0 fs/namei.c:139
 getname_flags include/linux/audit.h:320 [inline]
 getname+0x8e/0xd0 fs/namei.c:218
 do_sys_openat2+0xf5/0x4c0 fs/open.c:1307
 do_sys_open fs/open.c:1329 [inline]
 __do_sys_openat fs/open.c:1345 [inline]
 __se_sys_openat fs/open.c:1340 [inline]
 __x64_sys_openat+0x13f/0x1f0 fs/open.c:1340
 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

The buggy address belongs to the object at ffff8880212a5500
 which belongs to the cache names_cache of size 4096
The buggy address is located 576 bytes inside of
 4096-byte region [ffff8880212a5500, ffff8880212a6500)

The buggy address belongs to the physical page:
page:ffffea000084a800 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880212a0000 pfn:0x212a0
head:ffffea000084a800 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0001dc6008 ffffea0001dc1c08 ffff8880119db500
raw: ffff8880212a0000 0000000000070001 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1541, tgid 1541 (kworker/u4:2), ts 7032143999, free_ts 0
 prep_new_page mm/page_alloc.c:2532 [inline]
 get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283
 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549
 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270
 alloc_slab_page mm/slub.c:1829 [inline]
 allocate_slab+0x27e/0x3d0 mm/slub.c:1974
 new_slab mm/slub.c:2034 [inline]
 ___slab_alloc+0x7f1/0xe10 mm/slub.c:3036
 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3123
 slab_alloc_node mm/slub.c:3214 [inline]
 slab_alloc mm/slub.c:3256 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3263 [inline]
 kmem_cache_alloc+0x38c/0x3b0 mm/slub.c:3273
 getname_kernel+0x4e/0x370 fs/namei.c:227
 kernel_execve+0x7a/0x500 fs/exec.c:1963
 call_usermodehelper_exec_async+0x2e3/0x580 kernel/umh.c:112
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
page_owner free stack trace missing

Memory state around the buggy address:
 ffff8880212a5600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880212a5680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880212a5700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                           ^
 ffff8880212a5780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880212a5800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (947):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/09/27 06:54 upstream 3800a713b607 10323ddf .config log report syz C KASAN: use-after-free Read in ntfs_iget5
ci-upstream-gce-arm64 2022/09/14 17:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a6b443748715 b884348d .config log report syz C BUG: unable to handle kernel paging request in ntfs_iget5
ci2-upstream-fs 2022/10/01 13:26 upstream ffb4d94b4314 feb56351 .config log report info KASAN: slab-out-of-bounds Read in ntfs_iget5
ci-upstream-kasan-gce-root 2022/04/22 12:17 upstream d569e86915b7 2738b391 .config log report info KASAN: slab-out-of-bounds Read in ntfs_iget5
ci-upstream-kasan-gce-smack-root 2022/10/03 14:26 upstream 4fe89d07dcc2 feb56351 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci2-upstream-fs 2022/10/03 13:02 upstream a962b54e162c feb56351 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci2-upstream-fs 2022/10/03 11:06 upstream a962b54e162c feb56351 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci2-upstream-fs 2022/10/03 02:35 upstream a962b54e162c feb56351 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci2-upstream-fs 2022/10/02 06:15 upstream ffb4d94b4314 feb56351 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci-upstream-kasan-gce-smack-root 2022/10/02 02:54 upstream b357fd1c2afc feb56351 .config log report info general protection fault in ntfs_iget5
ci2-upstream-fs 2022/09/30 13:50 upstream 987a926c1d8a 45fd7169 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci-upstream-kasan-gce-root 2022/09/30 01:19 upstream 987a926c1d8a 1d385642 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci2-upstream-fs 2022/09/29 20:25 upstream c3e0e1e23c70 45fd7169 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci-upstream-kasan-gce-selinux-root 2022/09/29 19:09 upstream 511cce163b75 1d385642 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci2-upstream-fs 2022/09/28 19:34 upstream 49c13ed0316d a41a2080 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci-qemu-upstream-386 2022/06/13 23:17 upstream b13baccc3850 0f087040 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci-upstream-linux-next-kasan-gce-root 2022/09/25 04:41 linux-next aaa11ce2ffc8 0042f2b4 .config log report info KASAN: use-after-free Read in ntfs_iget5
ci-upstream-kmsan-gce 2022/05/24 08:23 https://github.com/google/kmsan.git master c5c93da9af13 e7f9308d .config log report info KMSAN: uninit-value in native_apic_mem_write
ci-upstream-gce-arm64 2022/10/03 19:04 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/10/03 17:53 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/10/03 15:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-gce-arm64 2022/10/03 06:40 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel NULL pointer dereference in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/10/03 04:35 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/10/02 16:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-gce-arm64 2022/10/02 13:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/10/02 11:26 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/10/02 08:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel NULL pointer dereference in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/10/02 04:57 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/10/02 01:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel NULL pointer dereference in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/10/01 22:58 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/10/01 17:57 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/10/01 15:45 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-gce-arm64 2022/10/01 09:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-gce-arm64 2022/10/01 05:27 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/10/01 01:35 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/10/01 00:18 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/30 20:18 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/30 18:48 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/09/30 17:47 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 feb56351 .config log report info BUG: unable to handle kernel NULL pointer dereference in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/09/30 16:04 https://github.com/google/kmsan.git master 968c2729e576 feb56351 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/09/30 14:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5911b92626df feb56351 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/09/30 12:23 https://github.com/google/kmsan.git master 968c2729e576 1d385642 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/30 10:45 https://github.com/google/kmsan.git master 968c2729e576 1d385642 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/09/30 09:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5911b92626df 1d385642 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/09/30 08:36 https://github.com/google/kmsan.git master 968c2729e576 1d385642 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/30 04:27 https://github.com/google/kmsan.git master 968c2729e576 1d385642 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/09/29 19:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5911b92626df 1d385642 .config log report info BUG: unable to handle kernel NULL pointer dereference in ntfs_iget5
ci-upstream-gce-arm64 2022/09/29 17:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 1d385642 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/09/29 16:30 https://github.com/google/kmsan.git master 968c2729e576 1d385642 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/29 15:28 https://github.com/google/kmsan.git master 968c2729e576 1d385642 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/29 13:04 https://github.com/google/kmsan.git master 968c2729e576 1d385642 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/29 11:47 https://github.com/google/kmsan.git master 968c2729e576 1d385642 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/09/29 10:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 1d385642 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/09/29 08:47 https://github.com/google/kmsan.git master 968c2729e576 e2556bc3 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/29 05:50 https://github.com/google/kmsan.git master 968c2729e576 e2556bc3 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-gce-arm64 2022/09/29 05:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c194837ebb57 e2556bc3 .config log report info BUG: unable to handle kernel paging request in ntfs_iget5
ci-upstream-kmsan-gce-386 2022/09/29 02:56 https://github.com/google/kmsan.git master 879600fbb6d3 e2556bc3 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/29 01:15 https://github.com/google/kmsan.git master 879600fbb6d3 e2556bc3 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/28 23:55 https://github.com/google/kmsan.git master 879600fbb6d3 e2556bc3 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/09/28 22:35 https://github.com/google/kmsan.git master 879600fbb6d3 e2556bc3 .config log report info KMSAN: uninit-value in ext4_evict_inode
ci-upstream-kmsan-gce-386 2022/05/13 15:02 https://github.com/google/kmsan.git master d6e2c8c7eb40 107f6434 .config log report info KMSAN: uninit-value in ntfs_iget5
* Struck through repros no longer work on HEAD.