================================================================== BUG: KASAN: slab-out-of-bounds in __rb_map_vma+0x9ab/0xae0 kernel/trace/ring_buffer.c:7058 Read of size 8 at addr ffff888027aefa78 by task syz.8.2471/15518 CPU: 1 UID: 0 PID: 15518 Comm: syz.8.2471 Not tainted 6.13.0-rc2-syzkaller-00159-gf932fb9b4074 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024 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+0xc3/0x620 mm/kasan/report.c:489 kasan_report+0xd9/0x110 mm/kasan/report.c:602 __rb_map_vma+0x9ab/0xae0 kernel/trace/ring_buffer.c:7058 ring_buffer_map+0x56e/0x9b0 kernel/trace/ring_buffer.c:7138 tracing_buffers_mmap+0xa6/0x120 kernel/trace/trace.c:8482 call_mmap include/linux/fs.h:2183 [inline] mmap_file mm/internal.h:124 [inline] __mmap_new_file_vma mm/vma.c:2291 [inline] __mmap_new_vma mm/vma.c:2355 [inline] __mmap_region+0x1786/0x2670 mm/vma.c:2456 mmap_region+0x127/0x320 mm/mmap.c:1348 do_mmap+0xc00/0xfc0 mm/mmap.c:496 vm_mmap_pgoff+0x1ba/0x360 mm/util.c:580 ksys_mmap_pgoff+0x32c/0x5c0 mm/mmap.c:542 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:89 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:82 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:82 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:0x7f59bcb85d19 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f59bda78038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f59bcd75fa0 RCX: 00007f59bcb85d19 RDX: 0000000000000040 RSI: 0000000000000009 RDI: 0000000000000000 RBP: 00007f59bcc01a20 R08: 0000000000000003 R09: 0000000000008000 R10: 0000000000000013 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f59bcd75fa0 R15: 00007fff022aa0b8 Allocated by task 15518: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4283 [inline] __kmalloc_noprof+0x21a/0x4f0 mm/slub.c:4295 kmalloc_noprof include/linux/slab.h:905 [inline] kmalloc_array_noprof include/linux/slab.h:946 [inline] ring_buffer_map+0x1e1/0x9b0 kernel/trace/ring_buffer.c:7120 tracing_buffers_mmap+0xa6/0x120 kernel/trace/trace.c:8482 call_mmap include/linux/fs.h:2183 [inline] mmap_file mm/internal.h:124 [inline] __mmap_new_file_vma mm/vma.c:2291 [inline] __mmap_new_vma mm/vma.c:2355 [inline] __mmap_region+0x1786/0x2670 mm/vma.c:2456 mmap_region+0x127/0x320 mm/mmap.c:1348 do_mmap+0xc00/0xfc0 mm/mmap.c:496 vm_mmap_pgoff+0x1ba/0x360 mm/util.c:580 ksys_mmap_pgoff+0x32c/0x5c0 mm/mmap.c:542 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:89 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:82 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:82 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 The buggy address belongs to the object at ffff888027aefa40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 32 bytes to the right of allocated 24-byte region [ffff888027aefa40, ffff888027aefa58) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27aef ksm flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801ac41780 ffffea000085bfc0 dead000000000003 raw: 0000000000000000 0000000080400040 00000001f5000000 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 14883, tgid 14883 (sed), ts 667853841693, free_ts 667794624376 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474 __alloc_pages_noprof+0x223/0x25b0 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2269 alloc_slab_page mm/slub.c:2408 [inline] allocate_slab mm/slub.c:2574 [inline] new_slab+0x2c9/0x410 mm/slub.c:2627 ___slab_alloc+0xce2/0x1650 mm/slub.c:3815 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3905 __slab_alloc_node mm/slub.c:3980 [inline] slab_alloc_node mm/slub.c:4141 [inline] __kmalloc_cache_noprof+0xf6/0x420 mm/slub.c:4309 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] ref_tracker_alloc+0x17c/0x5b0 lib/ref_tracker.c:203 __netdev_tracker_alloc include/linux/netdevice.h:4136 [inline] netdev_hold include/linux/netdevice.h:4165 [inline] dst_init+0xda/0x580 net/core/dst.c:52 dst_alloc+0xbb/0x1a0 net/core/dst.c:93 rt_dst_alloc+0x35/0x3a0 net/ipv4/route.c:1625 __mkroute_output net/ipv4/route.c:2618 [inline] ip_route_output_key_hash_rcu+0x8a5/0x2770 net/ipv4/route.c:2840 ip_route_output_key_hash+0x138/0x2e0 net/ipv4/route.c:2669 __ip_route_output_key include/net/route.h:141 [inline] ip_route_output_flow+0x27/0x150 net/ipv4/route.c:2897 ip_route_output_ports include/net/route.h:185 [inline] igmpv3_newpack+0x2b3/0x11e0 net/ipv4/igmp.c:372 page last free pid 14883 tgid 14883 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xa7b/0x14f0 mm/page_alloc.c:2704 folios_put_refs+0x587/0x7b0 mm/swap.c:962 free_pages_and_swap_cache+0x36d/0x510 mm/swap_state.c:332 __tlb_batch_free_encoded_pages+0xf9/0x290 mm/mmu_gather.c:136 tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu mm/mmu_gather.c:373 [inline] tlb_finish_mmu+0x168/0x7b0 mm/mmu_gather.c:465 exit_mmap+0x3df/0xb20 mm/mmap.c:1681 __mmput+0x12a/0x4c0 kernel/fork.c:1353 mmput+0x62/0x70 kernel/fork.c:1375 exec_mmap fs/exec.c:1018 [inline] begin_new_exec+0x1524/0x3570 fs/exec.c:1274 load_elf_binary+0x80a/0x4ed0 fs/binfmt_elf.c:1002 search_binary_handler fs/exec.c:1748 [inline] exec_binprm fs/exec.c:1790 [inline] bprm_execve fs/exec.c:1842 [inline] bprm_execve+0x703/0x19b0 fs/exec.c:1818 do_execveat_common.isra.0+0x4f1/0x630 fs/exec.c:1949 do_execve fs/exec.c:2023 [inline] __do_sys_execve fs/exec.c:2099 [inline] __se_sys_execve fs/exec.c:2094 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2094 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: ffff888027aef900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ffff888027aef980: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc >ffff888027aefa00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc ^ ffff888027aefa80: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc ffff888027aefb00: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc ==================================================================