================================================================== BUG: KASAN: use-after-free in __ref_is_percpu include/linux/percpu-refcount.h:174 [inline] BUG: KASAN: use-after-free in percpu_ref_get_many include/linux/percpu-refcount.h:204 [inline] BUG: KASAN: use-after-free in percpu_ref_get include/linux/percpu-refcount.h:222 [inline] BUG: KASAN: use-after-free in obj_cgroup_get include/linux/memcontrol.h:770 [inline] BUG: KASAN: use-after-free in refill_obj_stock+0x67c/0x6d0 mm/memcontrol.c:3043 Read of size 8 at addr ffff888032b52f80 by task syz.4.538/8006 CPU: 1 UID: 0 PID: 8006 Comm: syz.4.538 Not tainted 6.16.0-rc6-syzkaller-00281-gf4a40a4282f4 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x610 mm/kasan/report.c:480 kasan_report+0xe0/0x110 mm/kasan/report.c:593 __ref_is_percpu include/linux/percpu-refcount.h:174 [inline] percpu_ref_get_many include/linux/percpu-refcount.h:204 [inline] percpu_ref_get include/linux/percpu-refcount.h:222 [inline] obj_cgroup_get include/linux/memcontrol.h:770 [inline] refill_obj_stock+0x67c/0x6d0 mm/memcontrol.c:3043 __memcg_slab_free_hook+0x2db/0x5d0 mm/memcontrol.c:3217 memcg_slab_free_hook mm/slub.c:2206 [inline] slab_free mm/slub.c:4640 [inline] kmem_cache_free+0x37e/0x4d0 mm/slub.c:4745 anon_vma_chain_free mm/rmap.c:147 [inline] unlink_anon_vmas+0x173/0x820 mm/rmap.c:421 free_pgtables+0x373/0xcb0 mm/memory.c:402 exit_mmap+0x3fb/0xb90 mm/mmap.c:1295 __mmput+0x12a/0x410 kernel/fork.c:1121 mmput+0x62/0x70 kernel/fork.c:1144 exit_mm kernel/exit.c:581 [inline] do_exit+0x7c4/0x2bd0 kernel/exit.c:952 do_group_exit+0xd3/0x2a0 kernel/exit.c:1105 get_signal+0x2673/0x26d0 kernel/signal.c:3034 arch_do_signal_or_restart+0x8f/0x7d0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x84/0x110 kernel/entry/common.c:111 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x3f6/0x4c0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f13bdb8e9a9 Code: Unable to access opcode bytes at 0x7f13bdb8e97f. RSP: 002b:00007f13be9ca0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f13bddb6168 RCX: 00007f13bdb8e9a9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f13bddb6168 RBP: 00007f13bddb6160 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f13bddb616c R13: 0000000000000000 R14: 00007ffc34c6c9c0 R15: 00007ffc34c6caa8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x32b52 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0000a46488 ffffea0001cea308 0000000000000000 raw: ffff888000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2cc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN), pid 7979, tgid 7979 (syz.1.533), ts 264098165527, free_ts 264105802829 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419 alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline] alloc_pages_noprof+0x131/0x390 mm/mempolicy.c:2510 vm_area_alloc_pages mm/vmalloc.c:3642 [inline] __vmalloc_area_node mm/vmalloc.c:3720 [inline] __vmalloc_node_range_noprof+0x72f/0x14b0 mm/vmalloc.c:3893 __vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:3956 __snd_dma_alloc_pages+0x50/0x90 sound/core/memalloc.c:45 snd_dma_alloc_dir_pages+0x151/0x240 sound/core/memalloc.c:79 do_alloc_pages+0x115/0x280 sound/core/pcm_memory.c:69 snd_pcm_lib_malloc_pages+0x3df/0x980 sound/core/pcm_memory.c:455 snd_pcm_hw_params+0x15e1/0x1b40 sound/core/pcm_native.c:790 snd_pcm_kernel_ioctl+0x147/0x2e0 sound/core/pcm_native.c:3457 snd_pcm_oss_change_params_locked+0x1432/0x3a30 sound/core/oss/pcm_oss.c:965 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1104 [inline] snd_pcm_oss_make_ready+0xe6/0x1b0 sound/core/oss/pcm_oss.c:1163 snd_pcm_oss_sync+0x1de/0x840 sound/core/oss/pcm_oss.c:1729 page last free pid 7979 tgid 7979 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 vfree+0x1fd/0xb50 mm/vmalloc.c:3434 snd_dma_free_pages+0x51/0x70 sound/core/memalloc.c:132 do_free_pages sound/core/pcm_memory.c:88 [inline] do_free_pages sound/core/pcm_memory.c:83 [inline] snd_pcm_lib_free_pages+0x172/0x390 sound/core/pcm_memory.c:495 do_hw_free sound/core/pcm_native.c:905 [inline] snd_pcm_release_substream.part.0+0x2a8/0x340 sound/core/pcm_native.c:2729 snd_pcm_release_substream+0x5b/0x70 sound/core/pcm_native.c:2723 snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2397 [inline] snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2389 [inline] snd_pcm_oss_release+0x16f/0x310 sound/core/oss/pcm_oss.c:2576 __fput+0x3ff/0xb70 fs/file_table.c:465 task_work_run+0x14d/0x240 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xeb/0x110 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x3f6/0x4c0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888032b52e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888032b52f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888032b52f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888032b53000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888032b53080: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 ==================================================================