================================================================== BUG: KASAN: slab-out-of-bounds in udf_readdir+0xc5f/0x2240 fs/udf/dir.c:182 Write of size 105 at addr ffff88801ee5d896 by task syz-executor.4/3566 CPU: 0 PID: 3566 Comm: syz-executor.4 Not tainted 6.1.87-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 kasan_check_range+0x27f/0x290 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 udf_readdir+0xc5f/0x2240 fs/udf/dir.c:182 iterate_dir+0x224/0x560 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fe5efaa93a3 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 52 8b fa ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 b0 ff ff ff f7 d8 RSP: 002b:00007fffa1710388 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000555555f8a970 RCX: 00007fe5efaa93a3 RDX: 0000000000008000 RSI: 0000555555f8a970 RDI: 0000000000000005 RBP: 0000555555f8a944 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffb0 R13: 0000000000000010 R14: 0000555555f8a940 R15: 000000000000000c Allocated by task 3566: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:556 [inline] udf_readdir+0xb78/0x2240 fs/udf/dir.c:172 iterate_dir+0x224/0x560 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 call_rcu+0x163/0xa10 kernel/rcu/tree.c:2844 fib_create_info+0x189c/0x2500 net/ipv4/fib_semantics.c:1591 fib_table_insert+0x1f2/0x1f20 net/ipv4/fib_trie.c:1236 fib_magic net/ipv4/fib_frontend.c:1104 [inline] fib_add_ifaddr+0x47f/0x1730 net/ipv4/fib_frontend.c:1126 fib_netdev_event+0x620/0x730 net/ipv4/fib_frontend.c:1486 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:455 __dev_notify_flags+0x304/0x610 dev_change_flags+0xe7/0x190 net/core/dev.c:8661 do_setlink+0xcf4/0x3e30 net/core/rtnetlink.c:2801 __rtnl_newlink net/core/rtnetlink.c:3576 [inline] rtnl_newlink+0x172c/0x2050 net/core/rtnetlink.c:3623 rtnetlink_rcv_msg+0x818/0xff0 net/core/rtnetlink.c:6121 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2508 netlink_unicast_kernel net/netlink/af_netlink.c:1326 [inline] netlink_unicast+0x7d8/0x970 net/netlink/af_netlink.c:1352 netlink_sendmsg+0xa26/0xd60 net/netlink/af_netlink.c:1874 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x480/0x600 net/socket.c:2148 __do_sys_sendto net/socket.c:2160 [inline] __se_sys_sendto net/socket.c:2156 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2156 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88801ee5d800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 150 bytes inside of 256-byte region [ffff88801ee5d800, ffff88801ee5d900) The buggy address belongs to the physical page: page:ffffea00007b9700 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ee5c head:ffffea00007b9700 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfff80000010200(slab|head|node=0|zone=1|lastcpupid=0xfff) raw: 00fff80000010200 ffffea0000991380 dead000000000004 ffff888012441b40 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3557, tgid 3557 (syz-executor.0), ts 58816564350, free_ts 58679035072 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513 prep_new_page mm/page_alloc.c:2520 [inline] get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5547 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc+0xa1/0x230 mm/slab_common.c:968 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:692 [inline] fib_create_info+0xa37/0x2500 net/ipv4/fib_semantics.c:1459 fib_table_insert+0x1f2/0x1f20 net/ipv4/fib_trie.c:1236 fib_magic net/ipv4/fib_frontend.c:1104 [inline] fib_add_ifaddr+0x47f/0x1730 net/ipv4/fib_frontend.c:1126 fib_inetaddr_event+0x12b/0x2b0 net/ipv4/fib_frontend.c:1440 notifier_call_chain kernel/notifier.c:87 [inline] blocking_notifier_call_chain+0x104/0x1b0 kernel/notifier.c:382 __inet_insert_ifa+0x9cb/0xbd0 net/ipv4/devinet.c:554 inet_rtm_newaddr+0x8d3/0x18e0 net/ipv4/devinet.c:960 rtnetlink_rcv_msg+0x818/0xff0 net/core/rtnetlink.c:6121 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1440 [inline] free_pcp_prepare mm/page_alloc.c:1490 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3358 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3453 free_slab mm/slub.c:2031 [inline] discard_slab mm/slub.c:2037 [inline] __unfreeze_partials+0x1b7/0x210 mm/slub.c:2586 put_cpu_partial+0x17b/0x250 mm/slub.c:2662 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x156/0x170 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] __kmem_cache_alloc_node+0x137/0x260 mm/slub.c:3437 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045 kmalloc include/linux/slab.h:556 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:643 [inline] netdevice_event+0x3eb/0xa00 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:455 __dev_notify_flags+0x304/0x610 dev_change_flags+0xe7/0x190 net/core/dev.c:8661 do_setlink+0xcf4/0x3e30 net/core/rtnetlink.c:2801 __rtnl_newlink net/core/rtnetlink.c:3576 [inline] rtnl_newlink+0x172c/0x2050 net/core/rtnetlink.c:3623 Memory state around the buggy address: ffff88801ee5d780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801ee5d800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801ee5d880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff88801ee5d900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801ee5d980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================