UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) loop_set_status: loop4 () has still dirty pages (nrpages=3) ================================================================== BUG: KASAN: slab-out-of-bounds in udf_readdir+0xcaa/0x2170 fs/udf/dir.c:182 Write of size 105 at addr ffff888076b67496 by task syz.4.10/3677 CPU: 1 PID: 3677 Comm: syz.4.10 Not tainted 5.15.166-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/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:0x7f1282372ef9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f12807eb038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f128252af80 RCX: 00007f1282372ef9 RDX: 0000000000001000 RSI: 0000000020000f80 RDI: 0000000000000008 RBP: 00007f12823e59f6 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f128252af80 R15: 00007fff331be1a8 Allocated by task 3677: 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 The buggy address belongs to the object at ffff888076b67400 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 150 bytes inside of 256-byte region [ffff888076b67400, ffff888076b67500) The buggy address belongs to the page: page:ffffea0001dad980 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x76b66 head:ffffea0001dad980 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888017041b40 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3666, ts 60484250463, free_ts 60477141344 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] kmem_cache_alloc_trace+0x1a0/0x290 mm/slub.c:3245 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] set_kthread_struct kernel/kthread.c:103 [inline] kthread+0x10a/0x4f0 kernel/kthread.c:296 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 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 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] __kmalloc_node+0x151/0x390 mm/slub.c:4451 kmalloc_node include/linux/slab.h:614 [inline] kvmalloc_node+0x80/0x140 mm/util.c:619 xt_jumpstack_alloc net/netfilter/x_tables.c:1354 [inline] xt_replace_table+0x15c/0x7b0 net/netfilter/x_tables.c:1393 __do_replace+0x192/0xae0 net/ipv6/netfilter/ip6_tables.c:1083 do_replace net/ipv6/netfilter/ip6_tables.c:1160 [inline] do_ip6t_set_ctl+0xe9a/0x1220 net/ipv6/netfilter/ip6_tables.c:1646 nf_setsockopt+0x28a/0x2b0 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x2f9a/0x4380 net/ipv6/ipv6_sockglue.c:1014 tcp_setsockopt+0x23f/0x3680 net/ipv4/tcp.c:3713 __sys_setsockopt+0x57e/0x990 net/socket.c:2198 Memory state around the buggy address: ffff888076b67380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888076b67400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888076b67480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 ^ ffff888076b67500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888076b67580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================