================================================================== BUG: KASAN: slab-out-of-bounds in udf_get_filelongad+0x163/0x1b0 fs/udf/directory.c:235 Read of size 4 at addr ffff888081d10f58 by task syz-executor.3/5068 CPU: 1 PID: 5068 Comm: syz-executor.3 Not tainted 6.1.0-rc8-syzkaller-00164-g4cee37b3a4e6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x220 mm/kasan/report.c:395 kasan_report+0x139/0x170 mm/kasan/report.c:495 udf_get_filelongad+0x163/0x1b0 fs/udf/directory.c:235 udf_current_aext+0x467/0xa80 fs/udf/inode.c:2206 udf_next_aext+0x88/0x430 fs/udf/inode.c:2142 udf_extend_file fs/udf/inode.c:662 [inline] udf_setsize+0xae2/0x1370 fs/udf/inode.c:1249 udf_setattr+0x362/0x530 fs/udf/file.c:281 notify_change+0xe38/0x10f0 fs/attr.c:420 do_truncate+0x214/0x300 fs/open.c:65 do_sys_ftruncate+0x2eb/0x380 fs/open.c:193 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f1cd568c0d9 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:00007f1cd63b7168 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007f1cd57ac050 RCX: 00007f1cd568c0d9 RDX: 0000000000000000 RSI: 0100000000000000 RDI: 0000000000000006 RBP: 00007f1cd56e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd066d800f R14: 00007f1cd63b7300 R15: 0000000000022000 Allocated by task 3660: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xaf/0x1a0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] kzalloc include/linux/slab.h:689 [inline] fib6_info_alloc+0x2c/0xd0 net/ipv6/ip6_fib.c:156 ip6_route_info_create+0x43d/0x12e0 net/ipv6/route.c:3749 ip6_route_add+0x22/0x120 net/ipv6/route.c:3843 addrconf_prefix_route+0x3fd/0x5c0 net/ipv6/addrconf.c:2425 fixup_permanent_addr net/ipv6/addrconf.c:3476 [inline] addrconf_permanent_addr+0x438/0x700 net/ipv6/addrconf.c:3500 addrconf_notify+0x881/0xfe0 net/ipv6/addrconf.c:3572 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:455 __dev_notify_flags+0x2ef/0x5f0 dev_change_flags+0xe3/0x190 net/core/dev.c:8619 do_setlink+0xf36/0x3f10 net/core/rtnetlink.c:2788 __rtnl_newlink net/core/rtnetlink.c:3547 [inline] rtnl_newlink+0x183e/0x2060 net/core/rtnetlink.c:3594 rtnetlink_rcv_msg+0x7b8/0xe90 net/core/rtnetlink.c:6091 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2540 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7e7/0x9c0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x9b3/0xcd0 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] __sys_sendto+0x46d/0x5f0 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2125 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888081d10c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 344 bytes to the right of 512-byte region [ffff888081d10c00, ffff888081d10e00) The buggy address belongs to the physical page: page:ffffea0002074400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x81d10 head:ffffea0002074400 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888012841c80 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 0xd28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3660, tgid 3660 (syz-executor.0), ts 213629736442, free_ts 213622630803 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4291 __alloc_pages+0x259/0x560 mm/page_alloc.c:5558 alloc_slab_page+0xbd/0x190 mm/slub.c:1794 allocate_slab+0x5e/0x4b0 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x7f4/0xeb0 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x252/0x310 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0x9c/0x190 mm/slab_common.c:975 kmalloc_reserve net/core/skbuff.c:437 [inline] pskb_expand_head+0x18c/0x1280 net/core/skbuff.c:1832 netlink_trim+0x17f/0x210 net/netlink/af_netlink.c:1301 netlink_broadcast+0x64/0x1170 net/netlink/af_netlink.c:1497 nlmsg_multicast include/net/netlink.h:1050 [inline] nlmsg_notify+0xfa/0x1c0 net/netlink/af_netlink.c:2583 rtmsg_fib+0x38b/0x610 net/ipv4/fib_semantics.c:540 fib_table_insert+0xf9d/0x1f20 net/ipv4/fib_trie.c:1404 fib_magic+0x451/0x650 net/ipv4/fib_frontend.c:1101 fib_add_ifaddr+0x377/0x5c0 net/ipv4/fib_frontend.c:1138 fib_netdev_event+0x628/0x740 net/ipv4/fib_frontend.c:1483 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x7d/0x630 mm/page_alloc.c:3483 __stack_depot_save+0x430/0x4a0 lib/stackdepot.c:506 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x61/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:511 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x94/0x1d0 mm/slub.c:3683 __dev_kfree_skb_any+0x146/0x160 net/core/dev.c:3150 dev_kfree_skb_any include/linux/netdevice.h:3803 [inline] team_dummy_transmit+0x16/0x20 drivers/net/team/team.c:501 team_xmit+0x353/0x530 drivers/net/team/team.c:1729 __netdev_start_xmit include/linux/netdevice.h:4840 [inline] netdev_start_xmit include/linux/netdevice.h:4854 [inline] xmit_one net/core/dev.c:3590 [inline] dev_hard_start_xmit+0x1af/0x3e0 net/core/dev.c:3606 __dev_queue_xmit+0x1cbb/0x3af0 net/core/dev.c:4256 dev_queue_xmit include/linux/netdevice.h:3008 [inline] neigh_hh_output include/net/neighbour.h:530 [inline] neigh_output include/net/neighbour.h:544 [inline] ip6_finish_output2+0xe0d/0x1530 net/ipv6/ip6_output.c:134 __ip6_finish_output net/ipv6/ip6_output.c:195 [inline] ip6_finish_output+0xa05/0xeb0 net/ipv6/ip6_output.c:206 dst_output include/net/dst.h:445 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] mld_sendpack+0x89a/0xd70 net/ipv6/mcast.c:1820 Memory state around the buggy address: ffff888081d10e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888081d10e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888081d10f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888081d10f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888081d11000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================