syzbot


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

Status: upstream: reported C repro on 2022/09/25 15:20
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+9924e2a08d9ba0fd4ce2@syzkaller.appspotmail.com
First crash: 441d, last: 3d13h
Cause bisection: failed (error log, bisect log)
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] jfs: fix slab-out-of-bounds Read in dtSearch 3 (3) 2023/10/24 12:00
[syzbot] KASAN: slab-out-of-bounds Read in dtSearch 0 (1) 2022/09/25 15:20
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: slab-out-of-bounds Read in dtSearch jfs C 2 283d 442d 0/1 upstream: reported C repro on 2022/09/24 21:35
linux-4.19 KASAN: slab-out-of-bounds Read in dtSearch C error 1 442d 442d 0/1 upstream: reported C repro on 2022/09/24 21:36
Last patch testing requests (13)
Created Duration User Patch Repo Result
2023/11/15 04:27 14m retest repro upstream report log
2023/11/15 04:27 11m retest repro upstream report log
2023/10/30 09:35 25m retest repro upstream report log
2023/10/30 09:35 27m retest repro upstream report log
2023/10/30 09:35 22m retest repro upstream report log
2023/10/25 05:19 22m ghandatmanas@gmail.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2023/10/16 16:31 39m ghandatmanas@gmail.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2023/10/16 15:26 32m ghandatmanas@gmail.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
2023/10/04 21:57 14m retest repro upstream report log
2023/09/20 06:19 22m retest repro linux-next report log
2023/09/20 06:19 17m retest repro linux-next report log
2023/09/06 03:46 13m retest repro upstream report log
2023/09/06 03:46 22m retest repro upstream report log
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2023/06/19 04:50 37m bisect fix upstream job log (0) log
2023/05/19 06:35 25m bisect fix upstream job log (0) log
2023/04/19 01:53 25m bisect fix upstream job log (0) log

Sample crash report:
loop0: detected capacity change from 0 to 14901
==================================================================
BUG: KASAN: slab-out-of-bounds in ciCompare fs/jfs/jfs_dtree.c:3393 [inline]
BUG: KASAN: slab-out-of-bounds in dtSearch+0x1d8c/0x2000 fs/jfs/jfs_dtree.c:639
Read of size 1 at addr ffff888076a2f9f4 by task syz-executor202/5092

CPU: 1 PID: 5092 Comm: syz-executor202 Not tainted 6.2.0-syzkaller-02299-g4a7d37e824f5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:306 [inline]
 print_report+0x15e/0x45d mm/kasan/report.c:417
 kasan_report+0xbf/0x200 mm/kasan/report.c:517
 ciCompare fs/jfs/jfs_dtree.c:3393 [inline]
 dtSearch+0x1d8c/0x2000 fs/jfs/jfs_dtree.c:639
 jfs_lookup+0x180/0x2f0 fs/jfs/namei.c:1454
 lookup_open.isra.0+0x944/0x1400 fs/namei.c:3394
 open_last_lookups fs/namei.c:3484 [inline]
 path_openat+0x975/0x2750 fs/namei.c:3712
 do_filp_open+0x1ba/0x410 fs/namei.c:3742
 do_sys_openat2+0x16d/0x4c0 fs/open.c:1312
 do_sys_open fs/open.c:1328 [inline]
 __do_sys_open fs/open.c:1336 [inline]
 __se_sys_open fs/open.c:1332 [inline]
 __x64_sys_open+0x11d/0x1c0 fs/open.c:1332
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f31b2b1c9d9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffeea427138 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 000000000000b123 RCX: 00007f31b2b1c9d9
RDX: 0000000000000000 RSI: 000000000014da42 RDI: 00000000200000c0
RBP: 0000000000000000 R08: 000000000000234a R09: 00007ffeea427160
R10: 00007ffeea427000 R11: 0000000000000246 R12: 00007ffeea42715c
R13: 00007ffeea427190 R14: 00007ffeea427170 R15: 000000000000000f
 </TASK>

The buggy address belongs to the object at ffff888076a2ee58
 which belongs to the cache ext4_inode_cache of size 2440
The buggy address is located 532 bytes to the right of
 2440-byte region [ffff888076a2ee58, ffff888076a2f7e0)

