================================================================== BUG: KASAN: slab-out-of-bounds in udf_readdir+0xcaa/0x2170 fs/udf/dir.c:182 Write of size 201 at addr ffff88805cd27636 by task syz-executor.4/6691 CPU: 1 PID: 6691 Comm: syz-executor.4 Not tainted 5.15.156-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 udf_readdir+0xcaa/0x2170 fs/udf/dir.c:182 iterate_dir+0x224/0x570 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fd6253c03a3 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 52 8b fa ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 b0 ff ff ff f7 d8 RSP: 002b:00007fff42c84978 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000555556b3c9b0 RCX: 00007fd6253c03a3 RDX: 0000000000008000 RSI: 0000555556b3c9b0 RDI: 0000000000000006 RBP: 0000555556b3c984 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffb0 R13: 0000000000000016 R14: 0000555556b3c980 R15: 0000000000000015 Allocated by task 6691: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247 kmalloc include/linux/slab.h:591 [inline] udf_readdir+0xbc6/0x2170 fs/udf/dir.c:172 iterate_dir+0x224/0x570 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 kvfree_call_rcu+0x118/0x8a0 kernel/rcu/tree.c:3596 drop_sysctl_table+0x317/0x460 fs/proc/proc_sysctl.c:1680 unregister_sysctl_table+0x88/0x130 fs/proc/proc_sysctl.c:1718 mptcp_pernet_del_table net/mptcp/ctrl.c:151 [inline] mptcp_net_exit+0x59/0x70 net/mptcp/ctrl.c:181 ops_exit_list net/core/net_namespace.c:169 [inline] cleanup_net+0x6ce/0xb60 net/core/net_namespace.c:596 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300 The buggy address belongs to the object at ffff88805cd27600 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 54 bytes inside of 256-byte region [ffff88805cd27600, ffff88805cd27700) The buggy address belongs to the page: page:ffffea0001734980 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5cd26 head:ffffea0001734980 order:1 compound_mapcount:0 flags: 0xfff80000010200(slab|head|node=0|zone=1|lastcpupid=0xfff) raw: 00fff80000010200 ffffea0001e3f700 0000000600000006 ffff888011c41b40 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 144, ts 88012578556, free_ts 86597838893 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x1c9/0x300 mm/slub.c:4403 kmalloc include/linux/slab.h:596 [inline] kmem_alloc+0x136/0x380 fs/xfs/kmem.c:21 kmem_zalloc fs/xfs/kmem.h:69 [inline] xlog_cil_ctx_alloc fs/xfs/xfs_log_cil.c:61 [inline] xlog_cil_push_work+0x14d/0x1440 fs/xfs/xfs_log_cil.c:880 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 free_slab mm/slub.c:2015 [inline] discard_slab mm/slub.c:2021 [inline] __unfreeze_partials+0x1b7/0x210 mm/slub.c:2507 put_cpu_partial+0x132/0x1a0 mm/slub.c:2587 do_slab_free mm/slub.c:3487 [inline] ___cache_free+0xe3/0x100 mm/slub.c:3506 qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x53/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x120/0x300 mm/slub.c:4403 kmalloc include/linux/slab.h:596 [inline] tomoyo_realpath_from_path+0xd8/0x5e0 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x22c/0x490 security/tomoyo/file.c:771 security_file_open+0x5f/0xa0 security/security.c:1668 do_dentry_open+0x315/0xfb0 fs/open.c:813 do_open fs/namei.c:3608 [inline] path_openat+0x2705/0x2f20 fs/namei.c:3742 do_filp_open+0x21c/0x460 fs/namei.c:3769 Memory state around the buggy address: ffff88805cd27580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805cd27600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805cd27680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff88805cd27700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805cd27780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================