RDX: 0000000020000100 RSI: 00000000200000e0 RDI: 00000000c0000000
RBP: 00007f0ef35fb1d0 R08: 0000000020000180 R09: 0000000020000180
R10: 0000000020000140 R11: 0000000000000206 R12: 0000000000000002
R13: 00007ffd9021ec9f R14: 00007f0ef35fb300 R15: 0000000000022000
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: use-after-free in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:167 [inline]
BUG: KASAN: use-after-free in __refcount_sub_and_test include/linux/refcount.h:272 [inline]
BUG: KASAN: use-after-free in __refcount_dec_and_test include/linux/refcount.h:315 [inline]
BUG: KASAN: use-after-free in refcount_dec_and_test include/linux/refcount.h:333 [inline]
BUG: KASAN: use-after-free in kref_put include/linux/kref.h:64 [inline]
BUG: KASAN: use-after-free in anon_vma_name_put include/linux/mm_inline.h:343 [inline]
BUG: KASAN: use-after-free in free_anon_vma_name include/linux/mm_inline.h:374 [inline]
BUG: KASAN: use-after-free in vm_area_free+0x7e/0x230 kernel/fork.c:400
Write of size 4 at addr ffff88819100e749 by task syz-executor.1/25194
CPU: 0 PID: 25194 Comm: syz-executor.1 Not tainted 5.15.74-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
print_address_description+0x87/0x3d0 mm/kasan/report.c:256
__kasan_report mm/kasan/report.c:435 [inline]
kasan_report+0x1a6/0x1f0 mm/kasan/report.c:452
kasan_check_range+0x2aa/0x2e0 mm/kasan/generic.c:189
__kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37
instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:167 [inline]
__refcount_sub_and_test include/linux/refcount.h:272 [inline]
__refcount_dec_and_test include/linux/refcount.h:315 [inline]
refcount_dec_and_test include/linux/refcount.h:333 [inline]
kref_put include/linux/kref.h:64 [inline]
anon_vma_name_put include/linux/mm_inline.h:343 [inline]
free_anon_vma_name include/linux/mm_inline.h:374 [inline]
vm_area_free+0x7e/0x230 kernel/fork.c:400
dup_mmap+0xbcd/0xea0 kernel/fork.c:671
dup_mm+0x91/0x330 kernel/fork.c:1502
copy_mm+0x108/0x1b0 kernel/fork.c:1554
copy_process+0x1295/0x3250 kernel/fork.c:2245
kernel_clone+0x22d/0x990 kernel/fork.c:2646
__do_sys_clone kernel/fork.c:2772 [inline]
__se_sys_clone kernel/fork.c:2756 [inline]
__x64_sys_clone+0x289/0x310 kernel/fork.c:2756
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f0ef4887639
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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0ef35fb118 EFLAGS: 00000206 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007f0ef49a7f80 RCX: 00007f0ef4887639
RDX: 0000000020000100 RSI: 00000000200000e0 RDI: 00000000c0000000
RBP: 00007f0ef35fb1d0 R08: 0000000020000180 R09: 0000000020000180
R10: 0000000020000140 R11: 0000000000000206 R12: 0000000000000002
R13: 00007ffd9021ec9f R14: 00007f0ef35fb300 R15: 0000000000022000
Allocated by task 25165:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:433 [inline]
__kasan_slab_alloc+0xb2/0xe0 mm/kasan/common.c:466
kasan_slab_alloc include/linux/kasan.h:244 [inline]
slab_post_alloc_hook mm/slab.h:550 [inline]
slab_alloc_node mm/slub.c:3236 [inline]
slab_alloc mm/slub.c:3244 [inline]
kmem_cache_alloc+0x189/0x2f0 mm/slub.c:3249
vm_area_dup+0x26/0x1d0 kernel/fork.c:367
dup_mmap+0x6b8/0xea0 kernel/fork.c:591
dup_mm+0x91/0x330 kernel/fork.c:1502
copy_mm+0x108/0x1b0 kernel/fork.c:1554
copy_process+0x1295/0x3250 kernel/fork.c:2245
kernel_clone+0x22d/0x990 kernel/fork.c:2646
__do_sys_clone kernel/fork.c:2772 [inline]
__se_sys_clone kernel/fork.c:2756 [inline]
__x64_sys_clone+0x289/0x310 kernel/fork.c:2756
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
Freed by task 25166:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4c/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x126/0x160 mm/kasan/common.c:365
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
kasan_slab_free include/linux/kasan.h:220 [inline]
slab_free_hook mm/slub.c:1721 [inline]
slab_free_freelist_hook+0xc9/0x1a0 mm/slub.c:1747
slab_free mm/slub.c:3515 [inline]
kmem_cache_free+0x11a/0x2e0 mm/slub.c:3531
____vm_area_free kernel/fork.c:386 [inline]
vm_area_free+0x1ae/0x230 kernel/fork.c:412
remove_vma mm/mmap.c:190 [inline]
exit_mmap+0x5dd/0x7a0 mm/mmap.c:3205
__mmput+0x95/0x300 kernel/fork.c:1162
mmput+0x50/0x60 kernel/fork.c:1184
exit_mm+0x50d/0x760 kernel/exit.c:504
do_exit+0x63c/0x24d0 kernel/exit.c:815
__do_sys_exit kernel/exit.c:894 [inline]
__se_sys_exit kernel/exit.c:892 [inline]
__ia32_sys_exit+0x0/0x40 kernel/exit.c:892
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
The buggy address belongs to the object at ffff88819100e6f0
which belongs to the cache vm_area_struct of size 232
The buggy address is located 89 bytes inside of
232-byte region [ffff88819100e6f0, ffff88819100e7d8)
The buggy address belongs to the page:
page:ffffea0006440380 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x19100e
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 ffffea0004b5a480 0000000200000002 ffff888100275680
raw: 0000000000000000 00000000000d000d 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 20561, ts 2804503727277, free_ts 2804497286664
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1ab/0x1b0 mm/page_alloc.c:2495
prep_new_page mm/page_alloc.c:2501 [inline]
get_page_from_freelist+0x38b/0x400 mm/page_alloc.c:4281
__alloc_pages+0x3a8/0x7c0 mm/page_alloc.c:5548
allocate_slab+0x62/0x580 mm/slub.c:1928
new_slab mm/slub.c:1991 [inline]
___slab_alloc+0x2e2/0x6f0 mm/slub.c:3024
__slab_alloc+0x4a/0x90 mm/slub.c:3111
slab_alloc_node mm/slub.c:3202 [inline]
slab_alloc mm/slub.c:3244 [inline]
kmem_cache_alloc+0x205/0x2f0 mm/slub.c:3249
vm_area_dup+0x26/0x1d0 kernel/fork.c:367
dup_mmap+0x6b8/0xea0 kernel/fork.c:591
dup_mm+0x91/0x330 kernel/fork.c:1502
copy_mm+0x108/0x1b0 kernel/fork.c:1554
copy_process+0x1295/0x3250 kernel/fork.c:2245
kernel_clone+0x22d/0x990 kernel/fork.c:2646
__do_sys_clone kernel/fork.c:2772 [inline]
__se_sys_clone kernel/fork.c:2756 [inline]
__x64_sys_clone+0x289/0x310 kernel/fork.c:2756
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1364 [inline]
free_pcp_prepare+0x448/0x450 mm/page_alloc.c:1435
free_unref_page_prepare mm/page_alloc.c:3433 [inline]
free_unref_page_list+0x16a/0xad0 mm/page_alloc.c:3554
release_pages+0xf3e/0xf90 mm/swap.c:1010
free_pages_and_swap_cache+0x97/0xb0 mm/swap_state.c:320
tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:242 [inline]
tlb_flush_mmu+0x860/0xa00 mm/mmu_gather.c:249
tlb_finish_mmu+0xd2/0x1f0 mm/mmu_gather.c:340
exit_mmap+0x46e/0x7a0 mm/mmap.c:3199
__mmput+0x95/0x300 kernel/fork.c:1162
mmput+0x50/0x60 kernel/fork.c:1184
exit_mm+0x50d/0x760 kernel/exit.c:504
do_exit+0x63c/0x24d0 kernel/exit.c:815
do_group_exit+0x13a/0x300 kernel/exit.c:925
get_signal+0x77e/0x1600 kernel/signal.c:2890
arch_do_signal_or_restart+0x9f/0x670 arch/x86/kernel/signal.c:865
handle_signal_work kernel/entry/common.c:148 [inline]
exit_to_user_mode_loop+0xd4/0x110 kernel/entry/common.c:172
exit_to_user_mode_prepare kernel/entry/common.c:207 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
syscall_exit_to_user_mode+0x79/0xc0 kernel/entry/common.c:300
Memory state around the buggy address:
ffff88819100e600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88819100e680: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa fb
>ffff88819100e700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88819100e780: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc
ffff88819100e800: fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 25194 at lib/refcount.c:28 refcount_warn_saturate+0x165/0x1b0 lib/refcount.c:28
Modules linked in:
CPU: 0 PID: 25194 Comm: syz-executor.1 Tainted: G B 5.15.74-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:refcount_warn_saturate+0x165/0x1b0 lib/refcount.c:28
Code: c7 80 5b 87 85 31 c0 e8 d9 5e e0 fe 0f 0b eb 83 e8 30 f1 0e ff c6 05 7e 76 9f 04 01 48 c7 c7 e0 5b 87 85 31 c0 e8 bb 5e e0 fe <0f> 0b e9 62 ff ff ff e8 0f f1 0e ff c6 05 5e 76 9f 04 01 48 c7 c7
RSP: 0018:ffffc900026ef900 EFLAGS: 00010246
RAX: c6c55da633c3d500 RBX: 0000000000000003 RCX: 0000000000040000
RDX: ffffc90000e99000 RSI: 000000000003772e RDI: 000000000003772f
RBP: ffffc900026ef910 R08: ffffffff815838e9 R09: ffffed103ee065e8
R10: ffffed103ee065e8 R11: 1ffff1103ee065e7 R12: ffff8881168a12f0
R13: 1ffff11022d1425e R14: 0000000000000003 R15: ffff88819100e749
FS: 00007f0ef35fb700(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe60d25e78 CR3: 00000001176f5000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__refcount_sub_and_test include/linux/refcount.h:283 [inline]
__refcount_dec_and_test include/linux/refcount.h:315 [inline]
refcount_dec_and_test include/linux/refcount.h:333 [inline]
kref_put include/linux/kref.h:64 [inline]
anon_vma_name_put include/linux/mm_inline.h:343 [inline]
free_anon_vma_name include/linux/mm_inline.h:374 [inline]
vm_area_free+0x208/0x230 kernel/fork.c:400
dup_mmap+0xbcd/0xea0 kernel/fork.c:671
dup_mm+0x91/0x330 kernel/fork.c:1502
copy_mm+0x108/0x1b0 kernel/fork.c:1554
copy_process+0x1295/0x3250 kernel/fork.c:2245
kernel_clone+0x22d/0x990 kernel/fork.c:2646
__do_sys_clone kernel/fork.c:2772 [inline]
__se_sys_clone kernel/fork.c:2756 [inline]
__x64_sys_clone+0x289/0x310 kernel/fork.c:2756
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f0ef4887639
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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0ef35fb118 EFLAGS: 00000206 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007f0ef49a7f80 RCX: 00007f0ef4887639
RDX: 0000000020000100 RSI: 00000000200000e0 RDI: 00000000c0000000
RBP: 00007f0ef35fb1d0 R08: 0000000020000180 R09: 0000000020000180
R10: 0000000020000140 R11: 0000000000000206 R12: 0000000000000002
R13: 00007ffd9021ec9f R14: 00007f0ef35fb300 R15: 0000000000022000
---[ end trace 065a06073b2bb71c ]---