ci2 starts bisection 2023-06-19 03:49:16.442342032 +0000 UTC m=+281579.635138796 bisecting fixing commit since fa74641fb6b93a19ccb50579886ecc98320230f9 building syzkaller on 3bb7af1def6b7b99e4c1c9573162eb41b5893cd3 ensuring issue is reproducible on original commit fa74641fb6b93a19ccb50579886ecc98320230f9 testing commit fa74641fb6b93a19ccb50579886ecc98320230f9 gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 122e969549d86aa779a9ed8c7022cde4d719084dbe600caa6e67c3779e73eea4 all runs: crashed: UBSAN: array-index-out-of-bounds in dbAllocBits testing current HEAD ca87e77a2ef8b298aa9f69658d5898e72ee450fe testing commit ca87e77a2ef8b298aa9f69658d5898e72ee450fe gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 2033b89b0edef76dc1d3402d20bbadaf70d86d52539bec0933335f82a0b10fd6 all runs: crashed: UBSAN: array-index-out-of-bounds in dbAllocBits crash still not fixed/happens on the oldest tested release revisions tested: 2, total time: 58m32.950373114s (build: 51m21.75119499s, test: 6m21.489655797s) crash still not fixed on HEAD or HEAD had kernel test errors commit msg: Linux 6.1.34 crash: UBSAN: array-index-out-of-bounds in dbAllocBits loop0: detected capacity change from 0 to 32768 ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:2238:2 index 2000 is out of range for type 's64[128]' (aka 'long long[128]') CPU: 1 PID: 4700 Comm: syz-executor.0 Not tainted 6.1.34-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call trace: dump_backtrace+0x100/0x150 arch/arm64/kernel/stacktrace.c:158 show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x90/0xc8 lib/dump_stack.c:106 dump_stack+0x18/0x58 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0xf0/0x114 lib/ubsan.c:282 dbAllocBits+0x784/0x7ac fs/jfs/jfs_dmap.c:2238 dbAllocDmap fs/jfs/jfs_dmap.c:2015 [inline] dbAllocNear+0x1b0/0x2a0 fs/jfs/jfs_dmap.c:1244 dbAlloc+0x4e8/0x8ac fs/jfs/jfs_dmap.c:829 ea_get+0x5dc/0xd98 fs/jfs/xattr.c:514 __jfs_setxattr+0x16c/0xff0 fs/jfs/xattr.c:718 __jfs_set_acl+0xe0/0x14c fs/jfs/acl.c:87 jfs_set_acl+0x200/0x3e8 fs/jfs/acl.c:114 set_posix_acl fs/posix_acl.c:1160 [inline] posix_acl_xattr_set+0x1f8/0x2e8 fs/posix_acl.c:1189 __vfs_setxattr+0x2e4/0x2fc fs/xattr.c:182 __vfs_setxattr_noperm+0x134/0x478 fs/xattr.c:216 __vfs_setxattr_locked+0x168/0x18c fs/xattr.c:277 vfs_setxattr+0x174/0x2cc fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x1c0/0x1d4 fs/xattr.c:617 path_setxattr+0x14c/0x1f4 fs/xattr.c:636 __do_sys_lsetxattr fs/xattr.c:659 [inline] __se_sys_lsetxattr fs/xattr.c:655 [inline] __arm64_sys_lsetxattr+0xb8/0xd4 fs/xattr.c:655 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x7c/0x258 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x160/0x1e4 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x54/0x178 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 ================================================================================ ================================================================== BUG: KASAN: use-after-free in dbAllocBits+0x690/0x7ac fs/jfs/jfs_dmap.c:2238 Read of size 8 at addr ffff0000d3382eb8 by task syz-executor.0/4700 CPU: 1 PID: 4700 Comm: syz-executor.0 Not tainted 6.1.34-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call trace: dump_backtrace+0x100/0x150 arch/arm64/kernel/stacktrace.c:158 show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x90/0xc8 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:395 kasan_report+0xd4/0x130 mm/kasan/report.c:495 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351 dbAllocBits+0x690/0x7ac fs/jfs/jfs_dmap.c:2238 dbAllocDmap fs/jfs/jfs_dmap.c:2015 [inline] dbAllocNear+0x1b0/0x2a0 fs/jfs/jfs_dmap.c:1244 dbAlloc+0x4e8/0x8ac fs/jfs/jfs_dmap.c:829 ea_get+0x5dc/0xd98 fs/jfs/xattr.c:514 __jfs_setxattr+0x16c/0xff0 fs/jfs/xattr.c:718 __jfs_set_acl+0xe0/0x14c fs/jfs/acl.c:87 jfs_set_acl+0x200/0x3e8 fs/jfs/acl.c:114 set_posix_acl fs/posix_acl.c:1160 [inline] posix_acl_xattr_set+0x1f8/0x2e8 fs/posix_acl.c:1189 __vfs_setxattr+0x2e4/0x2fc fs/xattr.c:182 __vfs_setxattr_noperm+0x134/0x478 fs/xattr.c:216 __vfs_setxattr_locked+0x168/0x18c fs/xattr.c:277 vfs_setxattr+0x174/0x2cc fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x1c0/0x1d4 fs/xattr.c:617 path_setxattr+0x14c/0x1f4 fs/xattr.c:636 __do_sys_lsetxattr fs/xattr.c:659 [inline] __se_sys_lsetxattr fs/xattr.c:655 [inline] __arm64_sys_lsetxattr+0xb8/0xd4 fs/xattr.c:655 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x7c/0x258 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x160/0x1e4 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x54/0x178 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 Allocated by task 4443: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xd8/0x1c4 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] tomoyo_realpath_from_path+0xd4/0x414 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1dc/0x4a4 security/tomoyo/file.c:822 tomoyo_inode_getattr+0x1c/0x28 security/tomoyo/tomoyo.c:122 security_inode_getattr+0x98/0xfc security/security.c:1347 vfs_getattr fs/stat.c:158 [inline] vfs_statx+0x15c/0x3f8 fs/stat.c:233 vfs_fstatat fs/stat.c:267 [inline] __do_sys_newfstatat fs/stat.c:437 [inline] __se_sys_newfstatat fs/stat.c:431 [inline] __arm64_sys_newfstatat+0x130/0x1a4 fs/stat.c:431 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x7c/0x258 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x160/0x1e4 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x54/0x178 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 Freed by task 4443: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516 ____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0x2c0/0x4b4 mm/slub.c:3674 kfree+0xcc/0x1b8 mm/slab_common.c:1007 tomoyo_realpath_from_path+0x3d8/0x414 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1dc/0x4a4 security/tomoyo/file.c:822 tomoyo_inode_getattr+0x1c/0x28 security/tomoyo/tomoyo.c:122 security_inode_getattr+0x98/0xfc security/security.c:1347 vfs_getattr fs/stat.c:158 [inline] vfs_statx+0x15c/0x3f8 fs/stat.c:233 vfs_fstatat fs/stat.c:267 [inline] __do_sys_newfstatat fs/stat.c:437 [inline] __se_sys_newfstatat fs/stat.c:431 [inline] __arm64_sys_newfstatat+0x130/0x1a4 fs/stat.c:431 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x7c/0x258 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x160/0x1e4 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x54/0x178 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 The buggy address belongs to the object at ffff0000d3382000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3768 bytes inside of 4096-byte region [ffff0000d3382000, ffff0000d3383000) The buggy address belongs to the physical page: page:00000000cc25378e refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113380 head:00000000cc25378e order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc000344aa00 dead000000000002 ffff0000c0002a80 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d3382d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d3382e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d3382e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d3382f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d3382f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== JFS: metapage_get_blocks failed ERROR: (device loop0): release_metapage: write_one_page() failed ERROR: (device loop0): remounting filesystem as read-only