UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) ================================================================== BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x5ed/0x7a0 fs/udf/inode.c:2088 Write of size 4 at addr ffff88801d805ff0 by task syz-executor.4/14458 CPU: 0 PID: 14458 Comm: syz-executor.4 Not tainted 6.2.0-syzkaller-00081-g91bc559d8d3a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x163/0x4f0 mm/kasan/report.c:417 kasan_report+0x13a/0x170 mm/kasan/report.c:517 udf_write_aext+0x5ed/0x7a0 fs/udf/inode.c:2088 udf_add_entry+0x17bb/0x3360 fs/udf/namei.c:482 udf_mkdir+0x1ac/0xaa0 fs/udf/namei.c:681 vfs_mkdir+0x29d/0x450 fs/namei.c:4038 do_mkdirat+0x264/0x520 fs/namei.c:4061 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4079 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0ae7a8c0f9 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:00007f0ae8893168 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007f0ae7babf80 RCX: 00007f0ae7a8c0f9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f0ae7ae7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffb12415cf R14: 00007f0ae8893300 R15: 0000000000022000 Allocated by task 14458: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x80 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x9b/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc+0xb3/0x1a0 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] tomoyo_realpath_from_path+0xcf/0x5e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x210/0x840 security/tomoyo/file.c:723 tomoyo_path_mkdir+0xe7/0x120 security/tomoyo/tomoyo.c:178 security_path_mkdir+0xe0/0x130 security/security.c:1188 do_mkdirat+0x1a3/0x520 fs/namei.c:4058 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4079 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 14458: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:523 ____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:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0x264/0x3c0 mm/slub.c:3800 tomoyo_realpath_from_path+0x5a3/0x5e0 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x210/0x840 security/tomoyo/file.c:723 tomoyo_path_mkdir+0xe7/0x120 security/tomoyo/tomoyo.c:178 security_path_mkdir+0xe0/0x130 security/security.c:1188 do_mkdirat+0x1a3/0x520 fs/namei.c:4058 __do_sys_mkdir fs/namei.c:4081 [inline] __se_sys_mkdir fs/namei.c:4079 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4079 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88801d804000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 4080 bytes to the right of 4096-byte region [ffff88801d804000, ffff88801d805000) The buggy address belongs to the physical page: page:ffffea0000760000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d800 head:ffffea0000760000 order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012442140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 6116, tgid 6116 (kworker/0:11), ts 620791663176, free_ts 620778500537 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x3449/0x35c0 mm/page_alloc.c:4283 __alloc_pages+0x291/0x7e0 mm/page_alloc.c:5549 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x1b8/0x2a0 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0xa0/0x190 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] __alloc_skb+0x130/0x2d0 net/core/skbuff.c:565 alloc_skb include/linux/skbuff.h:1270 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:751 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:808 [inline] nsim_dev_trap_report_work+0x250/0xa90 drivers/net/netdevsim/dev.c:853 process_one_work+0x8fa/0x1370 kernel/workqueue.c:2289 worker_thread+0xa63/0x1210 kernel/workqueue.c:2436 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 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 mm/page_alloc.c:1496 [inline] free_unref_page_prepare+0xf3a/0x1040 mm/page_alloc.c:3369 free_unref_page+0x37/0x3f0 mm/page_alloc.c:3464 discard_slab mm/slub.c:2098 [inline] __unfreeze_partials+0x1b1/0x1f0 mm/slub.c:2637 put_cpu_partial+0x116/0x180 mm/slub.c:2713 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x15a/0x170 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x68/0x390 mm/slab.h:761 slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x12c/0x280 mm/slub.c:3476 getname_flags+0xbc/0x4e0 fs/namei.c:140 vfs_fstatat fs/stat.c:275 [inline] __do_sys_newfstatat fs/stat.c:446 [inline] __se_sys_newfstatat+0xe0/0x7a0 fs/stat.c:440 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88801d805e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801d805f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801d805f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801d806000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801d806080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================