UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) ================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x5e9/0x7a0 fs/udf/inode.c:2105 Write of size 4 at addr ffff88807d7c33f0 by task syz.1.13/3752 CPU: 0 PID: 3752 Comm: syz.1.13 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:0x7fd20cf7c897 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:00007fd20cdfee68 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fd20cdfeef0 RCX: 00007fd20cf7c897 RDX: 00000000000001ff RSI: 0000000020000040 RDI: 00000000ffffff9c RBP: 0000000020000000 R08: 00000000200000c0 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000246 R12: 0000000020000040 R13: 00007fd20cdfeeb0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3752: 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:936 [inline] __kmalloc+0xb2/0x230 mm/slab_common.c:949 udf_new_inode+0x2f7/0xf10 udf_create+0x1f/0x140 fs/udf/namei.c:612 lookup_open fs/namei.c:3482 [inline] open_last_lookups fs/namei.c:3550 [inline] path_openat+0x12f1/0x2e60 fs/namei.c:3780 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 The buggy address belongs to the object at ffff88807d7c3000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 496 bytes to the right of 512-byte region [ffff88807d7c3000, ffff88807d7c3200) The buggy address belongs to the physical page: page:ffffea0001f5f000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7d7c0 head:ffffea0001f5f000 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888017c41c80 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3752, tgid 3751 (syz.1.13), ts 65438443665, free_ts 65430277506 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+0xa1/0x230 mm/slab_common.c:949 udf_new_inode+0x2f7/0xf10 udf_create+0x1f/0x140 fs/udf/namei.c:612 vfs_create+0x306/0x490 fs/namei.c:3184 do_mknodat+0x338/0x5a0 fs/namei.c:4035 __do_sys_mknod fs/namei.c:4068 [inline] __se_sys_mknod fs/namei.c:4066 [inline] __x64_sys_mknod+0x8a/0xa0 fs/namei.c:4066 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 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:683 [inline] fill_pool lib/debugobjects.c:169 [inline] debug_objects_fill_pool+0x641/0xa10 lib/debugobjects.c:607 debug_object_activate+0x32/0x4e0 lib/debugobjects.c:694 debug_rcu_head_queue kernel/rcu/rcu.h:190 [inline] call_rcu+0x93/0xa10 kernel/rcu/tree.c:2830 nf_hook_entries_free net/netfilter/core.c:88 [inline] __nf_register_net_hook+0x788/0x930 net/netfilter/core.c:445 nf_register_net_hook+0xac/0x180 net/netfilter/core.c:566 nf_register_net_hooks+0x3d/0x1a0 net/netfilter/core.c:582 ip6t_register_table+0x4d0/0x7b0 net/ipv6/netfilter/ip6_tables.c:1789 ip6table_security_table_init+0x3e/0x60 net/ipv6/netfilter/ip6table_security.c:45 xt_find_table_lock+0x2cc/0x3a0 net/netfilter/x_tables.c:1259 Memory state around the buggy address: ffff88807d7c3280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807d7c3300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807d7c3380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807d7c3400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807d7c3480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================