loop3: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in reiserfs_xattr_get+0xe3/0x580 fs/reiserfs/xattr.c:674 Read of size 8 at addr ffff8880b0cba998 by task syz-executor.3/15449 CPU: 0 PID: 15449 Comm: syz-executor.3 Not tainted 6.1.0-rc6-syzkaller-00315-gfaf68e3523c2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x220 mm/kasan/report.c:395 kasan_report+0x139/0x170 mm/kasan/report.c:495 reiserfs_xattr_get+0xe3/0x580 fs/reiserfs/xattr.c:674 reiserfs_get_acl+0x7a/0x650 fs/reiserfs/xattr_acl.c:214 get_acl+0x157/0x260 fs/posix_acl.c:153 check_acl+0x35/0x150 fs/namei.c:306 acl_permission_check fs/namei.c:351 [inline] generic_permission+0x388/0x4e0 fs/namei.c:404 do_inode_permission fs/namei.c:458 [inline] inode_permission+0x22c/0x450 fs/namei.c:525 may_open+0x2a4/0x400 fs/namei.c:3185 do_open fs/namei.c:3555 [inline] path_openat+0x24b4/0x2e00 fs/namei.c:3714 do_filp_open+0x275/0x500 fs/namei.c:3741 do_sys_openat2+0x13b/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+0x243/0x290 fs/open.c:1337 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f7d3143e264 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:00007f7d321ebf10 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000005ce8 RCX: 00007f7d3143e264 RDX: 0000000000010000 RSI: 0000000020000100 RDI: 00000000ffffff9c RBP: 0000000020000100 R08: 0000000000000000 R09: 0000000000004000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000010000 R13: 0000000020000100 R14: 00007f7d321ebfe0 R15: 0000000020000580 Allocated by task 4962: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kmalloc include/linux/slab.h:553 [inline] kzalloc include/linux/slab.h:689 [inline] smk_fetch+0x91/0x140 security/smack/smack_lsm.c:291 smack_d_instantiate+0x5c4/0xa10 security/smack/smack_lsm.c:3423 security_d_instantiate+0xa5/0x100 security/security.c:2063 d_instantiate+0x51/0x90 fs/dcache.c:2034 shmem_symlink+0x58a/0x740 mm/shmem.c:3163 vfs_symlink+0x246/0x3d0 fs/namei.c:4401 do_symlinkat+0x209/0x610 fs/namei.c:4430 __do_sys_symlink fs/namei.c:4452 [inline] __se_sys_symlink fs/namei.c:4450 [inline] __x64_sys_symlink+0x7a/0x90 fs/namei.c:4450 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 4962: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:511 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0x71/0x110 mm/slub.c:3674 smk_fetch+0x108/0x140 security/smack/smack_lsm.c:303 smack_d_instantiate+0x5c4/0xa10 security/smack/smack_lsm.c:3423 security_d_instantiate+0xa5/0x100 security/security.c:2063 d_instantiate+0x51/0x90 fs/dcache.c:2034 shmem_symlink+0x58a/0x740 mm/shmem.c:3163 vfs_symlink+0x246/0x3d0 fs/namei.c:4401 do_symlinkat+0x209/0x610 fs/namei.c:4430 __do_sys_symlink fs/namei.c:4452 [inline] __se_sys_symlink fs/namei.c:4450 [inline] __x64_sys_symlink+0x7a/0x90 fs/namei.c:4450 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880b0cba800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 152 bytes to the right of 256-byte region [ffff8880b0cba800, ffff8880b0cba900) The buggy address belongs to the physical page: page:ffffea0002c32e80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xb0cba head:ffffea0002c32e80 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000818880 dead000000000002 ffff888012841b40 raw: 0000000000000000 0000000080100010 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3694, tgid 3694 (syz-executor.4), ts 487733257587, free_ts 487599499299 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4291 __alloc_pages+0x259/0x560 mm/page_alloc.c:5558 __alloc_pages_node include/linux/gfp.h:223 [inline] alloc_slab_page+0x2e/0xf0 mm/slub.c:1796 allocate_slab+0x5e/0x4b0 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x7f4/0xeb0 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x252/0x310 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node+0x9e/0x190 mm/slab_common.c:962 kmalloc_array_node include/linux/slab.h:666 [inline] kcalloc_node include/linux/slab.h:671 [inline] memcg_alloc_slab_cgroups+0x7c/0x120 mm/memcontrol.c:2885 account_slab mm/slab.h:635 [inline] allocate_slab+0x9b/0x4b0 mm/slub.c:1957 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x7f4/0xeb0 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x252/0x310 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node+0x9e/0x190 mm/slab_common.c:962 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x6e/0x180 mm/util.c:581 kvmalloc include/linux/slab.h:706 [inline] kvzalloc include/linux/slab.h:714 [inline] allocate_hook_entries_size net/netfilter/core.c:61 [inline] nf_hook_entries_grow+0x345/0x790 net/netfilter/core.c:128 __nf_register_net_hook+0x287/0x8f0 net/netfilter/core.c:423 nf_register_net_hook+0xaa/0x180 net/netfilter/core.c:566 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x7d/0x630 mm/page_alloc.c:3483 qlist_free_all+0x2b/0x70 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x169/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:737 [inline] slab_alloc_node mm/slub.c:3398 [inline] __kmem_cache_alloc_node+0x1d7/0x310 mm/slub.c:3437 kmalloc_trace+0x26/0x60 mm/slab_common.c:1045 kmalloc include/linux/slab.h:553 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:643 [inline] netdevice_event+0x39c/0x9c0 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:455 __dev_notify_flags+0x2ef/0x5f0 dev_change_flags+0xe3/0x190 net/core/dev.c:8619 devinet_ioctl+0x933/0x1ab0 net/ipv4/devinet.c:1146 inet_ioctl+0x32d/0x400 net/ipv4/af_inet.c:979 sock_do_ioctl+0x151/0x450 net/socket.c:1169 sock_ioctl+0x481/0x770 net/socket.c:1286 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856 Memory state around the buggy address: ffff8880b0cba880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b0cba900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880b0cba980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880b0cbaa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880b0cbaa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================