==================================================================
BUG: KASAN: slab-use-after-free in timer_is_static_object+0x80/0x90 kernel/time/timer.c:691
Read of size 8 at addr ffff88802b509538 by task kworker/1:0/29
CPU: 1 UID: 0 PID: 29 Comm: kworker/1:0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: events mptcp_worker
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+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
timer_is_static_object+0x80/0x90 kernel/time/timer.c:691
lookup_object_or_alloc.part.0+0x420/0x590 lib/debugobjects.c:679
lookup_object_or_alloc lib/debugobjects.c:665 [inline]
debug_object_assert_init+0x266/0x2f0 lib/debugobjects.c:1008
debug_timer_assert_init kernel/time/timer.c:803 [inline]
debug_assert_init kernel/time/timer.c:848 [inline]
__try_to_del_timer_sync+0x7f/0x170 kernel/time/timer.c:1457
__timer_delete_sync+0xf4/0x1b0 kernel/time/timer.c:1620
sk_stop_timer_sync+0x1b/0x80 net/core/sock.c:3631
mptcp_pm_del_add_timer+0x1ae/0x320 net/mptcp/pm.c:362
mptcp_incoming_options+0x1e55/0x2650 net/mptcp/options.c:1174
tcp_data_queue+0x1906/0x4fd0 net/ipv4/tcp_input.c:5361
tcp_rcv_established+0xa7f/0x3700 net/ipv4/tcp_input.c:6441
tcp_v4_do_rcv+0x5ca/0xa90 net/ipv4/tcp_ipv4.c:1931
tcp_v4_rcv+0x3077/0x47d0 net/ipv4/tcp_ipv4.c:2374
ip_protocol_deliver_rcu+0xba/0x4c0 net/ipv4/ip_input.c:205
ip_local_deliver_finish+0x3f2/0x720 net/ipv4/ip_input.c:239
NF_HOOK include/linux/netfilter.h:318 [inline]
NF_HOOK include/linux/netfilter.h:312 [inline]
ip_local_deliver+0x18e/0x1f0 net/ipv4/ip_input.c:260
dst_input include/net/dst.h:474 [inline]
ip_rcv_finish net/ipv4/ip_input.c:453 [inline]
NF_HOOK include/linux/netfilter.h:318 [inline]
NF_HOOK include/linux/netfilter.h:312 [inline]
ip_rcv+0x2e0/0x600 net/ipv4/ip_input.c:573
__netif_receive_skb_one_core+0x197/0x1e0 net/core/dev.c:6079
__netif_receive_skb+0x1d/0x160 net/core/dev.c:6192
process_backlog+0x439/0x15e0 net/core/dev.c:6544
__napi_poll.constprop.0+0xb7/0x550 net/core/dev.c:7594
napi_poll net/core/dev.c:7657 [inline]
net_rx_action+0x97f/0xef0 net/core/dev.c:7784
handle_softirqs+0x219/0x8e0 kernel/softirq.c:622
do_softirq kernel/softirq.c:523 [inline]
do_softirq+0xb2/0xf0 kernel/softirq.c:510
__local_bh_enable_ip+0x100/0x120 kernel/softirq.c:450
spin_unlock_bh include/linux/spinlock.h:396 [inline]
unlock_sock_fast include/net/sock.h:1740 [inline]
unlock_sock_fast include/net/sock.h:1732 [inline]
__mptcp_pm_send_ack+0x1d3/0x1f0 net/mptcp/pm.c:202
mptcp_pm_send_ack net/mptcp/pm.c:210 [inline]
mptcp_pm_addr_send_ack+0x422/0x4b0 net/mptcp/pm.c:228
mptcp_pm_worker+0x272/0x300 net/mptcp/pm.c:1002
mptcp_worker+0x15a/0x1280 net/mptcp/protocol.c:2762
process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263
process_scheduled_works kernel/workqueue.c:3346 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427
kthread+0x3c2/0x780 kernel/kthread.c:463
ret_from_fork+0x56a/0x730 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 29:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
poison_kmalloc_redzone mm/kasan/common.c:400 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:417
kmalloc_noprof include/linux/slab.h:957 [inline]
mptcp_pm_alloc_anno_list+0x2be/0x5e0 net/mptcp/pm.c:385
mptcp_pm_create_subflow_or_signal_addr+0x648/0x1340 net/mptcp/pm_kernel.c:355
mptcp_pm_nl_fully_established net/mptcp/pm_kernel.c:409 [inline]
__mptcp_pm_kernel_worker+0x129/0x1e0 net/mptcp/pm_kernel.c:1529
mptcp_pm_worker+0x126/0x300 net/mptcp/pm.c:1008
mptcp_worker+0x15a/0x1280 net/mptcp/protocol.c:2762
process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263
process_scheduled_works kernel/workqueue.c:3346 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427
kthread+0x3c2/0x780 kernel/kthread.c:463
ret_from_fork+0x56a/0x730 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 8781:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
__kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:587
kasan_save_free_info mm/kasan/kasan.h:406 [inline]
poison_slab_object mm/kasan/common.c:252 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2514 [inline]
slab_free mm/slub.c:6566 [inline]
kfree+0x2b8/0x6d0 mm/slub.c:6773
mptcp_remove_anno_list_by_saddr+0x29/0x40 net/mptcp/pm.c:158
mptcp_pm_flush_addrs_and_subflows net/mptcp/pm_kernel.c:1209 [inline]
mptcp_nl_flush_addrs_list net/mptcp/pm_kernel.c:1240 [inline]
mptcp_pm_nl_flush_addrs_doit+0x588/0xb50 net/mptcp/pm_kernel.c:1281
genl_family_rcv_msg_doit+0x206/0x2f0 net/netlink/genetlink.c:1115
genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline]
genl_rcv_msg+0x55c/0x800 net/netlink/genetlink.c:1210
netlink_rcv_skb+0x155/0x420 net/netlink/af_netlink.c:2552
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x8c8/0xdd0 net/netlink/af_netlink.c:1896
sock_sendmsg_nosec net/socket.c:727 [inline]
__sock_sendmsg net/socket.c:742 [inline]
____sys_sendmsg+0xa95/0xc70 net/socket.c:2630
___sys_sendmsg+0x134/0x1d0 net/socket.c:2684
__sys_sendmsg+0x16d/0x220 net/socket.c:2716
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88802b509500
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 56 bytes inside of
freed 192-byte region [ffff88802b509500, ffff88802b5095c0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2b509
ksm flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801b0423c0 ffffea0000a18540 0000000000000007
raw: 0000000000000000 0000000080100010 00000000f5000000 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 8223, tgid 8223 (syz-executor), ts 111177749488, free_ts 111156191903
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850
prep_new_page mm/page_alloc.c:1858 [inline]
get_page_from_freelist+0x10a3/0x3a30 mm/page_alloc.c:3884
__alloc_frozen_pages_noprof+0x25f/0x2470 mm/page_alloc.c:5183
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:3030 [inline]
allocate_slab mm/slub.c:3203 [inline]
new_slab+0x24a/0x360 mm/slub.c:3257
___slab_alloc+0xdc4/0x1ae0 mm/slub.c:4627
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4746
__slab_alloc_node mm/slub.c:4822 [inline]
slab_alloc_node mm/slub.c:5233 [inline]
__kmalloc_cache_noprof+0x477/0x780 mm/slub.c:5719
kmalloc_noprof include/linux/slab.h:957 [inline]
addr_event.constprop.0+0xcc/0x560 drivers/infiniband/core/roce_gid_mgmt.c:861
inet6addr_event+0x116/0x180 drivers/infiniband/core/roce_gid_mgmt.c:904
notifier_call_chain+0xb9/0x410 kernel/notifier.c:85
atomic_notifier_call_chain+0x71/0x1c0 kernel/notifier.c:223
ipv6_add_addr+0x1388/0x1fe0 net/ipv6/addrconf.c:1186
addrconf_add_linklocal+0x2a5/0x500 net/ipv6/addrconf.c:3311
addrconf_addr_gen+0x364/0x3b0 net/ipv6/addrconf.c:3442
addrconf_dev_config net/ipv6/addrconf.c:3489 [inline]
addrconf_init_auto_addrs+0x2ba/0x810 net/ipv6/addrconf.c:3567
page last free pid 8336 tgid 8336 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1394 [inline]
__free_frozen_pages+0x7df/0x1160 mm/page_alloc.c:2906
discard_slab mm/slub.c:3301 [inline]
__put_partials+0x130/0x170 mm/slub.c:3848
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:352
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4946 [inline]
slab_alloc_node mm/slub.c:5245 [inline]
kmem_cache_alloc_noprof+0x250/0x6e0 mm/slub.c:5252
vm_area_dup+0x27/0x8d0 mm/vma_init.c:123
__split_vma+0x18e/0x1070 mm/vma.c:515
split_vma mm/vma.c:598 [inline]
vma_modify+0x16dc/0x2030 mm/vma.c:1623
vma_modify_flags+0x212/0x2d0 mm/vma.c:1649
mprotect_fixup+0x1df/0xb40 mm/mprotect.c:816
do_mprotect_pkey+0x9bc/0xd40 mm/mprotect.c:990
__do_sys_mprotect mm/mprotect.c:1011 [inline]
__se_sys_mprotect mm/mprotect.c:1008 [inline]
__x64_sys_mprotect+0x78/0xc0 mm/mprotect.c:1008
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88802b509400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88802b509480: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc
>ffff88802b509500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802b509580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff88802b509600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================