================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_file_folio include/linux/highmem.h:466 [inline] BUG: KASAN: slab-out-of-bounds in udf_adinicb_writepage+0x37f/0x710 fs/udf/inode.c:196 Write of size 2538 at addr ffff88807abc1c00 by task kworker/u4:0/10 CPU: 1 PID: 10 Comm: kworker/u4:0 Not tainted 6.4.0-rc6-syzkaller-00035-g15adb51c04cc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Workqueue: writeback wb_workfn (flush-7:5) 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:351 [inline] print_report+0x163/0x540 mm/kasan/report.c:462 kasan_report+0x176/0x1b0 mm/kasan/report.c:572 kasan_check_range+0x283/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 memcpy_from_file_folio include/linux/highmem.h:466 [inline] udf_adinicb_writepage+0x37f/0x710 fs/udf/inode.c:196 write_cache_pages+0x89e/0x12b0 mm/page-writeback.c:2473 do_writepages+0x3a6/0x670 mm/page-writeback.c:2551 __writeback_single_inode+0x155/0xfa0 fs/fs-writeback.c:1603 writeback_sb_inodes+0x8e3/0x11d0 fs/fs-writeback.c:1894 wb_writeback+0x458/0xc70 fs/fs-writeback.c:2068 wb_do_writeback fs/fs-writeback.c:2211 [inline] wb_workfn+0x400/0xff0 fs/fs-writeback.c:2251 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2405 worker_thread+0xa63/0x1210 kernel/workqueue.c:2552 kthread+0x2b8/0x350 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 28441: 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 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:979 udf_new_inode+0x2e7/0xd10 udf_create+0x21/0xe0 fs/udf/namei.c:384 lookup_open fs/namei.c:3492 [inline] open_last_lookups fs/namei.c:3560 [inline] path_openat+0x13df/0x3170 fs/namei.c:3788 do_filp_open+0x234/0x490 fs/namei.c:3818 do_sys_openat2+0x13f/0x500 fs/open.c:1356 do_sys_open fs/open.c:1372 [inline] __do_sys_creat fs/open.c:1448 [inline] __se_sys_creat fs/open.c:1442 [inline] __x64_sys_creat+0x123/0x160 fs/open.c:1442 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 insert_work+0x54/0x3d0 kernel/workqueue.c:1365 __queue_work+0xb37/0xf10 kernel/workqueue.c:1526 call_timer_fn+0x178/0x580 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1746 [inline] __run_timers+0x67a/0x860 kernel/time/timer.c:2022 run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035 __do_softirq+0x2ab/0x908 kernel/softirq.c:571 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 insert_work+0x54/0x3d0 kernel/workqueue.c:1365 __queue_work+0xb37/0xf10 kernel/workqueue.c:1526 call_timer_fn+0x178/0x580 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1746 [inline] __run_timers+0x67a/0x860 kernel/time/timer.c:2022 run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035 __do_softirq+0x2ab/0x908 kernel/softirq.c:571 The buggy address belongs to the object at ffff88807abc1c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of allocated 336-byte region [ffff88807abc1c00, ffff88807abc1d50) The buggy address belongs to the physical page: page:ffffea0001eaf000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7abc0 head:ffffea0001eaf000 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 ksm flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff888012441c80 ffffea000087d100 dead000000000003 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5040, tgid 5040 (syz-executor.1), ts 188194610860, free_ts 187999173529 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3502 __alloc_pages+0x255/0x670 mm/page_alloc.c:4768 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:3192 __slab_alloc mm/slub.c:3291 [inline] __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] __kmem_cache_alloc_node+0x1b8/0x290 mm/slub.c:3490 __do_kmalloc_node mm/slab_common.c:965 [inline] __kmalloc+0xa8/0x230 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:680 [inline] fib6_info_alloc+0x30/0xd0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x446/0x12c0 net/ipv6/route.c:3741 addrconf_f6i_alloc+0x3a4/0x7d0 net/ipv6/route.c:4563 fixup_permanent_addr net/ipv6/addrconf.c:3485 [inline] addrconf_permanent_addr+0x2d5/0xc80 net/ipv6/addrconf.c:3524 addrconf_notify+0xa01/0xfe0 net/ipv6/addrconf.c:3596 notifier_call_chain+0x18c/0x3a0 kernel/notifier.c:93 __dev_notify_flags+0x359/0x650 dev_change_flags+0xf0/0x1a0 net/core/dev.c:8645 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x903/0xa30 mm/page_alloc.c:2564 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2659 discard_slab mm/slub.c:2097 [inline] __unfreeze_partials+0x1b1/0x1f0 mm/slub.c:2636 put_cpu_partial+0x116/0x180 mm/slub.c:2712 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:292 __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:711 slab_alloc_node mm/slub.c:3451 [inline] __kmem_cache_alloc_node+0x14c/0x290 mm/slub.c:3490 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] nsim_fib6_rt_create drivers/net/netdevsim/fib.c:547 [inline] nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:752 [inline] nsim_fib6_event drivers/net/netdevsim/fib.c:856 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:889 [inline] nsim_fib_event_work+0x19c2/0x4130 drivers/net/netdevsim/fib.c:1492 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2405 process_scheduled_works kernel/workqueue.c:2468 [inline] worker_thread+0xd20/0x1210 kernel/workqueue.c:2554 kthread+0x2b8/0x350 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff88807abc1c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807abc1c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807abc1d00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff88807abc1d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807abc1e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================