================================================================== BUG: KASAN: use-after-free in crc_itu_t+0x218/0x2a0 lib/crc-itu-t.c:60 Read of size 1 at addr ffff888040080000 by task syz-executor.3/29274 CPU: 1 PID: 29274 Comm: syz-executor.3 Not tainted 6.1.72-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 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 crc_itu_t+0x218/0x2a0 lib/crc-itu-t.c:60 udf_finalize_lvid fs/udf/super.c:2022 [inline] udf_sync_fs+0x1ce/0x380 fs/udf/super.c:2378 iterate_supers+0x127/0x1e0 fs/super.c:746 ksys_sync+0xc8/0x1c0 fs/sync.c:103 __do_sys_sync+0xa/0x10 fs/sync.c:113 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fcd5007cda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcd4ebfe0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2 RAX: ffffffffffffffda RBX: 00007fcd501ac120 RCX: 00007fcd5007cda9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007fcd500c947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fcd501ac120 R15: 00007ffc3ec43878 Allocated by task 27785: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/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] kmem_cache_alloc_node+0x136/0x310 mm/slub.c:3443 alloc_task_struct_node kernel/fork.c:171 [inline] dup_task_struct+0x57/0x6d0 kernel/fork.c:980 copy_process+0x637/0x4060 kernel/fork.c:2098 kernel_clone+0x222/0x920 kernel/fork.c:2682 __do_sys_clone3 kernel/fork.c:2981 [inline] __se_sys_clone3+0x373/0x410 kernel/fork.c:2965 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 27872: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____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:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x292/0x510 mm/slub.c:3683 rcu_do_batch kernel/rcu/tree.c:2264 [inline] rcu_core+0xad4/0x17e0 kernel/rcu/tree.c:2524 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 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:2812 delayed_free_task kernel/fork.c:1958 [inline] copy_process+0x2ece/0x4060 kernel/fork.c:2567 kernel_clone+0x222/0x920 kernel/fork.c:2682 __do_sys_clone3 kernel/fork.c:2981 [inline] __se_sys_clone3+0x373/0x410 kernel/fork.c:2965 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888040080000 which belongs to the cache task_struct of size 7360 The buggy address is located 0 bytes inside of 7360-byte region [ffff888040080000, ffff888040081cc0) The buggy address belongs to the physical page: page:ffffea0001002000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x40080 head:ffffea0001002000 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff888021858f41 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888140008500 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff888021858f41 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 27785, tgid 27785 (syz-executor.5), ts 938364369849, free_ts 938022244711 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513 prep_new_page mm/page_alloc.c:2520 [inline] get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5545 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+0x1cf/0x310 mm/slub.c:3443 alloc_task_struct_node kernel/fork.c:171 [inline] dup_task_struct+0x57/0x6d0 kernel/fork.c:980 copy_process+0x637/0x4060 kernel/fork.c:2098 kernel_clone+0x222/0x920 kernel/fork.c:2682 __do_sys_clone3 kernel/fork.c:2981 [inline] __se_sys_clone3+0x373/0x410 kernel/fork.c:2965 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1440 [inline] free_pcp_prepare mm/page_alloc.c:1490 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3358 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3453 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x156/0x170 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305 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] __kmem_cache_alloc_node+0x137/0x260 mm/slub.c:3437 kmalloc_node_trace+0x23/0xe0 mm/slab_common.c:1058 kmalloc_node include/linux/slab.h:575 [inline] kzalloc_node include/linux/slab.h:700 [inline] __get_vm_area_node+0x126/0x360 mm/vmalloc.c:2498 __vmalloc_node_range+0x394/0x1460 mm/vmalloc.c:3183 __vmalloc_node mm/vmalloc.c:3288 [inline] vzalloc+0x75/0x80 mm/vmalloc.c:3361 alloc_counters+0xd0/0x7b0 net/ipv4/netfilter/ip_tables.c:801 copy_entries_to_user net/ipv4/netfilter/arp_tables.c:681 [inline] get_entries net/ipv4/netfilter/arp_tables.c:867 [inline] do_arpt_get_ctl+0xe5d/0x1690 net/ipv4/netfilter/arp_tables.c:1453 nf_getsockopt+0x28e/0x2b0 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x21a/0x2d0 net/ipv4/ip_sockglue.c:1824 tcp_getsockopt+0x15c/0x1c0 net/ipv4/tcp.c:4432 Memory state around the buggy address: ffff88804007ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804007ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888040080000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888040080080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888040080100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================