================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x5e9/0x7a0 fs/udf/inode.c:2105 Write of size 4 at addr ffff888059910bf0 by task syz.3.1134/8832 CPU: 1 PID: 8832 Comm: syz.3.1134 Not tainted 6.1.106-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 udf_write_aext+0x5e9/0x7a0 fs/udf/inode.c:2105 udf_add_entry+0x17b7/0x3350 fs/udf/namei.c:482 udf_mkdir+0x1a8/0xaa0 fs/udf/namei.c:681 vfs_mkdir+0x3b6/0x590 fs/namei.c:4108 do_mkdirat+0x225/0x360 fs/namei.c:4133 __do_sys_mkdirat fs/namei.c:4148 [inline] __se_sys_mkdirat fs/namei.c:4146 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4146 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:0x7ff3acd79e79 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff3adb0f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007ff3acf15f80 RCX: 00007ff3acd79e79 RDX: 0000000000000000 RSI: 0000000020000000 RDI: ffffffffffffff9c RBP: 00007ff3acde7916 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff3acf15f80 R15: 00007ffe32a4b548 Allocated by task 5403: 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 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xb2/0x230 mm/slab_common.c:968 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:692 [inline] new_dir fs/proc/proc_sysctl.c:969 [inline] get_subdir fs/proc/proc_sysctl.c:1013 [inline] __register_sysctl_table+0x9f1/0x11e0 fs/proc/proc_sysctl.c:1375 __devinet_sysctl_register+0x1d9/0x2a0 net/ipv4/devinet.c:2599 devinet_sysctl_register+0x13a/0x1a0 net/ipv4/devinet.c:2639 inetdev_init+0x291/0x4c0 net/ipv4/devinet.c:279 inetdev_event+0x29b/0x1490 net/ipv4/devinet.c:1534 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+0x145/0x1b0 net/core/dev.c:2022 register_netdevice+0x12f2/0x1720 net/core/dev.c:10132 veth_newlink+0x5db/0xc70 drivers/net/veth.c:1744 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: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 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 inetdev_destroy net/ipv4/devinet.c:331 [inline] inetdev_event+0x85a/0x1490 net/ipv4/devinet.c:1602 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] unregister_netdevice_many+0xec1/0x17a0 net/core/dev.c:10882 default_device_exit_batch+0x956/0x9d0 net/core/dev.c:11395 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 ffff888059910800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 496 bytes to the right of 512-byte region [ffff888059910800, ffff888059910a00) The buggy address belongs to the physical page: page:ffffea0001664400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x59910 head:ffffea0001664400 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888012841c80 raw: 0000000000000000 0000000080100010 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3638, tgid 3638 (syz-executor), ts 70857609471, free_ts 70838014352 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 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0xa0/0x220 mm/slab_common.c:975 kmalloc_reserve net/core/skbuff.c:446 [inline] __alloc_skb+0x135/0x670 net/core/skbuff.c:515 alloc_skb include/linux/skbuff.h:1271 [inline] alloc_uevent_skb+0x74/0x220 lib/kobject_uevent.c:290 uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline] kobject_uevent_net_broadcast+0x178/0x560 lib/kobject_uevent.c:412 kobject_uevent_env+0x576/0x8c0 lib/kobject_uevent.c:608 rx_queue_add_kobject net/core/net-sysfs.c:1072 [inline] net_rx_queue_update_kobjects+0x231/0x4c0 net/core/net-sysfs.c:1112 register_queue_kobjects net/core/net-sysfs.c:1772 [inline] netdev_register_kobject+0x222/0x310 net/core/net-sysfs.c:2017 register_netdevice+0x108a/0x1720 net/core/dev.c:10099 register_vlan_dev+0x384/0x800 net/8021q/vlan.c:179 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 __stack_depot_save+0x409/0x470 lib/stackdepot.c:506 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x60/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328 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] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:682 [inline] fill_pool lib/debugobjects.c:168 [inline] debug_objects_fill_pool+0x725/0xa10 lib/debugobjects.c:606 __debug_object_init+0x29/0x450 lib/debugobjects.c:616 ipv6_mc_init_dev+0x49/0x900 net/ipv6/mcast.c:2767 ipv6_add_dev+0xb0d/0x1180 net/ipv6/addrconf.c:448 addrconf_notify+0x7a6/0xf60 net/ipv6/addrconf.c:3579 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+0x145/0x1b0 net/core/dev.c:2022 register_netdevice+0x12f2/0x1720 net/core/dev.c:10132 macvlan_common_newlink+0x1151/0x18d0 drivers/net/macvlan.c:1512 Memory state around the buggy address: ffff888059910a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888059910b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888059910b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888059910c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888059910c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================