loop3: detected capacity change from 0 to 2048 ================================================================== BUG: KASAN: slab-out-of-bounds in udf_find_entry+0x9f4/0x1230 fs/udf/namei.c:253 Write of size 165 at addr ffff888026eea25a by task syz-executor.3/23611 CPU: 0 PID: 23611 Comm: syz-executor.3 Not tainted 6.1.0-rc4-syzkaller #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+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x461 mm/kasan/report.c:395 kasan_report+0xbb/0x1f0 mm/kasan/report.c:495 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memcpy+0x39/0x60 mm/kasan/shadow.c:66 udf_find_entry+0x9f4/0x1230 fs/udf/namei.c:253 udf_lookup fs/udf/namei.c:309 [inline] udf_lookup+0x156/0x270 fs/udf/namei.c:298 __lookup_hash+0x117/0x180 fs/namei.c:1601 do_unlinkat+0x284/0x650 fs/namei.c:4303 do_coredump+0xd2c/0x3bc0 fs/coredump.c:666 get_signal+0x1be1/0x2430 kernel/signal.c:2844 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:296 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fb0e923d707 Code: 08 89 3c 24 48 89 4c 24 18 e8 e5 f8 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 48 8b 74 24 08 8b 3c 24 b8 12 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 04 24 e8 15 f9 ff ff 48 8b RSP: 002b:00007fb0e9f47f00 EFLAGS: 00000293 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffe5 RBX: 0000000000000028 RCX: 00007fb0e923d707 RDX: 0000080000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: 0000300000014400 R11: 0000000000000293 R12: 0000000000000004 R13: 0000000020000290 R14: 0000000000000006 R15: 00007fb0e92d5a20 Allocated by task 23611: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 kasan_set_track+0x21/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0x9f/0xb0 mm/kasan/common.c:380 kmalloc include/linux/slab.h:576 [inline] udf_find_entry+0xd45/0x1230 fs/udf/namei.c:243 udf_lookup fs/udf/namei.c:309 [inline] udf_lookup+0x156/0x270 fs/udf/namei.c:298 __lookup_hash+0x117/0x180 fs/namei.c:1601 do_unlinkat+0x284/0x650 fs/namei.c:4303 do_coredump+0xd2c/0x3bc0 fs/coredump.c:666 get_signal+0x1be1/0x2430 kernel/signal.c:2844 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:296 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x7b/0x90 mm/kasan/generic.c:481 kvfree_call_rcu+0x74/0x8f0 kernel/rcu/tree.c:3343 drop_sysctl_table+0x3c0/0x4e0 fs/proc/proc_sysctl.c:1709 unregister_sysctl_table fs/proc/proc_sysctl.c:1747 [inline] unregister_sysctl_table+0xc0/0x190 fs/proc/proc_sysctl.c:1722 __devinet_sysctl_unregister net/ipv4/devinet.c:2609 [inline] devinet_exit_net+0xe4/0x280 net/ipv4/devinet.c:2752 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:169 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:601 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the object at ffff888026eea200 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 90 bytes inside of 256-byte region [ffff888026eea200, ffff888026eea300) The buggy address belongs to the physical page: page:ffffea00009bba80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26eea flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001f29f08 ffff888011841650 ffff888011840500 raw: 0000000000000000 ffff888026eea000 0000000100000008 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 22071, tgid 22068 (syz-executor.1), ts 1020045157591, free_ts 1019954650835 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4288 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5555 __alloc_pages_node include/linux/gfp.h:223 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x75/0x360 mm/slab.c:2570 cache_alloc_refill+0x27f/0x380 mm/slab.c:2943 ____cache_alloc mm/slab.c:3019 [inline] ____cache_alloc mm/slab.c:3002 [inline] __do_cache_alloc mm/slab.c:3202 [inline] slab_alloc_node mm/slab.c:3250 [inline] __kmem_cache_alloc_node+0x442/0x500 mm/slab.c:3549 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc+0x44/0xc0 mm/slab_common.c:968 kmalloc include/linux/slab.h:581 [inline] kzalloc include/linux/slab.h:712 [inline] new_dir fs/proc/proc_sysctl.c:971 [inline] get_subdir fs/proc/proc_sysctl.c:1015 [inline] __register_sysctl_table+0x9eb/0x10a0 fs/proc/proc_sysctl.c:1366 netfilter_log_sysctl_init net/netfilter/nf_log.c:490 [inline] nf_log_net_init+0x100/0x440 net/netfilter/nf_log.c:539 ops_init+0xb9/0x680 net/core/net_namespace.c:135 setup_net+0x5d1/0xc50 net/core/net_namespace.c:332 copy_net_ns+0x318/0x760 net/core/net_namespace.c:478 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc1/0x1f0 kernel/nsproxy.c:226 ksys_unshare+0x445/0x920 kernel/fork.c:3188 __do_sys_unshare kernel/fork.c:3259 [inline] __se_sys_unshare kernel/fork.c:3257 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3257 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 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+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3483 slab_destroy mm/slab.c:1615 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1635 cache_flusharray mm/slab.c:3360 [inline] ___cache_free+0x2a8/0x3d0 mm/slab.c:3423 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x5f/0x80 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/slab.c:3257 [inline] __kmem_cache_alloc_node+0x25e/0x500 mm/slab.c:3549 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc+0x44/0xc0 mm/slab_common.c:968 kmalloc include/linux/slab.h:581 [inline] tomoyo_realpath_from_path+0xbf/0x600 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x140 security/security.c:1347 vfs_getattr fs/stat.c:158 [inline] vfs_statx+0x16e/0x430 fs/stat.c:233 vfs_fstatat+0x8c/0xb0 fs/stat.c:267 vfs_lstat include/linux/fs.h:3296 [inline] __do_sys_newlstat+0x8e/0x110 fs/stat.c:423 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 Memory state around the buggy address: ffff888026eea180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888026eea200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888026eea280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff888026eea300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888026eea380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================