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 1020 at addr ffff888014b63800 by task syz-executor.0/5791 CPU: 1 PID: 5791 Comm: syz-executor.0 Not tainted 6.6.0-rc1-syzkaller-00115-g9fdfb15a3dbf #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/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:2625 [inline] udf_file_write_iter+0x55c/0x660 fs/udf/file.c:122 do_iter_write+0x84f/0xde0 fs/read_write.c:860 iter_file_splice_write+0x86d/0x1010 fs/splice.c:736 do_splice_from fs/splice.c:933 [inline] direct_splice_actor+0xea/0x1c0 fs/splice.c:1142 splice_direct_to_actor+0x376/0x9e0 fs/splice.c:1088 do_splice_direct+0x2ac/0x3f0 fs/splice.c:1194 do_sendfile+0x623/0x1070 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1322 [inline] __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1308 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:0x7f7e81e7cae9 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:00007f7e82c7c0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f7e81f9bf80 RCX: 00007f7e81e7cae9 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000006 RBP: 00007f7e81ec847a R08: 0000000000000000 R09: 0000000000000000 R10: 0001000000201005 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f7e81f9bf80 R15: 00007ffe0570d358 Allocated by task 5791: 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 udf_new_inode+0x2e7/0xcf0 udf_create+0x21/0xe0 fs/udf/namei.c:380 lookup_open fs/namei.c:3495 [inline] open_last_lookups fs/namei.c:3563 [inline] path_openat+0x13e7/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_creat fs/open.c:1513 [inline] __se_sys_creat fs/open.c:1507 [inline] __x64_sys_creat+0x123/0x160 fs/open.c:1507 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 __call_rcu_common kernel/rcu/tree.c:2653 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:2767 fib6_info_release include/net/ip6_fib.h:332 [inline] ip6_route_info_create+0x9c6/0x1220 net/ipv6/route.c:3829 ip6_route_add+0x26/0x120 net/ipv6/route.c:3843 addrconf_add_mroute net/ipv6/addrconf.c:2498 [inline] addrconf_add_dev+0x354/0x500 net/ipv6/addrconf.c:2516 inet6_addr_add+0x254/0xaf0 net/ipv6/addrconf.c:2961 inet6_rtm_newaddr+0x89e/0xc80 net/ipv6/addrconf.c:4972 rtnetlink_rcv_msg+0x82b/0xf50 net/core/rtnetlink.c:6444 netlink_rcv_skb+0x1df/0x430 net/netlink/af_netlink.c:2545 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x7dc/0x970 net/netlink/af_netlink.c:1368 netlink_sendmsg+0xa37/0xd70 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] sock_sendmsg net/socket.c:753 [inline] __sys_sendto+0x484/0x640 net/socket.c:2177 __do_sys_sendto net/socket.c:2189 [inline] __se_sys_sendto net/socket.c:2185 [inline] __x64_sys_sendto+0xde/0xf0 net/socket.c:2185 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 The buggy address belongs to the object at ffff888014b63800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of allocated 336-byte region [ffff888014b63800, ffff888014b63950) The buggy address belongs to the physical page: page:ffffea000052d800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14b60 head:ffffea000052d800 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012841c80 0000000000000000 dead000000000001 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5459, tgid 5459 (kworker/0:7), ts 80663161438, free_ts 80650110075 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+0xade/0x1100 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 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1114 kmalloc include/linux/slab.h:599 [inline] kzalloc include/linux/slab.h:720 [inline] mca_alloc net/ipv6/mcast.c:880 [inline] __ipv6_dev_mc_inc+0x426/0xa80 net/ipv6/mcast.c:936 addrconf_join_solict net/ipv6/addrconf.c:2189 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4033 [inline] addrconf_dad_work+0x424/0x16b0 net/ipv6/addrconf.c:4158 process_one_work+0x781/0x1130 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0xabf/0x1060 kernel/workqueue.c:2784 kthread+0x2b8/0x350 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 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 __slab_free+0x2f6/0x390 mm/slub.c:3715 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:188 [inline] slab_post_alloc_hook+0x6c/0x3b0 mm/slab.h:762 slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x148/0x330 mm/slub.c:3523 __alloc_skb+0x181/0x420 net/core/skbuff.c:640 alloc_skb include/linux/skbuff.h:1286 [inline] nlmsg_new include/net/netlink.h:999 [inline] netlink_ack+0x396/0x1290 net/netlink/af_netlink.c:2482 netlink_rcv_skb+0x25c/0x430 net/netlink/af_netlink.c:2551 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x7dc/0x970 net/netlink/af_netlink.c:1368 netlink_sendmsg+0xa37/0xd70 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] sock_sendmsg net/socket.c:753 [inline] __sys_sendto+0x484/0x640 net/socket.c:2177 __do_sys_sendto net/socket.c:2189 [inline] __se_sys_sendto net/socket.c:2185 [inline] __x64_sys_sendto+0xde/0xf0 net/socket.c:2185 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 Memory state around the buggy address: ffff888014b63800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888014b63880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888014b63900: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff888014b63980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888014b63a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================