================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x7e9/0x8f0 fs/udf/inode.c:2088 Write of size 4 at addr ffff888077d557f0 by task syz-executor.0/5987 CPU: 1 PID: 5987 Comm: syz-executor.0 Not tainted 6.2.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x461 mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 udf_write_aext+0x7e9/0x8f0 fs/udf/inode.c:2088 udf_add_entry+0xd03/0x2ac0 fs/udf/namei.c:482 udf_mkdir+0x149/0x650 fs/udf/namei.c:681 vfs_mkdir+0x48d/0x740 fs/namei.c:4036 do_mkdirat+0x27b/0x2f0 fs/namei.c:4061 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __x64_sys_mkdir+0xf6/0x140 fs/namei.c:4079 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fdd6ce8c0c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdd6dbf7168 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007fdd6cfabf80 RCX: 00007fdd6ce8c0c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0 RBP: 00007fdd6cee7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc8d8adf6f R14: 00007fdd6dbf7300 R15: 0000000000022000 Allocated by task 5092: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc_node_track_caller+0x5b/0xc0 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] __alloc_skb+0xe9/0x310 net/core/skbuff.c:565 alloc_skb include/linux/skbuff.h:1270 [inline] nlmsg_new include/net/netlink.h:1002 [inline] inet6_ifa_notify+0x118/0x230 net/ipv6/addrconf.c:5496 __ipv6_ifa_notify net/ipv6/addrconf.c:6144 [inline] ipv6_ifa_notify net/ipv6/addrconf.c:6196 [inline] inet6_addr_add+0x687/0xae0 net/ipv6/addrconf.c:2981 inet6_rtm_newaddr+0xfa8/0x1a60 net/ipv6/addrconf.c:4927 rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6141 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 __sys_sendto+0x23a/0x340 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2125 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888077d55400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 496 bytes to the right of 512-byte region [ffff888077d55400, ffff888077d55600) The buggy address belongs to the physical page: page:ffffea0001df5540 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888077d55400 pfn:0x77d55 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888012440600 ffffea0000afc410 ffffea0000aea2d0 raw: ffff888077d55400 ffff888077d55000 0000000100000002 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 0x2420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 5092, tgid 5092 (syz-executor.1), ts 141929911542, free_ts 141922586182 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5549 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x94/0x390 mm/slab.c:2576 cache_alloc_refill+0x27f/0x380 mm/slab.c:2949 ____cache_alloc mm/slab.c:3025 [inline] ____cache_alloc mm/slab.c:3008 [inline] __do_cache_alloc mm/slab.c:3208 [inline] slab_alloc_node mm/slab.c:3256 [inline] __kmem_cache_alloc_node+0x44f/0x510 mm/slab.c:3546 kmalloc_trace+0x26/0x60 mm/slab_common.c:1062 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] fib6_info_alloc+0xc9/0x220 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x341/0x18f0 net/ipv6/route.c:3749 addrconf_f6i_alloc+0x381/0x620 net/ipv6/route.c:4571 ipv6_add_addr+0x395/0x1de0 net/ipv6/addrconf.c:1105 inet6_addr_add+0x412/0xae0 net/ipv6/addrconf.c:2969 inet6_rtm_newaddr+0xfa8/0x1a60 net/ipv6/addrconf.c:4927 rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6141 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1942 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3464 slab_destroy mm/slab.c:1619 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1639 cache_flusharray mm/slab.c:3367 [inline] ___cache_free+0x2ac/0x3d0 mm/slab.c:3430 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x192/0x220 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:761 [inline] slab_alloc_node mm/slab.c:3263 [inline] kmem_cache_alloc_node+0x297/0x590 mm/slab.c:3534 __alloc_skb+0x216/0x310 net/core/skbuff.c:552 alloc_skb include/linux/skbuff.h:1270 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1211 [inline] netlink_sendmsg+0x9a6/0xe10 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 __sys_sendto+0x23a/0x340 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2125 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888077d55680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888077d55700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888077d55780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888077d55800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888077d55880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================