loop3: 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 ffff88802342cf98 by task syz-executor.3/5654 CPU: 0 PID: 5654 Comm: syz-executor.3 Not tainted 6.2.0-rc7-syzkaller-00091-g35674e787518 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/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:306 [inline] print_report+0x163/0x4f0 mm/kasan/report.c:417 kasan_report+0x13a/0x170 mm/kasan/report.c:517 reiserfs_xattr_get+0xe6/0x570 fs/reiserfs/xattr.c:674 reiserfs_get_acl+0x7e/0x650 fs/reiserfs/xattr_acl.c:215 __get_acl+0x233/0x320 fs/posix_acl.c:159 check_acl+0x3a/0x150 fs/namei.c:306 acl_permission_check fs/namei.c:351 [inline] generic_permission+0x3aa/0x510 fs/namei.c:404 do_inode_permission fs/namei.c:458 [inline] inode_permission+0x233/0x460 fs/namei.c:525 may_open+0x2d6/0x440 fs/namei.c:3185 do_open fs/namei.c:3555 [inline] path_openat+0x24a5/0x2e40 fs/namei.c:3714 do_filp_open+0x234/0x490 fs/namei.c:3741 do_sys_openat2+0x13f/0x500 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1337 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:0x7f245503e284 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:00007f2455ec3f10 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000005f70 RCX: 00007f245503e284 RDX: 0000000000010000 RSI: 0000000020000080 RDI: 00000000ffffff9c RBP: 0000000020000080 R08: 0000000000000000 R09: 0000000001008403 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000010000 R13: 0000000020000080 R14: 00007f2455ec3fe0 R15: 0000000020000140 Allocated by task 1: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x80 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x9b/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc_node+0xb3/0x190 mm/slab_common.c:975 kmalloc_node include/linux/slab.h:610 [inline] kvmalloc_node+0x72/0x180 mm/util.c:581 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] v4l2_ctrl_new+0x86d/0x1840 drivers/media/v4l2-core/v4l2-ctrls-core.c:1664 v4l2_ctrl_new_custom+0x6fe/0xa10 drivers/media/v4l2-core/v4l2-ctrls-core.c:1774 vimc_sensor_add+0xb0/0x430 drivers/media/test-drivers/vimc/vimc-sensor.c:396 vimc_add_subdevs drivers/media/test-drivers/vimc/vimc-core.c:251 [inline] vimc_register_devices drivers/media/test-drivers/vimc/vimc-core.c:298 [inline] vimc_probe+0x3c6/0x14f0 drivers/media/test-drivers/vimc/vimc-core.c:374 platform_probe+0x135/0x1b0 drivers/base/platform.c:1400 really_probe+0x2ab/0xcd0 drivers/base/dd.c:639 __driver_probe_device+0x1c3/0x3f0 drivers/base/dd.c:778 driver_probe_device+0x50/0x420 drivers/base/dd.c:808 __driver_attach+0x45c/0x710 drivers/base/dd.c:1194 bus_for_each_dev+0x180/0x1f0 drivers/base/bus.c:301 bus_add_driver+0x338/0x600 drivers/base/bus.c:618 driver_register+0x2c3/0x3a0 drivers/base/driver.c:246 vimc_init+0x36/0xa0 drivers/media/test-drivers/vimc/vimc-core.c:432 do_one_initcall+0x2c3/0xa60 init/main.c:1306 do_initcall_level+0x157/0x210 init/main.c:1379 do_initcalls+0x3f/0x80 init/main.c:1395 kernel_init_freeable+0x477/0x630 init/main.c:1634 kernel_init+0x1d/0x2a0 init/main.c:1522 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff88802342ce00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 152 bytes to the right of 256-byte region [ffff88802342ce00, ffff88802342cf00) The buggy address belongs to the physical page: page:ffffea00008d0b00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2342c head:ffffea00008d0b00 order:1 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012441b40 ffffea0001db0a80 dead000000000005 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 24, tgid 24 (kdevtmpfs), ts 12511739782, free_ts 0 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x3449/0x35c0 mm/page_alloc.c:4283 __alloc_pages+0x291/0x7e0 mm/page_alloc.c:5549 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/0x2a0 mm/slub.c:3491 kmalloc_trace+0x2a/0x60 mm/slab_common.c:1062 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+0x5ad/0xa20 security/smack/smack_lsm.c:3491 security_d_instantiate+0x9b/0xf0 security/security.c:2138 d_instantiate+0x55/0x90 fs/dcache.c:2034 shmem_mknod+0x177/0x1c0 mm/shmem.c:2937 vfs_mknod+0x448/0x4e0 fs/namei.c:3915 handle_create drivers/base/devtmpfs.c:226 [inline] handle drivers/base/devtmpfs.c:391 [inline] devtmpfs_work_loop+0x963/0x1040 drivers/base/devtmpfs.c:406 devtmpfsd+0x48/0x50 drivers/base/devtmpfs.c:448 kthread+0x270/0x300 kernel/kthread.c:376 page_owner free stack trace missing Memory state around the buggy address: ffff88802342ce80: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ffff88802342cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802342cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802342d000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802342d080: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ==================================================================