================================================================== BUG: KASAN: slab-out-of-bounds in udf_readdir+0xc5f/0x2240 fs/udf/dir.c:182 Write of size 149 at addr ffff888076f1046a by task syz-executor/5253 CPU: 1 PID: 5253 Comm: syz-executor Not tainted 6.1.107-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/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:0x7f5ac71af053 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 62 43 f8 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 a8 ff ff ff f7 d8 RSP: 002b:00007ffcadb59318 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000055557605a600 RCX: 00007f5ac71af053 RDX: 0000000000008000 RSI: 000055557605a600 RDI: 0000000000000005 RBP: 000055557605a5d4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000010 R14: 000055557605a5d0 R15: 00007ffcadb5b5c0 Allocated by task 5253: 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:557 [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:2845 free_fib_info net/ipv4/fib_semantics.c:257 [inline] fib_info_put include/net/ip_fib.h:583 [inline] fib_release_info+0x61c/0x6e0 net/ipv4/fib_semantics.c:283 fib_table_flush+0xcfe/0x13d0 net/ipv4/fib_trie.c:2098 fib_flush net/ipv4/fib_frontend.c:195 [inline] fib_disable_ip net/ipv4/fib_frontend.c:1426 [inline] fib_netdev_event+0x3c2/0x730 net/ipv4/fib_frontend.c:1495 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1970 [inline] call_netdevice_notifiers_extack net/core/dev.c:2008 [inline] call_netdevice_notifiers net/core/dev.c:2022 [inline] dev_close_many+0x37c/0x530 net/core/dev.c:1570 unregister_netdevice_many+0x4f7/0x17a0 net/core/dev.c:10856 ip_tunnel_delete_nets+0x2ed/0x330 net/ipv4/ip_tunnel.c:1153 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x763/0xb60 net/core/net_namespace.c:604 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Second to 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:2845 free_fib_info net/ipv4/fib_semantics.c:257 [inline] fib_info_put include/net/ip_fib.h:583 [inline] fib_release_info+0x61c/0x6e0 net/ipv4/fib_semantics.c:283 fib_table_flush+0xcfe/0x13d0 net/ipv4/fib_trie.c:2098 fib_flush net/ipv4/fib_frontend.c:195 [inline] fib_disable_ip net/ipv4/fib_frontend.c:1426 [inline] fib_netdev_event+0x3c2/0x730 net/ipv4/fib_frontend.c:1495 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1970 [inline] call_netdevice_notifiers_extack net/core/dev.c:2008 [inline] call_netdevice_notifiers net/core/dev.c:2022 [inline] dev_close_many+0x37c/0x530 net/core/dev.c:1570 unregister_netdevice_many+0x4f7/0x17a0 net/core/dev.c:10856 ip_tunnel_delete_nets+0x2ed/0x330 net/ipv4/ip_tunnel.c:1153 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x763/0xb60 net/core/net_namespace.c:604 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888076f10400 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 106 bytes inside of 256-byte region [ffff888076f10400, ffff888076f10500) The buggy address belongs to the physical page: page:ffffea0001dbc400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x76f10 head:ffffea0001dbc400 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017c41b40 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 3639, tgid 3639 (syz-executor), ts 60828793527, free_ts 60705815685 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2517 prep_new_page mm/page_alloc.c:2524 [inline] get_page_from_freelist+0x322e/0x33b0 mm/page_alloc.c:4290 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5558 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 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:693 [inline] vlan_info_alloc net/8021q/vlan_core.c:153 [inline] vlan_vid_add+0x143/0x740 net/8021q/vlan_core.c:329 register_vlan_dev+0x9b/0x800 net/8021q/vlan.c:157 vlan_newlink+0x453/0x5a0 net/8021q/vlan_netlink.c:195 rtnl_newlink_create net/core/rtnetlink.c:3390 [inline] __rtnl_newlink net/core/rtnetlink.c:3610 [inline] rtnl_newlink+0x14e3/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:2507 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 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1444 [inline] free_pcp_prepare mm/page_alloc.c:1494 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3369 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3464 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:1026 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:693 [inline] kobject_uevent_env+0x281/0x8c0 lib/kobject_uevent.c:539 __kobject_del+0xd3/0x310 lib/kobject.c:593 kobject_cleanup lib/kobject.c:672 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x238/0x460 lib/kobject.c:729 netdev_queue_update_kobjects+0x3d6/0x480 net/core/net-sysfs.c:1731 netif_set_real_num_tx_queues+0x18c/0x910 net/core/dev.c:2920 veth_init_queues+0x82/0x180 drivers/net/veth.c:1670 Memory state around the buggy address: ffff888076f10380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888076f10400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888076f10480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff888076f10500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888076f10580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================