==================================================================
BUG: KASAN: use-after-free in __rb_insert lib/rbtree.c:115 [inline]
BUG: KASAN: use-after-free in __rb_insert_augmented+0xb7/0x720 lib/rbtree.c:459
Read of size 8 at addr ffff8881c0000008 by task syz-executor/8472
CPU: 0 PID: 8472 Comm: syz-executor Tainted: G W syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
__dump_stack+0x21/0x30 lib/dump_stack.c:88
dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0xf1/0x140 mm/kasan/report.c:444
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
__rb_insert lib/rbtree.c:115 [inline]
__rb_insert_augmented+0xb7/0x720 lib/rbtree.c:459
rb_insert_augmented include/linux/rbtree_augmented.h:50 [inline]
vma_interval_tree_insert_after+0x2a1/0x2b0 mm/interval_tree.c:57
dup_mmap kernel/fork.c:632 [inline]
dup_mm kernel/fork.c:1522 [inline]
copy_mm+0xb1a/0x1390 kernel/fork.c:1574
copy_process+0x115c/0x3210 kernel/fork.c:2348
kernel_clone+0x23f/0x940 kernel/fork.c:2737
__do_sys_clone kernel/fork.c:2863 [inline]
__se_sys_clone kernel/fork.c:2847 [inline]
__x64_sys_clone+0x176/0x1d0 kernel/fork.c:2847
x64_sys_call+0x41f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f3047626453
Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
RSP: 002b:00007fffaf36baa8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3047626453
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: 0000555565d017d0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000000927c0 R14: 00000000000495f6 R15: 00007fffaf36bc40
The buggy address belongs to the page:
page:ffffea0007000000 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x1c0000
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea0006ff8008 ffffea0007008008 0000000000000000
raw: 0000000000000000 0000000000000008 00000000ffffff7f 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 0x100cc0(GFP_USER), pid 5798, ts 184713776791, free_ts 190677932990
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605
prep_new_page+0x1c/0x110 mm/page_alloc.c:2611
get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485
__alloc_pages+0x18f/0x440 mm/page_alloc.c:5795
__alloc_pages_node include/linux/gfp.h:595 [inline]
alloc_pages_node include/linux/gfp.h:609 [inline]
alloc_pages include/linux/gfp.h:622 [inline]
__get_free_pages+0x10/0x30 mm/page_alloc.c:5832
kasan_populate_vmalloc_pte+0x29/0x120 mm/kasan/shadow.c:266
apply_to_pte_range mm/memory.c:2643 [inline]
apply_to_pmd_range mm/memory.c:2687 [inline]
apply_to_pud_range mm/memory.c:2723 [inline]
apply_to_p4d_range mm/memory.c:2759 [inline]
__apply_to_page_range+0x8b0/0xbf0 mm/memory.c:2795
apply_to_page_range+0x3b/0x50 mm/memory.c:2814
kasan_populate_vmalloc+0x60/0x70 mm/kasan/shadow.c:297
alloc_vmap_area+0x185c/0x1990 mm/vmalloc.c:1577
__get_vm_area_node+0x14e/0x350 mm/vmalloc.c:2440
get_vm_area_caller mm/vmalloc.c:2493 [inline]
vmap+0xba/0x270 mm/vmalloc.c:2783
bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:109 [inline]
bpf_ringbuf_alloc+0x299/0x470 kernel/bpf/ringbuf.c:136
ringbuf_map_alloc+0x1f6/0x320 kernel/bpf/ringbuf.c:176
find_and_alloc_map kernel/bpf/syscall.c:129 [inline]
map_create+0x455/0x21b0 kernel/bpf/syscall.c:860
__sys_bpf+0x2cf/0x730 kernel/bpf/syscall.c:4615
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1472 [inline]
free_pcp_prepare mm/page_alloc.c:1544 [inline]
free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534
free_unref_page+0xa2/0x550 mm/page_alloc.c:3616
free_the_page mm/page_alloc.c:805 [inline]
__free_pages+0x6c/0x100 mm/page_alloc.c:5871
free_pages+0x82/0x90 mm/page_alloc.c:5882
kasan_depopulate_vmalloc_pte+0x6b/0x90 mm/kasan/shadow.c:354
apply_to_pte_range mm/memory.c:2643 [inline]
apply_to_pmd_range mm/memory.c:2687 [inline]
apply_to_pud_range mm/memory.c:2723 [inline]
apply_to_p4d_range mm/memory.c:2759 [inline]
__apply_to_page_range+0x8b0/0xbf0 mm/memory.c:2795
apply_to_existing_page_range+0x38/0x50 mm/memory.c:2828
kasan_release_vmalloc+0x97/0xb0 mm/kasan/shadow.c:464
__purge_vmap_area_lazy+0xc05/0x1840 mm/vmalloc.c:1716
try_purge_vmap_area_lazy+0x38/0x50 mm/vmalloc.c:1735
free_vmap_area_noflush+0xa68/0xab0 mm/vmalloc.c:1777
free_unmap_vmap_area mm/vmalloc.c:1790 [inline]
remove_vm_area+0x1c1/0x1e0 mm/vmalloc.c:2545
vm_remove_mappings mm/vmalloc.c:2574 [inline]
__vunmap+0x267/0x9e0 mm/vmalloc.c:2643
vunmap+0x49/0x60 mm/vmalloc.c:2751
bpf_ringbuf_free kernel/bpf/ringbuf.c:193 [inline]
ringbuf_map_free+0x7a/0x110 kernel/bpf/ringbuf.c:204
map_create+0x1266/0x21b0 kernel/bpf/syscall.c:938
Memory state around the buggy address:
ffff8881bfffff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881bfffff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881c0000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881c0000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881c0000100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
general protection fault, probably for non-canonical address 0xff1f1b1f1f1f1f1f: 0000 [#1] PREEMPT SMP KASAN
KASAN: maybe wild-memory-access in range [0xf8f8f8f8f8f8f8f8-0xf8f8f8f8f8f8f8ff]
CPU: 1 PID: 8472 Comm: syz-executor Tainted: G B W syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:__rb_insert lib/rbtree.c:117 [inline]
RIP: 0010:__rb_insert_augmented+0xd9/0x720 lib/rbtree.c:459
Code: 4c 89 f7 e8 99 bd 3a ff 4d 8b 26 4d 39 fc 74 34 4d 85 e4 0f 84 fc 00 00 00 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 e7 e8 69 bd 3a ff 41 f6 04 24 01 74 63 e9
RSP: 0018:ffffc90000b278c0 EFLAGS: 00010a02
RAX: 1f1f1f1f1f1f1f1f RBX: 1ffff11038000001 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 00000000ffffffff
RBP: ffffc90000b27920 R08: 0000000000000004 R09: 0000000000000003
R10: fffffbfff0e1804c R11: 1ffffffff0e1804c R12: f8f8f8f8f8f8f8f8
R13: 1ffff11024a5c30e R14: ffff8881c0000008 R15: ffff8881252e1870
FS: 0000555565d01500(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c2d1fee CR3: 0000000125302000 CR4: 00000000003506a0
DR0: 0000200000000300 DR1: 0000200000000300 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
rb_insert_augmented include/linux/rbtree_augmented.h:50 [inline]
vma_interval_tree_insert_after+0x2a1/0x2b0 mm/interval_tree.c:57
dup_mmap kernel/fork.c:632 [inline]
dup_mm kernel/fork.c:1522 [inline]
copy_mm+0xb1a/0x1390 kernel/fork.c:1574
copy_process+0x115c/0x3210 kernel/fork.c:2348
kernel_clone+0x23f/0x940 kernel/fork.c:2737
__do_sys_clone kernel/fork.c:2863 [inline]
__se_sys_clone kernel/fork.c:2847 [inline]
__x64_sys_clone+0x176/0x1d0 kernel/fork.c:2847
x64_sys_call+0x41f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f3047626453
Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
RSP: 002b:00007fffaf36baa8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3047626453
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: 0000555565d017d0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000000927c0 R14: 00000000000495f6 R15: 00007fffaf36bc40
Modules linked in:
---[ end trace 49e962ecf7be7a6f ]---
RIP: 0010:__rb_insert lib/rbtree.c:117 [inline]
RIP: 0010:__rb_insert_augmented+0xd9/0x720 lib/rbtree.c:459
Code: 4c 89 f7 e8 99 bd 3a ff 4d 8b 26 4d 39 fc 74 34 4d 85 e4 0f 84 fc 00 00 00 4c 89 e0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 e7 e8 69 bd 3a ff 41 f6 04 24 01 74 63 e9
RSP: 0018:ffffc90000b278c0 EFLAGS: 00010a02
RAX: 1f1f1f1f1f1f1f1f RBX: 1ffff11038000001 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 00000000ffffffff
RBP: ffffc90000b27920 R08: 0000000000000004 R09: 0000000000000003
R10: fffffbfff0e1804c R11: 1ffffffff0e1804c R12: f8f8f8f8f8f8f8f8
R13: 1ffff11024a5c30e R14: ffff8881c0000008 R15: ffff8881252e1870
FS: 0000555565d01500(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000006b1000 CR3: 0000000125302000 CR4: 00000000003506b0
DR0: 0000200000000300 DR1: 0000200000000300 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
----------------
Code disassembly (best guess):
0: 4c 89 f7 mov %r14,%rdi
3: e8 99 bd 3a ff call 0xff3abda1
8: 4d 8b 26 mov (%r14),%r12
b: 4d 39 fc cmp %r15,%r12
e: 74 34 je 0x44
10: 4d 85 e4 test %r12,%r12
13: 0f 84 fc 00 00 00 je 0x115
19: 4c 89 e0 mov %r12,%rax
1c: 48 c1 e8 03 shr $0x3,%rax
20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
27: fc ff df
* 2a: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction
2e: 74 08 je 0x38
30: 4c 89 e7 mov %r12,%rdi
33: e8 69 bd 3a ff call 0xff3abda1
38: 41 f6 04 24 01 testb $0x1,(%r12)
3d: 74 63 je 0xa2
3f: e9 .byte 0xe9