================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x7e9/0x8f0 fs/udf/inode.c:2090 Write of size 4 at addr ffff8880220267f0 by task syz-executor.3/7571 CPU: 1 PID: 7571 Comm: syz-executor.3 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 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:2090 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_mkdirat fs/namei.c:4076 [inline] __se_sys_mkdirat fs/namei.c:4074 [inline] __x64_sys_mkdirat+0x119/0x170 fs/namei.c:4074 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:0x7f900828c0a9 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:00007f9008f70168 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f90083abf80 RCX: 00007f900828c0a9 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000005 RBP: 00007f90082e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffef923eb1f R14: 00007f9008f70300 R15: 0000000000022000 Allocated by task 5176: 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 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] device_private_init drivers/base/core.c:3323 [inline] device_add+0x116c/0x1e90 drivers/base/core.c:3373 netdev_register_kobject+0x185/0x400 net/core/net-sysfs.c:2015 register_netdevice+0xd77/0x1640 net/core/dev.c:10045 macvlan_common_newlink+0xea9/0x1770 drivers/net/macvlan.c:1512 rtnl_newlink_create net/core/rtnetlink.c:3407 [inline] __rtnl_newlink+0x10c2/0x1840 net/core/rtnetlink.c:3624 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3637 rtnetlink_rcv_msg+0x43e/0xca0 net/core/rtnetlink.c:6141 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2564 netlink_unicast_kernel net/netlink/af_netlink.c:1330 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1356 netlink_sendmsg+0x91b/0xe10 net/netlink/af_netlink.c:1932 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 ffff888022026400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 496 bytes to the right of 512-byte region [ffff888022026400, ffff888022026600) The buggy address belongs to the physical page: page:ffffea0000880980 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22026 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888012440600 ffffea00009e8c10 ffffea0000933ad0 raw: 0000000000000000 ffff888022026000 0000000100000004 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 0x2c20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_THISNODE), pid 5175, tgid 5175 (syz-executor.0), ts 287360714477, free_ts 287322642411 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages_slowpath.constprop.0+0x36b/0x23d0 mm/page_alloc.c:5084 __alloc_pages+0x4aa/0x5b0 mm/page_alloc.c:5562 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x94/0x390 mm/slab.c:2574 cache_alloc_refill+0x27f/0x380 mm/slab.c:2947 ____cache_alloc mm/slab.c:3023 [inline] ____cache_alloc mm/slab.c:3006 [inline] __do_cache_alloc mm/slab.c:3206 [inline] slab_alloc_node mm/slab.c:3254 [inline] __kmem_cache_alloc_node+0x44f/0x510 mm/slab.c:3544 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0x4b/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] alloc_uevent_skb+0x7b/0x210 lib/kobject_uevent.c:290 uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:412 [inline] kobject_uevent_env+0x10f3/0x1620 lib/kobject_uevent.c:593 __kobject_del+0x160/0x1f0 lib/kobject.c:585 kobject_cleanup lib/kobject.c:664 [inline] kobject_release lib/kobject.c:704 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2f1/0x4d0 lib/kobject.c:721 netdev_queue_update_kobjects+0x36b/0x4f0 net/core/net-sysfs.c:1733 netif_set_real_num_tx_queues+0x1ba/0x770 net/core/dev.c:2886 veth_init_queues+0xdd/0x190 drivers/net/veth.c:1687 veth_newlink+0x52a/0x9a0 drivers/net/veth.c:1807 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:3365 [inline] ___cache_free+0x2ac/0x3d0 mm/slab.c:3428 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:3261 [inline] __kmem_cache_alloc_node+0x26b/0x510 mm/slab.c:3544 kmalloc_trace+0x26/0x60 mm/slab_common.c:1062 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] ref_tracker_alloc+0x158/0x560 lib/ref_tracker.c:85 __netdev_tracker_alloc include/linux/netdevice.h:4020 [inline] netdev_hold include/linux/netdevice.h:4049 [inline] netdev_hold include/linux/netdevice.h:4044 [inline] rx_queue_add_kobject net/core/net-sysfs.c:1060 [inline] net_rx_queue_update_kobjects+0x20e/0x510 net/core/net-sysfs.c:1114 register_queue_kobjects net/core/net-sysfs.c:1774 [inline] netdev_register_kobject+0x279/0x400 net/core/net-sysfs.c:2019 register_netdevice+0xd77/0x1640 net/core/dev.c:10045 bond_newlink drivers/net/bonding/bond_netlink.c:560 [inline] bond_newlink+0x4b/0xa0 drivers/net/bonding/bond_netlink.c:550 rtnl_newlink_create net/core/rtnetlink.c:3407 [inline] __rtnl_newlink+0x10c2/0x1840 net/core/rtnetlink.c:3624 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3637 Memory state around the buggy address: ffff888022026680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888022026700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888022026780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888022026800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888022026880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================