================================================================== BUG: KASAN: slab-use-after-free in udf_free_blocks+0x11f3/0x1330 fs/udf/balloc.c:677 Read of size 2 at addr ffff88802c43c682 by task syz-executor174/12061 CPU: 0 PID: 12061 Comm: syz-executor174 Not tainted 6.4.0-next-20230707-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:364 print_report mm/kasan/report.c:475 [inline] kasan_report+0x11d/0x130 mm/kasan/report.c:588 udf_free_blocks+0x11f3/0x1330 fs/udf/balloc.c:677 udf_split_extents fs/udf/inode.c:954 [inline] inode_getblk+0x3473/0x3e50 fs/udf/inode.c:889 udf_map_block+0x2e9/0x560 fs/udf/inode.c:446 __udf_get_block+0x9c/0x330 fs/udf/inode.c:460 __block_write_begin_int+0x3b1/0x14a0 fs/buffer.c:2128 __block_write_begin fs/buffer.c:2178 [inline] block_write_begin+0xb9/0x4d0 fs/buffer.c:2237 udf_write_begin+0x28b/0x370 fs/udf/inode.c:261 generic_perform_write+0x26b/0x5d0 mm/filemap.c:3925 __generic_file_write_iter+0x1f8/0x240 mm/filemap.c:4020 udf_file_write_iter+0x239/0x740 fs/udf/file.c:111 call_write_iter include/linux/fs.h:1873 [inline] do_iter_readv_writev+0x211/0x3b0 fs/read_write.c:735 do_iter_write+0x182/0x810 fs/read_write.c:860 vfs_iter_write+0x7a/0xb0 fs/read_write.c:901 iter_file_splice_write+0x73b/0xc70 fs/splice.c:738 do_splice_from fs/splice.c:933 [inline] direct_splice_actor+0x11a/0x190 fs/splice.c:1142 splice_direct_to_actor+0x366/0xa00 fs/splice.c:1088 do_splice_direct+0x1aa/0x280 fs/splice.c:1194 do_sendfile+0xb9c/0x1380 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1322 [inline] __se_sys_sendfile64 fs/read_write.c:1308 [inline] __x64_sys_sendfile64+0x1d0/0x210 fs/read_write.c:1308 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fd37be818c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 15 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:00007fd37be2d2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007fd37bf077e0 RCX: 00007fd37be818c9 RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000006 RBP: 00007fd37bed3ce8 R08: 0000000000000000 R09: 0000000000000000 R10: 0001000000201005 R11: 0000000000000246 R12: 6573726168636f69 R13: 0030656c69662f2e R14: 0031656c69662f2e R15: 00007fd37bf077e8 Allocated by task 12036: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3470 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x173/0x390 mm/slub.c:3494 vm_area_alloc+0x20/0x140 kernel/fork.c:485 mmap_region+0x42d/0x20a0 mm/mmap.c:2725 do_mmap+0x837/0xea0 mm/mmap.c:1362 vm_mmap_pgoff+0x1b1/0x280 mm/util.c:543 ksys_mmap_pgoff+0x7d/0x5b0 mm/mmap.c:1408 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 12049: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1792 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1818 slab_free mm/slub.c:3801 [inline] kmem_cache_free+0xf0/0x490 mm/slub.c:3823 remove_vma+0x11b/0x160 mm/mmap.c:146 exit_mmap+0x359/0x820 mm/mmap.c:3218 __mmput+0x128/0x4c0 kernel/fork.c:1353 mmput+0x60/0x70 kernel/fork.c:1375 exit_mm kernel/exit.c:567 [inline] do_exit+0x9a7/0x29a0 kernel/exit.c:861 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024 get_signal+0x249b/0x25f0 kernel/signal.c:2877 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x11f/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88802c43c658 which belongs to the cache vm_area_struct of size 168 The buggy address is located 42 bytes inside of freed 168-byte region [ffff88802c43c658, ffff88802c43c700) The buggy address belongs to the physical page: page:ffffea0000b10f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c43c ksm flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff888014674b40 ffffea0001d3da00 dead000000000007 raw: 0000000000000000 0000000000110011 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 4467, tgid 4467 (klogd), ts 31561453781, free_ts 31543815695 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1569 prep_new_page mm/page_alloc.c:1576 [inline] get_page_from_freelist+0xfd9/0x2c40 mm/page_alloc.c:3256 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4512 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1862 [inline] allocate_slab+0x25f/0x390 mm/slub.c:2009 new_slab mm/slub.c:2062 [inline] ___slab_alloc+0xbc3/0x15d0 mm/slub.c:3215 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3314 __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x371/0x390 mm/slub.c:3494 vm_area_alloc+0x20/0x140 kernel/fork.c:485 mmap_region+0x42d/0x20a0 mm/mmap.c:2725 do_mmap+0x837/0xea0 mm/mmap.c:1362 vm_mmap_pgoff+0x1b1/0x280 mm/util.c:543 ksys_mmap_pgoff+0x42b/0x5b0 mm/mmap.c:1408 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 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:1160 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2383 free_unref_page_list+0xe3/0xa70 mm/page_alloc.c:2524 release_pages+0xcd8/0x1380 mm/swap.c:1042 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x14b/0x7e0 mm/mmu_gather.c:391 exit_mmap+0x2cd/0x820 mm/mmap.c:3208 __mmput+0x128/0x4c0 kernel/fork.c:1353 mmput+0x60/0x70 kernel/fork.c:1375 exit_mm kernel/exit.c:567 [inline] do_exit+0x9a7/0x29a0 kernel/exit.c:861 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1033 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88802c43c580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802c43c600: 00 00 00 fc fc fc fc fc fc fc fc fa fb fb fb fb >ffff88802c43c680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802c43c700: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff88802c43c780: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ================================================================== Kernel paSeaBIOS (version 1.8.2-google)