loop4: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-out-of-bounds in reiserfs_xattr_get+0xe6/0x570 fs/reiserfs/xattr.c:674 Read of size 8 at addr ffff888021d53d98 by task syz-executor.4/21433 CPU: 0 PID: 21433 Comm: syz-executor.4 Not tainted 6.3.0-rc5-syzkaller-00005-g148341f0a2f5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/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:0x7f8b1623e2f4 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:00007f8b16f1cf10 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00000000000005e0 RCX: 00007f8b1623e2f4 RDX: 0000000000010000 RSI: 00000000200000c0 RDI: 00000000ffffff9c RBP: 00000000200000c0 R08: 0000000000000000 R09: 0000000000010000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000010000 R13: 00000000200000c0 R14: 00007f8b16f1cfe0 R15: 00000000200002c0 Allocated by task 21433: 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] hfsplus_fill_super+0x138/0x1c90 fs/hfsplus/super.c:387 mount_bdev+0x271/0x3a0 fs/super.c:1380 legacy_get_tree+0xef/0x190 fs/fs_context.c:610 vfs_get_tree+0x8c/0x270 fs/super.c:1510 do_new_mount+0x28f/0xae0 fs/namespace.c:3042 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3571 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 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:491 __call_rcu_common kernel/rcu/tree.c:2622 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:2736 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2390 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Second to last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:491 kvfree_call_rcu+0x109/0x8d0 kernel/rcu/tree.c:3316 neigh_periodic_work+0x3c9/0xcb0 net/core/neighbour.c:1025 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2390 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff888021d53800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 704 bytes to the right of allocated 728-byte region [ffff888021d53800, ffff888021d53ad8) The buggy address belongs to the physical page: page:ffffea0000875400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21d50 head:ffffea0000875400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012441dc0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000080100010 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 5109, tgid 5109 (syz-executor.3), ts 188979375604, free_ts 188880705315 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 __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc_node+0xa7/0x230 mm/slab_common.c:974 kmalloc_node include/linux/slab.h:610 [inline] kzalloc_node include/linux/slab.h:731 [inline] qdisc_alloc+0x95/0x950 net/sched/sch_generic.c:938 qdisc_create_dflt+0x62/0x480 net/sched/sch_generic.c:996 attach_one_default_qdisc net/sched/sch_generic.c:1151 [inline] netdev_for_each_tx_queue include/linux/netdevice.h:2483 [inline] attach_default_qdiscs net/sched/sch_generic.c:1169 [inline] dev_activate+0x345/0x11d0 net/sched/sch_generic.c:1228 __dev_open+0x3f7/0x510 net/core/dev.c:1426 __dev_change_flags+0x1df/0x6e0 net/core/dev.c:8527 dev_change_flags+0x8b/0x1a0 net/core/dev.c:8599 do_setlink+0xe93/0x2ae0 net/core/rtnetlink.c:2833 __rtnl_newlink net/core/rtnetlink.c:3623 [inline] rtnl_newlink+0x172d/0x2010 net/core/rtnetlink.c:3670 rtnetlink_rcv_msg+0x825/0xf40 net/core/rtnetlink.c:6174 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 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_lru+0x11f/0x2e0 mm/slub.c:3483 __d_alloc+0x31/0x710 fs/dcache.c:1769 d_alloc fs/dcache.c:1849 [inline] d_alloc_parallel+0xce/0x13a0 fs/dcache.c:2638 __lookup_slow+0x117/0x3e0 fs/namei.c:1671 lookup_one_len+0x18b/0x2d0 fs/namei.c:2712 start_creating+0x183/0x310 fs/debugfs/inode.c:375 debugfs_create_dir+0x28/0x490 fs/debugfs/inode.c:590 nsim_dev_debugfs_init+0xe6/0x530 drivers/net/netdevsim/dev.c:308 nsim_drv_probe+0x6e0/0xb80 drivers/net/netdevsim/dev.c:1581 really_probe+0x2af/0xc80 drivers/base/dd.c:631 Memory state around the buggy address: ffff888021d53c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888021d53d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888021d53d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888021d53e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888021d53e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================