loop3: detected capacity change from 0 to 2048 ================================================================== BUG: KASAN: slab-out-of-bounds in udf_find_entry+0x9f3/0x1230 fs/udf/namei.c:253 Write of size 145 at addr ffff88809fb7ae6e by task syz-executor.3/21080 CPU: 1 PID: 21080 Comm: syz-executor.3 Not tainted 6.1.0-rc2-syzkaller-00105-gb229b6ca5abb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/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+0x9f3/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:0x7f4d5303d707 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:00007f4d53ea3f00 EFLAGS: 00000293 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffe5 RBX: 0000000000000028 RCX: 00007f4d5303d707 RDX: 0000100000000000 RSI: 0000400000020016 RDI: 0000000000000007 RBP: 0000000000000007 R08: 0000000000000000 R09: 0000000000000000 R10: 2d6e6f4e08000000 R11: 0000000000000293 R12: 0000000000000007 R13: 00000000200004b8 R14: 000000000000001d R15: 00007f4d530d5a20 Allocated by task 21080: 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+0xd3f/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 xfrm6_net_sysctl_exit net/ipv6/xfrm6_policy.c:232 [inline] xfrm6_net_exit+0x62/0xa0 net/ipv6/xfrm6_policy.c:266 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:169 setup_net+0x7fb/0xc50 net/core/net_namespace.c:355 copy_net_ns+0x318/0x760 net/core/net_namespace.c:478 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 copy_namespaces+0x391/0x450 kernel/nsproxy.c:178 copy_process+0x306e/0x7190 kernel/fork.c:2256 kernel_clone+0xe7/0x980 kernel/fork.c:2671 __do_sys_clone+0xba/0x100 kernel/fork.c:2812 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to 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 neigh_sysctl_unregister+0x5b/0x80 net/core/neighbour.c:3871 devinet_sysctl_unregister net/ipv4/devinet.c:2638 [inline] inetdev_destroy net/ipv4/devinet.c:327 [inline] inetdev_event+0xcfc/0x1610 net/ipv4/devinet.c:1602 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1945 call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers net/core/dev.c:1997 [inline] unregister_netdevice_many+0x9f5/0x1930 net/core/dev.c:10847 default_device_exit_batch+0x449/0x590 net/core/dev.c:11341 ops_exit_list+0x125/0x170 net/core/net_namespace.c:174 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 ffff88809fb7ae00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 110 bytes inside of 256-byte region [ffff88809fb7ae00, ffff88809fb7af00) The buggy address belongs to the physical page: page:ffffea00027ede80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9fb7a flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000886708 ffffea0001faa748 ffff888011840500 raw: 0000000000000000 ffff88809fb7a000 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 12748, tgid 12744 (syz-executor.2), ts 831600829758, free_ts 816138841242 prep_new_page mm/page_alloc.c:2538 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4287 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5554 __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_array include/linux/slab.h:628 [inline] kcalloc include/linux/slab.h:659 [inline] iter_file_splice_write+0x168/0xc90 fs/splice.c:625 do_splice_from fs/splice.c:764 [inline] direct_splice_actor+0x110/0x180 fs/splice.c:931 splice_direct_to_actor+0x331/0x8a0 fs/splice.c:886 do_splice_direct+0x1a7/0x270 fs/splice.c:974 do_sendfile+0xb19/0x1270 fs/read_write.c:1255 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64 fs/read_write.c:1309 [inline] __x64_sys_sendfile64+0x149/0x210 fs/read_write.c:1309 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1458 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1508 free_unref_page_prepare mm/page_alloc.c:3386 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3482 __folio_put_small mm/swap.c:105 [inline] __folio_put+0xc1/0x130 mm/swap.c:128 folio_put include/linux/mm.h:1159 [inline] put_page include/linux/mm.h:1211 [inline] anon_pipe_buf_release+0x3f7/0x4b0 fs/pipe.c:138 pipe_buf_release include/linux/pipe_fs_i.h:183 [inline] pipe_read+0x610/0x1100 fs/pipe.c:324 call_read_iter include/linux/fs.h:2185 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x7f6/0x930 fs/read_write.c:470 ksys_read+0x1e8/0x250 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88809fb7ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809fb7ae00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88809fb7ae80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff88809fb7af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809fb7af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================