================================================================== BUG: KASAN: use-after-free in consumer_filter kernel/events/uprobes.c:877 [inline] BUG: KASAN: use-after-free in filter_chain kernel/events/uprobes.c:888 [inline] BUG: KASAN: use-after-free in uprobe_mmap+0xb76/0x1130 kernel/events/uprobes.c:1395 Read of size 8 at addr ffff88805c500a28 by task syz.5.1760/10405 CPU: 1 PID: 10405 Comm: syz.5.1760 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 consumer_filter kernel/events/uprobes.c:877 [inline] filter_chain kernel/events/uprobes.c:888 [inline] uprobe_mmap+0xb76/0x1130 kernel/events/uprobes.c:1395 __mmap_region mm/mmap.c:2873 [inline] mmap_region+0x1701/0x1c50 mm/mmap.c:2924 do_mmap+0x9ce/0x10d0 mm/mmap.c:1444 vm_mmap_pgoff+0x1c1/0x2d0 mm/util.c:520 ksys_mmap_pgoff+0x4bf/0x720 mm/mmap.c:1490 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7ff49b1a9559 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff49c05e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007ff49b425fa0 RCX: 00007ff49b1a9559 RDX: 0000000000000005 RSI: 0000000000001000 RDI: 0000200000800000 RBP: 00007ff49b238136 R08: 0000000000000006 R09: 0000000000000000 R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff49b426038 R14: 00007ff49b425fa0 R15: 00007ffefc890cc8 Allocated by task 14: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xb3/0x240 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] usb_alloc_urb+0x3f/0x140 drivers/usb/core/urb.c:75 usb_internal_control_msg drivers/usb/core/message.c:109 [inline] usb_control_msg+0x115/0x3e0 drivers/usb/core/message.c:166 usb_clear_port_feature drivers/usb/core/hub.c:461 [inline] hub_activate+0xaff/0x1aa0 drivers/usb/core/hub.c:1216 hub_resume+0xa2/0x360 drivers/usb/core/hub.c:4009 usb_resume_interface drivers/usb/core/driver.c:1361 [inline] usb_resume_both+0x5e7/0xae0 drivers/usb/core/driver.c:1521 __rpm_callback+0x2fd/0x790 drivers/base/power/runtime.c:395 rpm_callback drivers/base/power/runtime.c:532 [inline] rpm_resume+0x10fa/0x1b90 drivers/base/power/runtime.c:912 __pm_runtime_resume+0x118/0x170 drivers/base/power/runtime.c:1170 pm_runtime_get_sync include/linux/pm_runtime.h:435 [inline] usb_autoresume_device+0x1f/0x60 drivers/usb/core/driver.c:1709 usb_remote_wakeup+0x66/0xf0 drivers/usb/core/hub.c:3847 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Freed by task 14: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1735 [inline] slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1761 slab_free mm/slub.c:3694 [inline] __kmem_cache_free+0xb6/0x200 mm/slub.c:3707 usb_start_wait_urb+0x493/0x580 drivers/usb/core/message.c:94 usb_internal_control_msg drivers/usb/core/message.c:116 [inline] usb_control_msg+0x231/0x3e0 drivers/usb/core/message.c:166 usb_clear_port_feature drivers/usb/core/hub.c:461 [inline] hub_activate+0xaff/0x1aa0 drivers/usb/core/hub.c:1216 hub_resume+0xa2/0x360 drivers/usb/core/hub.c:4009 usb_resume_interface drivers/usb/core/driver.c:1361 [inline] usb_resume_both+0x5e7/0xae0 drivers/usb/core/driver.c:1521 __rpm_callback+0x2fd/0x790 drivers/base/power/runtime.c:395 rpm_callback drivers/base/power/runtime.c:532 [inline] rpm_resume+0x10fa/0x1b90 drivers/base/power/runtime.c:912 __pm_runtime_resume+0x118/0x170 drivers/base/power/runtime.c:1170 pm_runtime_get_sync include/linux/pm_runtime.h:435 [inline] usb_autoresume_device+0x1f/0x60 drivers/usb/core/driver.c:1709 usb_remote_wakeup+0x66/0xf0 drivers/usb/core/hub.c:3847 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3c0 kernel/workqueue.c:1361 __queue_work+0xae2/0xee0 kernel/workqueue.c:1520 queue_work_node+0x268/0x3c0 kernel/workqueue.c:1632 __async_schedule_node_domain+0x3c0/0x3f0 kernel/async.c:176 usb_stor_scan_dwork+0x17c/0x260 drivers/usb/storage/usb.c:916 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3c0 kernel/workqueue.c:1361 __queue_work+0xae2/0xee0 kernel/workqueue.c:1520 queue_work_on+0x124/0x1f0 kernel/workqueue.c:1548 inetaddr_event+0xec/0x150 drivers/infiniband/core/roce_gid_mgmt.c:869 notifier_call_chain kernel/notifier.c:87 [inline] blocking_notifier_call_chain+0x103/0x1b0 kernel/notifier.c:382 __inet_del_ifa+0xaac/0x1090 net/ipv4/devinet.c:445 inet_del_ifa net/ipv4/devinet.c:482 [inline] inetdev_destroy net/ipv4/devinet.c:323 [inline] inetdev_event+0x5ae/0x13f0 net/ipv4/devinet.c:1615 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455 call_netdevice_notifiers_extack net/core/dev.c:2052 [inline] call_netdevice_notifiers net/core/dev.c:2066 [inline] unregister_netdevice_many_notify+0x10b1/0x1990 net/core/dev.c:11047 unregister_netdevice_many net/core/dev.c:11101 [inline] unregister_netdevice_queue+0x2e5/0x330 net/core/dev.c:10984 unregister_netdevice include/linux/netdevice.h:3084 [inline] __tun_detach+0xdb7/0x1590 drivers/net/tun.c:685 tun_detach drivers/net/tun.c:701 [inline] tun_chr_close+0x109/0x1b0 drivers/net/tun.c:3506 __fput+0x20a/0x8b0 fs/file_table.c:320 task_work_run+0x1d0/0x260 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0x9d5/0x2570 kernel/exit.c:887 do_group_exit+0x229/0x2e0 kernel/exit.c:1030 get_signal+0x1259/0x1340 kernel/signal.c:2884 arch_do_signal_or_restart+0xc4/0x1310 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213 __syscall_exit_to_user_mode_work kernel/entry/common.c:295 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:306 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88805c500a00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 40 bytes inside of 192-byte region [ffff88805c500a00, ffff88805c500ac0) The buggy address belongs to the physical page: page:ffffea0001714000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5c500 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000068bf80 dead000000000004 ffff888018441a00 raw: 0000000000000000 0000000000100010 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 4913, tgid 4913 (syz-executor), ts 139421460549, free_ts 139391903107 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560 prep_new_page mm/page_alloc.c:2567 [inline] get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_slab_page+0x4f/0x180 mm/slub.c:1807 allocate_slab mm/slub.c:1950 [inline] new_slab+0x87/0x2d0 mm/slub.c:2003 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3161 __slab_alloc mm/slub.c:3247 [inline] slab_alloc_node mm/slub.c:3332 [inline] __kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3405 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc_node+0xa2/0x240 mm/slab_common.c:943 kmalloc_array_node include/linux/slab.h:676 [inline] kcalloc_node include/linux/slab.h:681 [inline] memcg_alloc_slab_cgroups+0x81/0x120 mm/memcontrol.c:2889 account_slab mm/slab.h:640 [inline] allocate_slab mm/slub.c:1968 [inline] new_slab+0xc3/0x2d0 mm/slub.c:2003 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3161 __slab_alloc mm/slub.c:3247 [inline] slab_alloc_node mm/slub.c:3332 [inline] slab_alloc mm/slub.c:3374 [inline] __kmem_cache_alloc_lru mm/slub.c:3381 [inline] kmem_cache_alloc_lru+0x104/0x2e0 mm/slub.c:3397 __d_alloc+0x2e/0x6e0 fs/dcache.c:1776 d_alloc_pseudo+0x19/0x70 fs/dcache.c:1908 alloc_file_pseudo+0xe0/0x200 fs/file_table.c:265 sock_alloc_file+0xb3/0x240 net/socket.c:467 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1487 [inline] free_pcp_prepare mm/page_alloc.c:1537 [inline] free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509 __vunmap+0x874/0xa40 mm/vmalloc.c:2783 kcov_put kernel/kcov.c:439 [inline] kcov_close+0x27/0x50 kernel/kcov.c:535 __fput+0x20a/0x8b0 fs/file_table.c:320 task_work_run+0x1d0/0x260 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0x9d5/0x2570 kernel/exit.c:887 do_group_exit+0x229/0x2e0 kernel/exit.c:1030 get_signal+0x1259/0x1340 kernel/signal.c:2884 arch_do_signal_or_restart+0xc4/0x1310 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213 __syscall_exit_to_user_mode_work kernel/entry/common.c:295 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:306 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88805c500900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805c500980: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805c500a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805c500a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88805c500b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================