The buggy address belongs to the physical page:
page:ffffea0001da8a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x76a28
head:ffffea0001da8a00 order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffff8881452313c0 dead000000000122 0000000000000000
raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 5092, tgid 5092 (syz-executor202), ts 46170212699, free_ts 9680871349
 prep_new_page mm/page_alloc.c:2531 [inline]
 get_page_from_freelist+0x119c/0x2d00 mm/page_alloc.c:4283
 __alloc_pages+0x1cb/0x5c0 mm/page_alloc.c:5549
 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2287
 alloc_slab_page mm/slub.c:1851 [inline]
 allocate_slab+0x25f/0x350 mm/slub.c:1998
 new_slab mm/slub.c:2051 [inline]
 ___slab_alloc+0xa91/0x1400 mm/slub.c:3193
 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292
 __slab_alloc_node mm/slub.c:3345 [inline]
 slab_alloc_node mm/slub.c:3442 [inline]
 slab_alloc mm/slub.c:3460 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3467 [inline]
 kmem_cache_alloc_lru+0x436/0x580 mm/slub.c:3483
 alloc_inode_sb include/linux/fs.h:2684 [inline]
 ext4_alloc_inode+0x28/0x680 fs/ext4/super.c:1321
 alloc_inode+0x61/0x230 fs/inode.c:260
 new_inode_pseudo fs/inode.c:1019 [inline]
 new_inode+0x2b/0x280 fs/inode.c:1047
 __ext4_new_inode+0x38c/0x5890 fs/ext4/ialloc.c:959
 ext4_symlink+0x5ac/0xa00 fs/ext4/namei.c:3373
 vfs_symlink fs/namei.c:4398 [inline]
 vfs_symlink+0x10c/0x2c0 fs/namei.c:4382
 do_symlinkat+0x262/0x2e0 fs/namei.c:4424
 __do_sys_symlink fs/namei.c:4445 [inline]
 __se_sys_symlink fs/namei.c:4443 [inline]
 __x64_sys_symlink+0x79/0x90 fs/namei.c:4443
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1446 [inline]
 free_pcp_prepare+0x66a/0xc30 mm/page_alloc.c:1496
 free_unref_page_prepare mm/page_alloc.c:3369 [inline]
 free_unref_page+0x1d/0x490 mm/page_alloc.c:3464
 free_contig_range+0xb5/0x180 mm/page_alloc.c:9488
 destroy_args+0xa8/0x64c mm/debug_vm_pgtable.c:998
 debug_vm_pgtable+0x28de/0x296f mm/debug_vm_pgtable.c:1318
 do_one_initcall+0x141/0x7d0 init/main.c:1306
 do_initcall_level init/main.c:1379 [inline]
 do_initcalls init/main.c:1395 [inline]
 do_basic_setup init/main.c:1414 [inline]
 kernel_init_freeable+0x6f9/0x782 init/main.c:1634
 kernel_init+0x1e/0x1d0 init/main.c:1522
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

Memory state around the buggy address:
 ffff888076a2f880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888076a2f900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888076a2f980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                             ^
 ffff888076a2fa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888076a2fa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (32):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/22 10:22 upstream 4a7d37e824f5 42a4d508 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root KASAN: slab-out-of-bounds Read in dtSearch
2022/09/25 08:46 upstream 1a61b828566f 0042f2b4 .config strace log report syz C [disk image] [vmlinux] ci-upstream-kasan-gce-root KASAN: slab-out-of-bounds Read in dtSearch
2023/03/20 01:41 linux-next 6f08c1de13a9 7939252e .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in dtSearch
2022/10/24 07:22 linux-next 4d48f589d294 23bf86af .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in dtSearch
2023/12/07 08:41 upstream bee0e7762ad2 e3299f55 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2023/12/07 03:11 upstream bee0e7762ad2 e3299f55 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in dtSearch
2023/08/23 03:41 upstream 53663f4103ff b81ca3f6 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root UBSAN: array-index-out-of-bounds in dtSearch
2023/06/23 18:34 upstream 8a28a0b6f1a1 09ffe269 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in dtSearch
2023/01/01 06:51 upstream c8451c141e07 ab32d508 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/09/25 09:32 upstream 3db61221f4e8 0042f2b4 .config strace log report syz C ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2023/01/29 16:11 upstream c96618275234 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-out-of-bounds Read in dtSearch
2023/12/07 02:45 upstream bee0e7762ad2 e3299f55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in dtSearch
2023/10/16 07:16 upstream 58720809f527 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root UBSAN: array-index-out-of-bounds in dtSearch
2023/11/24 11:42 upstream f1a09972a45a 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in dtSearch
2023/01/29 16:21 upstream c96618275234 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2023/01/29 16:12 upstream c96618275234 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root UBSAN: array-index-out-of-bounds in dtSearch
2022/11/18 16:31 upstream 84368d882b96 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/11/13 03:37 upstream fef7fd48922d f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/10/28 09:20 upstream b229b6ca5abb 5c716ff6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/10/28 00:28 upstream b229b6ca5abb 5c716ff6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/10/26 04:30 upstream 1a2dcbdde82e 2159e4d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/10/24 23:02 upstream 247f34f7b803 faae2fda .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/10/23 05:40 upstream 4da34b7d175d c0b80a55 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/10/20 13:01 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: use-after-free Read in dtSearch
2022/10/20 09:20 upstream 493ffd6605b2 b31320fc .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/10/17 19:27 upstream 493ffd6605b2 94744d21 .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/10/15 05:48 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] ci2-upstream-fs UBSAN: array-index-out-of-bounds in dtSearch
2022/10/15 02:16 upstream 493ffd6605b2 67cb024c .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: use-after-free Read in dtSearch
2022/10/03 10:44 upstream a962b54e162c feb56351 .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: use-after-free Read in dtSearch
2023/07/22 16:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci e40939bbfc68 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 UBSAN: array-index-out-of-bounds in dtSearch
2022/12/30 19:32 https://github.com/google/kmsan.git master 5c6259d6d19f 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in dtSearch
2022/12/28 02:38 https://github.com/google/kmsan.git master 5c6259d6d19f 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in dtSearch
* Struck through repros no longer work on HEAD.