UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_from_file_folio include/linux/highmem.h:510 [inline] BUG: KASAN: slab-out-of-bounds in udf_adinicb_writepage+0x308/0x620 fs/udf/inode.c:192 Write of size 4096 at addr ffff88807b42bc00 by task syz-executor.1/17122 CPU: 1 PID: 17122 Comm: syz-executor.1 Not tainted 6.6.0-rc4-syzkaller-00205-g7de25c855b63 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/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:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 memcpy_from_file_folio include/linux/highmem.h:510 [inline] udf_adinicb_writepage+0x308/0x620 fs/udf/inode.c:192 write_cache_pages+0x827/0x13f0 mm/page-writeback.c:2474 do_writepages+0x3a6/0x670 mm/page-writeback.c:2553 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:390 __filemap_fdatawrite_range mm/filemap.c:423 [inline] file_write_and_wait_range+0x20f/0x300 mm/filemap.c:781 __generic_file_fsync+0x72/0x190 fs/libfs.c:1394 generic_file_fsync+0x73/0xf0 fs/libfs.c:1435 generic_write_sync include/linux/fs.h:2584 [inline] udf_file_write_iter+0x55c/0x660 fs/udf/file.c:122 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 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:0x7f774247cae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f77430ec0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f774259c050 RCX: 00007f774247cae9 RDX: 000000000000000b RSI: 0000000020001000 RDI: 0000000000000004 RBP: 00007f77424c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f774259c050 R15: 00007ffd64685538 Allocated by task 17121: 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:198 [inline] __do_kmalloc_node mm/slab_common.c:1023 [inline] __kmalloc+0xb9/0x230 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] udf_alloc_i_data fs/udf/inode.c:1635 [inline] udf_read_inode fs/udf/inode.c:1439 [inline] __udf_iget+0xe0e/0x3cc0 fs/udf/inode.c:1939 udf_iget fs/udf/udfdecl.h:152 [inline] udf_lookup+0x1e2/0x2d0 fs/udf/namei.c:127 lookup_open fs/namei.c:3473 [inline] open_last_lookups fs/namei.c:3563 [inline] path_openat+0x11f1/0x3180 fs/namei.c:3793 do_filp_open+0x234/0x490 fs/namei.c:3823 do_sys_openat2+0x13e/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x247/0x290 fs/open.c:1448 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+0xad/0xc0 mm/kasan/generic.c:492 insert_work+0x3e/0x320 kernel/workqueue.c:1647 __queue_work+0xd00/0x1010 kernel/workqueue.c:1803 call_timer_fn+0x17a/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:553 Second to last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492 insert_work+0x3e/0x320 kernel/workqueue.c:1647 __queue_work+0xd00/0x1010 kernel/workqueue.c:1803 call_timer_fn+0x17a/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:553 The buggy address belongs to the object at ffff88807b42bc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of allocated 336-byte region [ffff88807b42bc00, ffff88807b42bd50) The buggy address belongs to the physical page: page:ffffea0001ed0a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b428 head:ffffea0001ed0a00 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012841c80 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 2, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5059, tgid 5059 (syz-executor.1), ts 185151735008, free_ts 185051579999 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 alloc_slab_page+0x6a/0x160 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x84/0x2f0 mm/slub.c:2070 ___slab_alloc+0xc85/0x1310 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x1af/0x270 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1022 [inline] __kmalloc+0xa8/0x230 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] kzalloc include/linux/slab.h:720 [inline] fib6_info_alloc+0x2e/0xe0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x445/0x1220 net/ipv6/route.c:3749 ip6_route_add+0x26/0x120 net/ipv6/route.c:3843 addrconf_prefix_route net/ipv6/addrconf.c:2434 [inline] addrconf_add_linklocal+0x629/0xae0 net/ipv6/addrconf.c:3254 addrconf_addr_gen+0x7fa/0xb60 addrconf_dev_config net/ipv6/addrconf.c:3428 [inline] addrconf_init_auto_addrs+0x96a/0xe90 net/ipv6/addrconf.c:3506 addrconf_notify+0xaeb/0x1010 net/ipv6/addrconf.c:3679 notifier_call_chain+0x18c/0x3a0 kernel/notifier.c:93 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2405 discard_slab mm/slub.c:2116 [inline] __unfreeze_partials+0x1dc/0x220 mm/slub.c:2655 put_cpu_partial+0x17b/0x250 mm/slub.c:2731 __slab_free+0x2b6/0x390 mm/slub.c:3679 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x75/0xe0 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:188 [inline] slab_post_alloc_hook+0x67/0x3d0 mm/slab.h:762 slab_alloc_node mm/slub.c:3478 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc+0x123/0x300 mm/slub.c:3502 getname_flags+0xbc/0x4e0 fs/namei.c:140 vfs_fstatat+0x11c/0x190 fs/stat.c:294 __do_sys_newfstatat fs/stat.c:459 [inline] __se_sys_newfstatat fs/stat.c:453 [inline] __x64_sys_newfstatat+0x117/0x190 fs/stat.c:453 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 Memory state around the buggy address: ffff88807b42bc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807b42bc80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807b42bd00: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff88807b42bd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b42be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================