loop0: detected capacity change from 0 to 1024 ================================================================== BUG: KASAN: slab-use-after-free in hfsplus_read_wrapper+0xf86/0x1070 fs/hfsplus/wrapper.c:226 Read of size 2 at addr ffff88802aa26c00 by task syz-executor.0/5599 CPU: 3 PID: 5599 Comm: syz-executor.0 Not tainted 6.9.0-syzkaller-11924-gde7e71ef8bed #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 hfsplus_read_wrapper+0xf86/0x1070 fs/hfsplus/wrapper.c:226 hfsplus_fill_super+0x352/0x1bc0 fs/hfsplus/super.c:419 mount_bdev+0x1e3/0x2d0 fs/super.c:1659 legacy_get_tree+0x109/0x220 fs/fs_context.c:662 vfs_get_tree+0x8f/0x380 fs/super.c:1780 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x297/0x320 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8ee3c7f5aa Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f8ee4ad0ef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f8ee4ad0f80 RCX: 00007f8ee3c7f5aa RDX: 0000000020000600 RSI: 0000000020000640 RDI: 00007f8ee4ad0f40 RBP: 0000000020000600 R08: 00007f8ee4ad0f80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020000640 R13: 00007f8ee4ad0f40 R14: 00000000000005d3 R15: 0000000020000680 The buggy address belongs to the object at ffff88802aa26c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of freed 512-byte region [ffff88802aa26c00, ffff88802aa26e00) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802aa27c00 pfn:0x2aa24 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 00fff00000000240 ffff888015442c80 ffffea0000962410 ffffea00009d3a10 raw: ffff88802aa27c00 000000000010000e 00000001ffffefff 0000000000000000 head: 00fff00000000240 ffff888015442c80 ffffea0000962410 ffffea00009d3a10 head: ffff88802aa27c00 000000000010000e 00000001ffffefff 0000000000000000 head: 00fff00000000002 ffffea0000aa8901 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5240, tgid 5240 (kworker/u32:5), ts 66241364702, free_ts 65958354716 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x136a/0x2df0 mm/page_alloc.c:3402 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4660 __alloc_pages_node_noprof include/linux/gfp.h:244 [inline] alloc_pages_node_noprof include/linux/gfp.h:271 [inline] alloc_slab_page+0x56/0x110 mm/slub.c:2264 allocate_slab mm/slub.c:2427 [inline] new_slab+0x84/0x260 mm/slub.c:2480 ___slab_alloc+0xdac/0x1870 mm/slub.c:3666 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] kmalloc_trace_noprof+0x2c5/0x310 mm/slub.c:4147 kmalloc_noprof include/linux/slab.h:660 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] tomoyo_find_next_domain+0x102/0x2020 security/tomoyo/domain.c:710 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline] tomoyo_bprm_check_security+0x12e/0x1d0 security/tomoyo/tomoyo.c:92 security_bprm_check+0x65/0xb0 security/security.c:1191 search_binary_handler fs/exec.c:1785 [inline] exec_binprm fs/exec.c:1839 [inline] bprm_execve fs/exec.c:1891 [inline] bprm_execve+0x642/0x19b0 fs/exec.c:1867 kernel_execve+0x3cf/0x4e0 fs/exec.c:2058 call_usermodehelper_exec_async+0x255/0x4c0 kernel/umh.c:110 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 5203 tgid 5200 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2565 vfree+0x181/0x7a0 mm/vmalloc.c:3346 snd_dma_free_pages+0x51/0x70 sound/core/memalloc.c:126 do_free_pages sound/core/pcm_memory.c:89 [inline] do_free_pages sound/core/pcm_memory.c:84 [inline] snd_pcm_lib_free_pages+0x172/0x390 sound/core/pcm_memory.c:493 do_hw_free sound/core/pcm_native.c:888 [inline] snd_pcm_release_substream.part.0+0x2a8/0x340 sound/core/pcm_native.c:2706 snd_pcm_release_substream+0x5b/0x70 sound/core/pcm_native.c:2700 snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2398 [inline] snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2390 [inline] snd_pcm_oss_release+0x175/0x320 sound/core/oss/pcm_oss.c:2577 __fput+0x408/0xbb0 fs/file_table.c:422 __fput_sync+0x47/0x50 fs/file_table.c:507 __do_sys_close fs/open.c:1555 [inline] __se_sys_close fs/open.c:1540 [inline] __x64_sys_close+0x86/0x100 fs/open.c:1540 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88802aa26b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802aa26b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802aa26c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802aa26c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802aa26d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================