================================================================== BUG: KASAN: slab-out-of-bounds in udf_close_lvid+0x508/0x5c0 fs/udf/super.c:2035 Write of size 1 at addr ffff88806ef9d900 by task syz-executor.0/5411 CPU: 1 PID: 5411 Comm: syz-executor.0 Not tainted 6.5.0-rc6-next-20230818-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 udf_close_lvid+0x508/0x5c0 fs/udf/super.c:2035 udf_put_super+0x19c/0x200 fs/udf/super.c:2322 generic_shutdown_super+0x158/0x480 fs/super.c:499 kill_block_super+0x3b/0x70 fs/super.c:1420 deactivate_locked_super+0x9a/0x170 fs/super.c:330 deactivate_super+0xde/0x100 fs/super.c:361 cleanup_mnt+0x222/0x3d0 fs/namespace.c:1254 task_work_run+0x14d/0x240 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:297 do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f41b4c7dbc7 Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffef62fb0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f41b4c7dbc7 RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffef62fb1b0 RBP: 00007ffef62fb1b0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffef62fc270 R13: 00007f41b4cd7aa2 R14: 0000000000019a86 R15: 0000000000000005 Allocated by task 5405: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3478 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc+0x172/0x3b0 mm/slub.c:3502 kmem_cache_zalloc include/linux/slab.h:711 [inline] __kernfs_new_node+0xd3/0x8a0 fs/kernfs/dir.c:615 kernfs_new_node+0x94/0x110 fs/kernfs/dir.c:679 __kernfs_create_file+0x53/0x340 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x1ff/0x3b0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x31c/0xb40 fs/sysfs/group.c:152 internal_create_groups+0x9d/0x150 fs/sysfs/group.c:192 device_add_groups drivers/base/core.c:2726 [inline] device_add_attrs drivers/base/core.c:2846 [inline] device_add+0xfe3/0x1b40 drivers/base/core.c:3577 netdev_register_kobject+0x183/0x3f0 net/core/net-sysfs.c:2044 register_netdevice+0xbcb/0x1490 net/core/dev.c:10133 veth_newlink+0x395/0xa50 drivers/net/veth.c:1908 rtnl_newlink_create net/core/rtnetlink.c:3471 [inline] __rtnl_newlink+0x115e/0x18c0 net/core/rtnetlink.c:3688 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3701 rtnetlink_rcv_msg+0x439/0xd30 net/core/rtnetlink.c:6427 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x536/0x810 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x93c/0xe40 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] sock_sendmsg+0xd9/0x180 net/socket.c:753 __sys_sendto+0x255/0x340 net/socket.c:2176 __do_sys_sendto net/socket.c:2188 [inline] __se_sys_sendto net/socket.c:2184 [inline] __x64_sys_sendto+0xe0/0x1b0 net/socket.c:2184 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88806ef9d828 which belongs to the cache kernfs_node_cache of size 168 The buggy address is located 48 bytes to the right of allocated 168-byte region [ffff88806ef9d828, ffff88806ef9d8d0) The buggy address belongs to the physical page: page:ffffea0001bbe740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6ef9d flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888014e48dc0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000110011 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 5405, tgid 5405 (syz-executor.2), ts 94857683351, free_ts 71238702213 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x10d7/0x31b0 mm/page_alloc.c:3219 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4475 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2298 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8be/0x1570 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc+0x392/0x3b0 mm/slub.c:3502 kmem_cache_zalloc include/linux/slab.h:711 [inline] __kernfs_new_node+0xd3/0x8a0 fs/kernfs/dir.c:615 kernfs_new_node+0x94/0x110 fs/kernfs/dir.c:679 __kernfs_create_file+0x53/0x340 fs/kernfs/file.c:1047 sysfs_add_file_mode_ns+0x1ff/0x3b0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x31c/0xb40 fs/sysfs/group.c:152 internal_create_groups+0x9d/0x150 fs/sysfs/group.c:192 device_add_groups drivers/base/core.c:2726 [inline] device_add_attrs drivers/base/core.c:2835 [inline] device_add+0x710/0x1b40 drivers/base/core.c:3577 netdev_register_kobject+0x183/0x3f0 net/core/net-sysfs.c:2044 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2348 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2441 release_pages+0x51b/0x14e0 mm/swap.c:1008 tlb_batch_pages_flush+0x9a/0x190 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x14b/0x6f0 mm/mmu_gather.c:391 exit_mmap+0x38b/0xa60 mm/mmap.c:3223 __mmput+0x12a/0x4d0 kernel/fork.c:1356 mmput+0x62/0x70 kernel/fork.c:1378 exit_mm kernel/exit.c:567 [inline] do_exit+0x9b4/0x2a20 kernel/exit.c:861 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024 get_signal+0x23d1/0x27b0 kernel/signal.c:2892 arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x11f/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:297 do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88806ef9d800: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 ffff88806ef9d880: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc >ffff88806ef9d900: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88806ef9d980: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 ffff88806ef9da00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================