loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in reiserfs_xattr_get+0xe6/0x570 fs/reiserfs/xattr.c:674 Read of size 8 at addr ffff88802a4ecb98 by task syz-executor.0/3423 CPU: 0 PID: 3423 Comm: syz-executor.0 Not tainted 6.3.0-rc4-syzkaller-00039-gffe78bbd5121 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x163/0x540 mm/kasan/report.c:430 kasan_report+0x176/0x1b0 mm/kasan/report.c:536 reiserfs_xattr_get+0xe6/0x570 fs/reiserfs/xattr.c:674 reiserfs_get_acl+0x7e/0x650 fs/reiserfs/xattr_acl.c:215 __get_acl+0x288/0x470 fs/posix_acl.c:160 check_acl+0x3a/0x150 fs/namei.c:307 acl_permission_check fs/namei.c:352 [inline] generic_permission+0x362/0x550 fs/namei.c:405 do_inode_permission fs/namei.c:459 [inline] inode_permission+0x233/0x460 fs/namei.c:526 may_open+0x2d6/0x440 fs/namei.c:3188 do_open fs/namei.c:3558 [inline] path_openat+0x2652/0x3170 fs/namei.c:3715 do_filp_open+0x234/0x490 fs/namei.c:3742 do_sys_openat2+0x13f/0x500 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1375 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0661c3e284 Code: 84 00 00 00 00 00 44 89 54 24 0c e8 96 f9 ff ff 44 8b 54 24 0c 44 89 e2 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 89 44 24 0c e8 c8 f9 ff ff 8b 44 RSP: 002b:00007f0662a89f10 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000005d49 RCX: 00007f0661c3e284 RDX: 0000000000010000 RSI: 0000000020000100 RDI: 00000000ffffff9c RBP: 0000000020000100 R08: 0000000000000000 R09: 0000000000004000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000010000 R13: 0000000020000100 R14: 00007f0662a89fe0 R15: 0000000020000580 Allocated by task 7970: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] smk_fetch+0x92/0x140 security/smack/smack_lsm.c:291 smack_d_instantiate+0x8d7/0xb40 security/smack/smack_lsm.c:3534 security_d_instantiate+0x9b/0xf0 security/security.c:2139 d_instantiate+0x55/0x90 fs/dcache.c:2034 shmem_mknod+0x17d/0x1c0 mm/shmem.c:2945 lookup_open fs/namei.c:3416 [inline] open_last_lookups fs/namei.c:3484 [inline] path_openat+0x13df/0x3170 fs/namei.c:3712 do_filp_open+0x234/0x490 fs/namei.c:3742 do_sys_openat2+0x13f/0x500 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1375 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 7970: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0x264/0x3c0 mm/slub.c:3800 smk_fetch+0x109/0x140 security/smack/smack_lsm.c:303 smack_d_instantiate+0x8d7/0xb40 security/smack/smack_lsm.c:3534 security_d_instantiate+0x9b/0xf0 security/security.c:2139 d_instantiate+0x55/0x90 fs/dcache.c:2034 shmem_mknod+0x17d/0x1c0 mm/shmem.c:2945 lookup_open fs/namei.c:3416 [inline] open_last_lookups fs/namei.c:3484 [inline] path_openat+0x13df/0x3170 fs/namei.c:3712 do_filp_open+0x234/0x490 fs/namei.c:3742 do_sys_openat2+0x13f/0x500 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1375 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88802a4eca00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 152 bytes to the right of allocated 256-byte region [ffff88802a4eca00, ffff88802a4ecb00) The buggy address belongs to the physical page: page:ffffea0000a93b00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2a4ec head:ffffea0000a93b00 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012441b40 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5161, tgid 5161 (udevd), ts 174999012183, free_ts 173844489700 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x3246/0x33c0 mm/page_alloc.c:4326 __alloc_pages+0x255/0x670 mm/page_alloc.c:5592 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x1b8/0x290 mm/slub.c:3491 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1061 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] smk_fetch+0x92/0x140 security/smack/smack_lsm.c:291 smack_d_instantiate+0x6d9/0xb40 security/smack/smack_lsm.c:3491 security_d_instantiate+0x9b/0xf0 security/security.c:2139 d_instantiate+0x55/0x90 fs/dcache.c:2034 shmem_mknod+0x17d/0x1c0 mm/shmem.c:2945 lookup_open fs/namei.c:3416 [inline] open_last_lookups fs/namei.c:3484 [inline] path_openat+0x13df/0x3170 fs/namei.c:3712 do_filp_open+0x234/0x490 fs/namei.c:3742 do_sys_openat2+0x13f/0x500 fs/open.c:1348 do_sys_open fs/open.c:1364 [inline] __do_sys_openat fs/open.c:1380 [inline] __se_sys_openat fs/open.c:1375 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1375 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1454 [inline] free_pcp_prepare mm/page_alloc.c:1504 [inline] free_unref_page_prepare+0xe2f/0xe70 mm/page_alloc.c:3388 free_unref_page+0x37/0x3f0 mm/page_alloc.c:3483 discard_slab mm/slub.c:2098 [inline] __unfreeze_partials+0x1b1/0x1f0 mm/slub.c:2637 put_cpu_partial+0x116/0x180 mm/slub.c:2713 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x23/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:769 slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x11f/0x2e0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [inline] __kernfs_iattrs+0x94/0x280 fs/kernfs/inode.c:37 kernfs_iattrs fs/kernfs/inode.c:60 [inline] __kernfs_setattr fs/kernfs/inode.c:73 [inline] kernfs_iop_setattr+0x125/0x410 fs/kernfs/inode.c:127 notify_change+0xc8b/0xf40 fs/attr.c:482 do_truncate+0x220/0x300 fs/open.c:66 handle_truncate fs/namei.c:3219 [inline] do_open fs/namei.c:3564 [inline] path_openat+0x294e/0x3170 fs/namei.c:3715 do_filp_open+0x234/0x490 fs/namei.c:3742 do_sys_openat2+0x13f/0x500 fs/open.c:1348 Memory state around the buggy address: ffff88802a4eca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802a4ecb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802a4ecb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802a4ecc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802a4ecc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================