==================================================================
BUG: KASAN: slab-use-after-free in consumer_filter kernel/events/uprobes.c:948 [inline]
BUG: KASAN: slab-use-after-free in filter_chain kernel/events/uprobes.c:958 [inline]
BUG: KASAN: slab-use-after-free in uprobe_mmap+0xb91/0x10a0 kernel/events/uprobes.c:1440
Read of size 8 at addr ffff88811c6b3d28 by task syz.7.2694/7348
CPU: 1 UID: 0 PID: 7348 Comm: syz.7.2694 Not tainted syzkaller #0 1e8dd2872aaf7c9a84354913a38e4d794308f39a
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
__dump_stack+0x21/0x30 lib/dump_stack.c:94
dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120
print_address_description+0x71/0x210 mm/kasan/report.c:377
print_report+0x4a/0x70 mm/kasan/report.c:481
kasan_report+0x162/0x1a0 mm/kasan/report.c:594
__asan_report_load8_noabort+0x18/0x20 mm/kasan/report_generic.c:381
consumer_filter kernel/events/uprobes.c:948 [inline]
filter_chain kernel/events/uprobes.c:958 [inline]
uprobe_mmap+0xb91/0x10a0 kernel/events/uprobes.c:1440
__mmap_region mm/mmap.c:1577 [inline]
mmap_region+0xdde/0x1d10 mm/mmap.c:1639
do_mmap+0xa47/0x1370 mm/mmap.c:515
vm_mmap_pgoff+0x367/0x4b0 mm/util.c:594
ksys_mmap_pgoff+0x165/0x1e0 mm/mmap.c:564
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:79 [inline]
__x64_sys_mmap+0x121/0x140 arch/x86/kernel/sys_x86_64.c:79
x64_sys_call+0x13bf/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:10
do_syscall_x64 arch/x86/entry/common.c:47 [inline]
do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f4ea73a9b59
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:00007f4ea81c3028 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007f4ea7635fa0 RCX: 00007f4ea73a9b59
RDX: 0000000000000005 RSI: 0000000000001000 RDI: 0000200000800000
RBP: 00007f4ea743a18b R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4ea7636038 R14: 00007f4ea7635fa0 R15: 00007fffe4a9e058
Allocated by task 5797:
kasan_save_stack mm/kasan/common.c:49 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
kasan_save_alloc_info+0x3a/0x50 mm/kasan/generic.c:565
poison_kmalloc_redzone mm/kasan/common.c:379 [inline]
__kasan_kmalloc+0x96/0xb0 mm/kasan/common.c:396
kasan_kmalloc include/linux/kasan.h:261 [inline]
__kmalloc_cache_noprof+0x23c/0x470 mm/slub.c:4428
kmalloc_noprof include/linux/slab.h:882 [inline]
__hw_addr_create net/core/dev_addr_lists.c:60 [inline]
__hw_addr_add_ex+0x20a/0x7d0 net/core/dev_addr_lists.c:118
__hw_addr_add net/core/dev_addr_lists.c:135 [inline]
dev_addr_init+0x15b/0x240 net/core/dev_addr_lists.c:558
alloc_netdev_mqs+0x301/0x13d0 net/core/dev.c:11246
rtnl_create_link+0x341/0xe80 net/core/rtnetlink.c:3499
rtnl_newlink_create net/core/rtnetlink.c:3625 [inline]
__rtnl_newlink net/core/rtnetlink.c:3855 [inline]
rtnl_newlink+0x1457/0x2220 net/core/rtnetlink.c:3868
rtnetlink_rcv_msg+0x8be/0xa40 net/core/rtnetlink.c:6768
netlink_rcv_skb+0x24a/0x4e0 net/netlink/af_netlink.c:2554
rtnetlink_rcv+0x20/0x30 net/core/rtnetlink.c:6786
netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
netlink_unicast+0x8bf/0xa70 net/netlink/af_netlink.c:1340
netlink_sendmsg+0x7d1/0xad0 net/netlink/af_netlink.c:1895
sock_sendmsg_nosec net/socket.c:712 [inline]
__sock_sendmsg net/socket.c:727 [inline]
__sys_sendto+0x663/0x6e0 net/socket.c:2198
__do_sys_sendto net/socket.c:2205 [inline]
__se_sys_sendto net/socket.c:2201 [inline]
__x64_sys_sendto+0xe9/0x100 net/socket.c:2201
x64_sys_call+0x2c2c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:45
do_syscall_x64 arch/x86/entry/common.c:47 [inline]
do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Freed by task 46:
kasan_save_stack mm/kasan/common.c:49 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
kasan_save_free_info+0x44/0x50 mm/kasan/generic.c:579
poison_slab_object mm/kasan/common.c:249 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:266
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2445 [inline]
slab_free_freelist_hook mm/slub.c:2474 [inline]
slab_free_bulk mm/slub.c:4746 [inline]
kmem_cache_free_bulk+0x22c/0x540 mm/slub.c:4997
kfree_bulk include/linux/slab.h:771 [inline]
kvfree_rcu_bulk+0x20f/0x4c0 kernel/rcu/tree.c:3399
kvfree_rcu_drain_ready kernel/rcu/tree.c:3583 [inline]
kfree_rcu_monitor+0x81a/0x8b0 kernel/rcu/tree.c:3656
process_one_work kernel/workqueue.c:3273 [inline]
process_scheduled_works+0x7f7/0x1060 kernel/workqueue.c:3354
worker_thread+0xc99/0x13f0 kernel/workqueue.c:3435
kthread+0x2c7/0x360 kernel/kthread.c:389
ret_from_fork+0x64/0xa0 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:49
__kasan_record_aux_stack+0xb2/0xd0 mm/kasan/generic.c:541
kasan_record_aux_stack_noalloc+0xf/0x20 mm/kasan/generic.c:551
kvfree_call_rcu+0x79/0x730 kernel/rcu/tree.c:3834
__hw_addr_flush net/core/dev_addr_lists.c:490 [inline]
dev_addr_flush+0x18d/0x240 net/core/dev_addr_lists.c:535
free_netdev+0x1f6/0x4d0 net/core/dev.c:11359
netdev_run_todo+0xb4b/0xce0 net/core/dev.c:10943
rtnl_unlock+0x12/0x20 net/core/rtnetlink.c:152
default_device_exit_batch+0x84a/0x8d0 net/core/dev.c:12169
ops_exit_list net/core/net_namespace.c:178 [inline]
cleanup_net+0x741/0xc90 net/core/net_namespace.c:648
process_one_work kernel/workqueue.c:3273 [inline]
process_scheduled_works+0x7f7/0x1060 kernel/workqueue.c:3354
worker_thread+0xc99/0x13f0 kernel/workqueue.c:3435
kthread+0x2c7/0x360 kernel/kthread.c:389
ret_from_fork+0x64/0xa0 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88811c6b3d00
which belongs to the cache kmalloc-128 of size 128
The buggy address is located 40 bytes inside of
freed 128-byte region [ffff88811c6b3d00, ffff88811c6b3d80)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11c6b3
flags: 0x4000000000000000(zone=1)
page_type: f5(slab)
raw: 4000000000000000 ffff888100041a00 ffffea00043eb6c0 dead000000000002
raw: 0000000000000000 0000000000100010 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 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5221, tgid 5220 (syz.2.1891), ts 224366342994, free_ts 223556004335
set_page_owner include/linux/page_owner.h:35 [inline]
post_alloc_hook+0x37d/0x3b0 mm/page_alloc.c:1864
prep_new_page+0x2d/0x180 mm/page_alloc.c:1872
get_page_from_freelist+0x4aea/0x4ba0 mm/page_alloc.c:3949
__alloc_pages_noprof+0x35a/0x7e0 mm/page_alloc.c:5316
alloc_slab_page+0x6b/0x1e0 mm/slub.c:-1
allocate_slab+0x69/0x430 mm/slub.c:2687
new_slab mm/slub.c:2741 [inline]
___slab_alloc+0x591/0x8c0 mm/slub.c:3934
__slab_alloc mm/slub.c:4025 [inline]
__slab_alloc_node mm/slub.c:4078 [inline]
slab_alloc_node mm/slub.c:4241 [inline]
__kmalloc_cache_noprof+0x2cd/0x470 mm/slub.c:4423
kmalloc_noprof include/linux/slab.h:882 [inline]
__hw_addr_create net/core/dev_addr_lists.c:60 [inline]
__hw_addr_add_ex+0x20a/0x7d0 net/core/dev_addr_lists.c:118
__hw_addr_add net/core/dev_addr_lists.c:135 [inline]
dev_addr_init+0x15b/0x240 net/core/dev_addr_lists.c:558
alloc_netdev_mqs+0x301/0x13d0 net/core/dev.c:11246
ip6_tnl_init_net+0x162/0x4a0 net/ipv6/ip6_tunnel.c:2259
ops_init+0x302/0x5d0 net/core/net_namespace.c:139
setup_net+0x227/0x9b0 net/core/net_namespace.c:362
copy_net_ns+0x4fc/0xa20 net/core/net_namespace.c:516
create_new_namespaces+0x390/0x6f0 kernel/nsproxy.c:110
page last free pid 20 tgid 20 stack trace:
reset_page_owner include/linux/page_owner.h:28 [inline]
free_pages_prepare mm/page_alloc.c:1391 [inline]
free_unref_page+0xb99/0xf50 mm/page_alloc.c:2877
__free_pages+0x6b/0x3b0 mm/page_alloc.c:5403
pagetable_free include/linux/mm.h:3091 [inline]
pagetable_dtor_free include/linux/mm.h:3181 [inline]
__tlb_remove_table include/asm-generic/tlb.h:217 [inline]
__tlb_remove_table_free mm/mmu_gather.c:228 [inline]
tlb_remove_table_rcu+0x2b2/0x3d0 mm/mmu_gather.c:283
rcu_do_batch+0x56a/0xcb0 kernel/rcu/tree.c:2575
nocb_cb_wait kernel/rcu/tree_nocb.h:923 [inline]
rcu_nocb_cb_kthread+0x533/0xb60 kernel/rcu/tree_nocb.h:957
kthread+0x2c7/0x360 kernel/kthread.c:389
ret_from_fork+0x64/0xa0 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Memory state around the buggy address:
ffff88811c6b3c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88811c6b3c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811c6b3d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88811c6b3d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88811c6b3e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
BUG: unable to handle page fault for address: 000024aaaaaaaa9b
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: Oops: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 7348 Comm: syz.7.2694 Tainted: G B syzkaller #0 1e8dd2872aaf7c9a84354913a38e4d794308f39a
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
RIP: 0010:consumer_filter kernel/events/uprobes.c:948 [inline]
RIP: 0010:filter_chain kernel/events/uprobes.c:958 [inline]
RIP: 0010:uprobe_mmap+0xba7/0x10a0 kernel/events/uprobes.c:1440
Code: 00 00 00 fc ff df 80 3c 08 00 74 08 4c 89 ef e8 4f 08 23 00 4d 8b 5d 00 4d 85 db 74 59 49 8d 7e e8 4c 89 e6 41 ba a9 ed 54 87 <45> 03 53 f1 74 02 0f 0b 2e e8 33 09 40 1e 84 c0 4d 89 fd 75 41 e8
RSP: 0018:ffffc9000d1cf7a0 EFLAGS: 00010206
RAX: ffff88810c761301 RBX: ffff888120f2f0b0 RCX: 0000000000080000
RDX: ffffc900055f1000 RSI: ffff88811509e600 RDI: ffff88811c6b3d18
RBP: ffffc9000d1cf8d0 R08: ffffffff893e4967 R09: 1ffffffff127c92c
R10: 000000008754eda9 R11: 000024aaaaaaaaaa R12: ffff88811509e600
R13: ffff88811c6b3d28 R14: ffff88811c6b3d30 R15: ffff888120f2f000
FS: 00007f4ea81c36c0(0000) GS:ffff8881f6d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000024aaaaaaaa9b CR3: 0000000126782000 CR4: 00000000003526b0
Call Trace:
__mmap_region mm/mmap.c:1577 [inline]
mmap_region+0xdde/0x1d10 mm/mmap.c:1639
do_mmap+0xa47/0x1370 mm/mmap.c:515
vm_mmap_pgoff+0x367/0x4b0 mm/util.c:594
ksys_mmap_pgoff+0x165/0x1e0 mm/mmap.c:564
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:79 [inline]
__x64_sys_mmap+0x121/0x140 arch/x86/kernel/sys_x86_64.c:79
x64_sys_call+0x13bf/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:10
do_syscall_x64 arch/x86/entry/common.c:47 [inline]
do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f4ea73a9b59
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:00007f4ea81c3028 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007f4ea7635fa0 RCX: 00007f4ea73a9b59
RDX: 0000000000000005 RSI: 0000000000001000 RDI: 0000200000800000
RBP: 00007f4ea743a18b R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4ea7636038 R14: 00007f4ea7635fa0 R15: 00007fffe4a9e058
Modules linked in:
CR2: 000024aaaaaaaa9b
---[ end trace 0000000000000000 ]---
RIP: 0010:consumer_filter kernel/events/uprobes.c:948 [inline]
RIP: 0010:filter_chain kernel/events/uprobes.c:958 [inline]
RIP: 0010:uprobe_mmap+0xba7/0x10a0 kernel/events/uprobes.c:1440
Code: 00 00 00 fc ff df 80 3c 08 00 74 08 4c 89 ef e8 4f 08 23 00 4d 8b 5d 00 4d 85 db 74 59 49 8d 7e e8 4c 89 e6 41 ba a9 ed 54 87 <45> 03 53 f1 74 02 0f 0b 2e e8 33 09 40 1e 84 c0 4d 89 fd 75 41 e8
RSP: 0018:ffffc9000d1cf7a0 EFLAGS: 00010206
RAX: ffff88810c761301 RBX: ffff888120f2f0b0 RCX: 0000000000080000
RDX: ffffc900055f1000 RSI: ffff88811509e600 RDI: ffff88811c6b3d18
RBP: ffffc9000d1cf8d0 R08: ffffffff893e4967 R09: 1ffffffff127c92c
R10: 000000008754eda9 R11: 000024aaaaaaaaaa R12: ffff88811509e600
R13: ffff88811c6b3d28 R14: ffff88811c6b3d30 R15: ffff888120f2f000
FS: 00007f4ea81c36c0(0000) GS:ffff8881f6d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000024aaaaaaaa9b CR3: 0000000126782000 CR4: 00000000003526b0
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: 00 fc add %bh,%ah
4: ff lcall (bad)
5: df 80 3c 08 00 74 filds 0x7400083c(%rax)
b: 08 4c 89 ef or %cl,-0x11(%rcx,%rcx,4)
f: e8 4f 08 23 00 call 0x230863
14: 4d 8b 5d 00 mov 0x0(%r13),%r11
18: 4d 85 db test %r11,%r11
1b: 74 59 je 0x76
1d: 49 8d 7e e8 lea -0x18(%r14),%rdi
21: 4c 89 e6 mov %r12,%rsi
24: 41 ba a9 ed 54 87 mov $0x8754eda9,%r10d
* 2a: 45 03 53 f1 add -0xf(%r11),%r10d <-- trapping instruction
2e: 74 02 je 0x32
30: 0f 0b ud2
32: 2e e8 33 09 40 1e cs call 0x1e40096b
38: 84 c0 test %al,%al
3a: 4d 89 fd mov %r15,%r13
3d: 75 41 jne 0x80
3f: e8 .byte 0xe8