================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x5e9/0x7a0 fs/udf/inode.c:2105 Write of size 4 at addr ffff88805ab92ff0 by task syz.4.339/5023 CPU: 1 PID: 5023 Comm: syz.4.339 Not tainted 6.1.113-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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:4106 do_mkdirat+0x225/0x360 fs/namei.c:4131 __do_sys_mkdirat fs/namei.c:4146 [inline] __se_sys_mkdirat fs/namei.c:4144 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4144 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:0x7f682717c897 Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 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:00007f6826ffee68 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f6826ffeef0 RCX: 00007f682717c897 RDX: 00000000000001ff RSI: 0000000020000040 RDI: 00000000ffffff9c RBP: 0000000020000000 R08: 00000000200000c0 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000246 R12: 0000000020000040 R13: 00007f6826ffeeb0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3095: 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] kzalloc include/linux/slab.h:693 [inline] kernfs_fop_open+0x3e3/0xcc0 fs/kernfs/file.c:672 do_dentry_open+0x7f9/0x10f0 fs/open.c:882 do_open fs/namei.c:3626 [inline] path_openat+0x2644/0x2e60 fs/namei.c:3783 do_filp_open+0x230/0x480 fs/namei.c:3810 do_sys_openat2+0x13b/0x4f0 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_openat fs/open.c:1350 [inline] __se_sys_openat fs/open.c:1345 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1345 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 Freed by task 3095: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0x25c/0x3c0 mm/slub.c:3674 kernfs_fop_release+0x15c/0x190 fs/kernfs/file.c:810 __fput+0x3f6/0x8d0 fs/file_table.c:320 task_work_run+0x246/0x300 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88805ab92c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 496 bytes to the right of 512-byte region [ffff88805ab92c00, ffff88805ab92e00) The buggy address belongs to the physical page: page:ffffea00016ae400 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805ab92c00 pfn:0x5ab90 head:ffffea00016ae400 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888017c41c80 raw: ffff88805ab92c00 000000008010000c 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 0xd28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3640, tgid 3640 (syz-executor), ts 55422571016, free_ts 11871812803 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:935 [inline] __kmalloc_node_track_caller+0xa0/0x220 mm/slab_common.c:956 kmalloc_reserve net/core/skbuff.c:446 [inline] pskb_expand_head+0x18c/0x10e0 net/core/skbuff.c:1848 netlink_trim+0x183/0x220 net/netlink/af_netlink.c:1308 netlink_broadcast+0x5b/0x10b0 net/netlink/af_netlink.c:1502 nlmsg_multicast include/net/netlink.h:1071 [inline] nlmsg_notify+0xfb/0x1c0 net/netlink/af_netlink.c:2551 rtmsg_fib+0x39f/0x620 net/ipv4/fib_semantics.c:542 fib_table_insert+0xfb6/0x1f20 net/ipv4/fib_trie.c:1404 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 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_contig_range+0x9a/0x150 mm/page_alloc.c:9518 destroy_args+0xfe/0x997 mm/debug_vm_pgtable.c:1031 debug_vm_pgtable+0x416/0x46b mm/debug_vm_pgtable.c:1354 do_one_initcall+0x265/0x8f0 init/main.c:1298 do_initcall_level+0x157/0x207 init/main.c:1371 do_initcalls+0x49/0x86 init/main.c:1387 kernel_init_freeable+0x45c/0x60f init/main.c:1626 kernel_init+0x19/0x290 init/main.c:1514 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88805ab92e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805ab92f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805ab92f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805ab93000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805ab93080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================