================================================================== BUG: KASAN: slab-out-of-bounds in udf_readdir+0xc5f/0x2240 fs/udf/dir.c:182 Write of size 149 at addr ffff88802da36c6a by task syz-executor/3634 CPU: 0 PID: 3634 Comm: syz-executor Not tainted 6.1.110-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/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 kasan_check_range+0x27f/0x290 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 udf_readdir+0xc5f/0x2240 fs/udf/dir.c:182 iterate_dir+0x224/0x560 __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:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f7a491b0093 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 52 43 f8 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 a8 ff ff ff f7 d8 RSP: 002b:00007ffd477a4fe8 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000555566fe3600 RCX: 00007f7a491b0093 RDX: 0000000000008000 RSI: 0000555566fe3600 RDI: 0000000000000005 RBP: 0000555566fe35d4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000010 R14: 0000555566fe35d0 R15: 00007ffd477a7290 Allocated by task 3634: 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] udf_readdir+0xb78/0x2240 fs/udf/dir.c:172 iterate_dir+0x224/0x560 __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:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 call_rcu+0x163/0xa10 kernel/rcu/tree.c:2845 rhashtable_rehash_table lib/rhashtable.c:345 [inline] rht_deferred_worker+0x1c4d/0x21e0 lib/rhashtable.c:429 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 kvfree_call_rcu+0x116/0x8c0 kernel/rcu/tree.c:3401 net_assign_generic net/core/net_namespace.c:117 [inline] ops_init+0x2d2/0x610 net/core/net_namespace.c:132 __register_pernet_operations net/core/net_namespace.c:1161 [inline] register_pernet_operations+0x2c7/0x650 net/core/net_namespace.c:1234 register_pernet_subsys+0x24/0x40 net/core/net_namespace.c:1275 tcf_register_action+0x8b/0x670 net/sched/act_api.c:981 ipt_init_module+0x41/0x87 net/sched/act_ipt.c:435 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 The buggy address belongs to the object at ffff88802da36c00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 106 bytes inside of 256-byte region [ffff88802da36c00, ffff88802da36d00) The buggy address belongs to the physical page: page:ffffea0000b68d80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2da36 head:ffffea0000b68d80 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017c41b40 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 9549216797, free_ts 0 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_page_interleave+0x22/0x1c0 mm/mempolicy.c:2115 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 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026 kmalloc include/linux/slab.h:557 [inline] tc_action_net_init include/net/act_api.h:153 [inline] police_init_net+0x61/0x190 net/sched/act_police.c:507 ops_init+0x35d/0x610 net/core/net_namespace.c:138 __register_pernet_operations net/core/net_namespace.c:1161 [inline] register_pernet_operations+0x2c7/0x650 net/core/net_namespace.c:1234 register_pernet_subsys+0x24/0x40 net/core/net_namespace.c:1275 tcf_register_action+0x8b/0x670 net/sched/act_api.c:981 do_one_initcall+0x265/0x8f0 init/main.c:1298 do_initcall_level+0x157/0x207 init/main.c:1371 page_owner free stack trace missing Memory state around the buggy address: ffff88802da36b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802da36c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802da36c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff88802da36d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802da36d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================